/kill
#4

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;
}
@Rillo: A timer? That is the worst way to do it! Not to mention this SetTimerEx("KillTimer", 1000*60*5, false, "i", playerid); is more on the order of 5 minutes 30 seconds.
Reply


Messages In This Thread
/kill - by WiseRice - 05.05.2013, 12:01
Re: /kill - by WiseRice - 05.05.2013, 12:07
Re: /kill - by Rillo - 05.05.2013, 12:34
Re: /kill - by Pottus - 05.05.2013, 12:36
Re: /kill - by BigGroter - 05.05.2013, 13:23

Forum Jump:


Users browsing this thread: 1 Guest(s)