Spoiler
#include <amxmodx>
#include <hamsandwich>
#define VERSION "1.0"
#define TASK_RESPAWN 1337
#define TIME_TO_RESPAWN 10
#define VIP_FLAG ADMIN_LEVEL_H
#define TEXT[] "Napis nad odliczaniem"
new odliczanie[33];
public plugin_init()
{
register_plugin("DeatMatch", VERSION, "kisiel96")
register_event("DeathMsg", "DeathMsg", "a");
}
public DeathMsg()
{
new victim = read_data(2);
odliczanie[victim] = TIME_TO_RESPAWN;
if(task_exists(victim + TASK_RESPAWN))
{
remove_task(victim + TASK_RESPAWN);
}
if(get_user_flags(victim) & VIP_FLAG && is_user_connected(victim))
{
ExecuteHamB(Ham_CS_RoundRespawn, victim);
return PLUGIN_CONTINUE;
}
if(!task_exists(victim + TASK_RESPAWN))
{
set_task(1.0, "Respawn", victim + TASK_RESPAWN, _, _, "a", TIME_TO_RESPAWN);
}
return PLUGIN_CONTINUE;
}
public Respawn(task_id)
{
new id = task_id - TASK_RESPAWN;
odliczanie[id]--;
set_hudmessage(255, 0, 0, -1.0, 0.20, 1, 1.1, 1.1, 1.1, 1.1)
show_hudmessage(id, "%s^nOdrodzisz sie za %d sekund^nNie chcesz czekac? Kup FastRespawn", TEXT[], odliczanie[id]);
if(odliczanie[id] <= 0 && is_user_connected(id))
ExecuteHamB(Ham_CS_RoundRespawn, id);
}
No i niestety coś w nim namieszałem, gdyż crashuje mi serwer Jakieś pomysły?