Coding Help/Re-API Supported
-
z0h1r-LK
- Mod Developer
- Posts: 486
- Joined: 5 years ago
- Location: The Red City ❤
-
Contact:
-
Quote
-
0
login to like this post
#1
Post
by z0h1r-LK » 3 years ago
Hi
I was want create plugin is make zombie is kill is not infect
Problem 1: When i use return 1 is became knock-back is stopped !
Problem 2: When health of the human became 0 is infect is not dead !
// forward pre-infection
public ze_user_infected_pre(iVictim, iInfector, iDamage)
{
// Check from infector is valid
if (iInfector != 0 && g_bIsSwarm)
{
// Check from damage is started
if (g_bStartDamage)
{
// Get current health victim
new iHealth = floatround(get_entvar(iVictim, var_health))
if (iHealth > 0)
{
// Get new damage
new iNewDamage = iDamage * get_pcvar_num(g_pCvarDamage)
// Check from health victim is not equal zero
if ((iHealth - iNewDamage) > 0)
{
// Damage victim
set_entvar(iVictim, var_health, float(iHealth - iNewDamage))
}
else // Kill victim
{
// ExecuteHam(Ham_Killed, iVictim, iInfector) // I don't know it's not working !
user_kill(iVictim)
// Death message
SendDeathMsg(iInfector, iVictim)
// Update frags
UpdateFrags(iInfector, iVictim, get_pcvar_num(g_pCvarFrag), get_pcvar_num(g_pCvarDeath), 1)
}
return 1
}
}
}
return 0
}
-
Raheem
- Mod Developer
- Posts: 2214
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#2
Post
by Raheem » 3 years ago
Hi
Knockback on humans?
Please explain what you are trying to do.
He who fails to plan is planning to fail
-
z0h1r-LK
- Mod Developer
- Posts: 486
- Joined: 5 years ago
- Location: The Red City ❤
-
Contact:
-
Quote
-
0
login to like this post
#3
Post
by z0h1r-LK » 3 years ago
Raheem wrote: ↑3 years ago
Hi
Knockback on humans?
Please explain what you are trying to do.
Zombies
I wanna make zombie is damage player ...
when i use this code knockback became not working when zombies
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Register
Sign in
Users browsing this forum: No registered users and 2 guests