Здравствуйте, есть плагин который воскрешает игроков при заходе на сервер, но есть нюанс: Воскрешает во всех раундов.
Можно как-то сделать, что бы не воскрешала в раундах: Немезиды, Выживший, Куча на Кучу и Эпидемия.
Код:
#include <amxmodx>
#include <zombieplague>
#define TASK_TIME 2.0
new g_TeamJoin[33]
new SayText
public plugin_init()
{
register_plugin("[ZP]Auto-Respawn","1.1","LuqqasBugsy&Hattrick")
register_dictionary("zp_auto_respawn.txt")
register_event("TeamInfo","fwPlayerJoinedTeam","a","2=TERRORIST","2=CT")
SayText = get_user_msgid("SayText")
}
public client_connect(id)
{
g_TeamJoin[id] = 0
}
public fwPlayerJoinedTeam()
{
static id
id=read_data(1)
if(!g_TeamJoin[id])
g_TeamJoin[id] = 1
else
{
g_TeamJoin[id] = 0
set_task(TASK_TIME,"respawn_player",id)
}
}
public respawn_player(id)
{
//print_col_chat ( id, "^4[ZP]^1 %L", LANG_PLAYER, "YOU_HAVE_BEEN_REVIVED" )
if ( zp_is_nemesis_round () )
zp_respawn_user ( id, ZP_TEAM_HUMAN )
else
zp_respawn_user ( id, ZP_TEAM_ZOMBIE )
}
stock print_col_chat(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^4"); // Green Color
replace_all(msg, 190, "!y", "^1"); // Default Color (ó©° æ¹«î¼©)
replace_all(msg, 190, "!t", "^3"); // Team Color
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, SayText, _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Отредактировал: Nolkeee, - 29.6.2018, 13:51