- Código:
#include <amxmodx>
#include <zombieplague>
#define PLUGIN "[ZP] Addon: /reviver"
#define VERSION "3.0"
#define AUTHOR "Leozinho | [P]erfec[T] [S]cr[@]s[H]"
new allow_respawn
public plugin_init()
{
register_clcmd("say reviver", "cmd_respawn")
register_clcmd("say_team reviver", "cmd_respawn")
register_clcmd("say /reviver", "cmd_respawn")
register_clcmd("say_team /reviver", "cmd_respawn")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public event_round_start()
{
for(new id = 1; id <= get_maxplayers(); id++)
{
allow_respawn = false
}
}
public zp_round_started(id)
{
if(id == MODE_INFECTION)
{
allow_respawn = true
}
}
public cmd_respawn(id)
{
if(allow_respawn)
{
if(!is_user_alive(id))
{
zp_respawn_user(id, ZP_TEAM_ZOMBIE)
return PLUGIN_HANDLED
}
}
else if(!allow_respawn)
{
zp_colored_print(id, "!g[ZP] !yO comando !t/reviver !yso e valido em modo de infeccao.")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
stock zp_colored_print(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Chat Verde
replace_all(msg, 190, "!y", "^1") // Chat Normal
replace_all(msg, 190, "!t", "^3") // Chat Do Time Tr=Vermelho Ct=Azul Spec=Branco
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o tema • Voltar para a ficha do tema