Yeah. I'm currently dealing plugin with the zombie evolution. But every time I try, there's a constant errors. The health is not full and evolution does not skip a level.
Thank you in advance for your help.
CODES:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <biohazard>
#define PLUGIN "[BIO] Zombie Evolution"
#define VERSION "Test v0.01 "
#define AUTHOR "YunusReyiz"
new g_infect[33],g_evo_level[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_putinserver(id)
{
pro_test(id)
}
public pro_test(id)
{
set_task(0.1, "zombie_evolution", id, _, _, "b")
}
public ResetKills(id)
{
new players[32] , inum
get_players(players, inum)
for(new a = 0; a < inum; ++a)
g_infect[a] = 0
}
public event_infect(victim, attacker)
{
zombie_evolution(victim, attacker)
}
public zombie_evolution(victim, attacker)
{
g_infect[victim] == is_user_zombie(victim)
if(is_user_zombie(attacker))
{
set_hudmessage(255, 255, 0, -1.0, 0.82, 0, 6.0, 1.1, 0.0, 0.0, -1)
if(g_infect[victim] < 3)
{
show_hudmessage(attacker, "[EVOLUTION LEVEL : 0]")
}
else if(g_infect[victim] <= 5 && g_evo_level[attacker] == 0)
{
g_evo_level[attacker] = 1
set_user_health(victim, 7000)
show_hudmessage(attacker, "[EVOLUTION LEVEL : 1]")
}
else if(g_infect[victim] <= 7 && g_evo_level[attacker] == 1)
{
g_evo_level[attacker] = 2
set_user_health(victim, get_user_health(victim) + 2000)
show_hudmessage(attacker, "[EVOLUTION LEVEL : 2]")
}
else if(g_infect[victim] >= 7 && g_evo_level[attacker] == 2)
{
g_evo_level[attacker] = 3
set_user_health(victim, 14000)
show_hudmessage(attacker, "[EVOLUTION LEVEL : Max]")
}
}
}
__________________