05.05.2013, 12:36
pawn Код:
new KillCommandTime[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
if(GetTickCount() - KillCommandTime[playerid] > 300000)
{
KillComandTime[playerid] = GetTickCount();
SetPlayerHealth(playerid, 0);
GameTextForPlayer(playerid, "~w~Grim Reaper~n~~r~Has Taken Your Soul!", 4500, 2);
KillCommandTime[playerid] = GetTickCount();
}
return 1;
}
}
public OnPlayerDisconnect(playerid)
{
KillCommandTime[playerid] = 0;
}