Alguem poderia fazer pra min um plugin de reviver automaticamente quando entra (SO EM ROUND INFECÇAO)
oq eu uso e esse , mas nao funciona :(
OBS : MEU SERVER TEM MODS SURVIVOR , NEMESIS , ASSASINO , SNIPER , ARMAGEDDON , SWARM , PLAGUE , MULTI INFECÇAO
oq eu uso e esse , mas nao funciona :(
OBS : MEU SERVER TEM MODS SURVIVOR , NEMESIS , ASSASINO , SNIPER , ARMAGEDDON , SWARM , PLAGUE , MULTI INFECÇAO
- Código:
#include <amxmodx>
#include <zombieplague>
#define validTeam(%1) (1 <= get_user_team(%1) <= 3)
new pcvar, pcvar_nem, pcvar_plague, pcvar_surv, pcvar_swarm;
public plugin_init()
{
register_plugin("[ZP] Respawn", "1.1", "ILUSION");
pcvar = get_cvar_pointer("zp_deathmatch");
pcvar_nem = get_cvar_pointer("zp_nem_allow_respawn");
pcvar_plague = get_cvar_pointer("zp_plague_allow_respawn");
pcvar_swarm = get_cvar_pointer("zp_swarm_allow_respawn");
pcvar_surv = get_cvar_pointer("zp_surv_allow_respawn");
}
public client_putinserver(id)
if (get_pcvar_num(pcvar))
set_task(5.0, "SpawnUser", id, _, _, "b");
public SpawnUser(id)
{
if (!is_user_connected(id))
remove_task(id);
else if (!validTeam(id))
return;
else if (is_user_alive(id) || zp_is_swarm_round() && !get_pcvar_num(pcvar_swarm) || zp_is_nemesis_round() && !get_pcvar_num(pcvar_nem) || zp_is_survivor_round() && !get_pcvar_num(pcvar_surv) || zp_is_plague_round() && !get_pcvar_num(pcvar_plague))
remove_task(id);
else
{
switch (get_pcvar_num(pcvar))
{
case 1: zp_respawn_user(id, zp_is_survivor_round() ? ZP_TEAM_ZOMBIE : ZP_TEAM_HUMAN);
case 2: zp_respawn_user(id, zp_is_nemesis_round() ? ZP_TEAM_HUMAN : ZP_TEAM_ZOMBIE);
case 3: zp_respawn_user(id, zp_is_survivor_round() ? ZP_TEAM_ZOMBIE : zp_is_nemesis_round() ? ZP_TEAM_HUMAN : random_num(1, 2) == 1 ? ZP_TEAM_HUMAN : ZP_TEAM_ZOMBIE);
case 4: zp_respawn_user(id, zp_is_survivor_round() ? ZP_TEAM_ZOMBIE : zp_is_nemesis_round() ? ZP_TEAM_HUMAN : zp_get_zombie_count() < zp_get_human_count() ? ZP_TEAM_ZOMBIE : ZP_TEAM_HUMAN);
default: zp_respawn_user(id, zp_is_survivor_round() ? ZP_TEAM_ZOMBIE : zp_is_nemesis_round() ? ZP_TEAM_HUMAN : random_num(1, 2) == 1 ? ZP_TEAM_HUMAN : ZP_TEAM_ZOMBIE);
}
remove_task(id);
}
}