My timed kill command isn't working.
#6

here you go i help you

Top On Your Script: new killplayertimer[MAX_PLAYERS];

YCMD:killme(playerid, params[])
{
if(gPlayerLoggedIn[playerid] == 0) return 1;
{
SendClientMessage(playerid, COLOR_LIGHTRED,"Warning: You will get self-killed after 10-15 seconds...");
killplayertimer[playerid] = SetTimerEx("killedplayer", 14000, 0, "d", playerid);
TogglePlayerControllable(playerid, 0);
}
return 1;
}

On your Killedplayer Function set:

forward Killedplayer(playerid);
public Killedplayer(playerid)
{
KillTimer(killplayertimer[playerid]);
SetPlayerHealth(playerid, 0 );
}
Reply


Messages In This Thread
My timed kill command isn't working. - by PlayHard - 31.12.2011, 14:36
Re: My timed kill command isn't working. - by Mosslah - 31.12.2011, 14:40
Re: My timed kill command isn't working. - by suhrab_mujeeb - 31.12.2011, 14:40
Re: My timed kill command isn't working. - by Norck - 31.12.2011, 14:41
Re: My timed kill command isn't working. - by suhrab_mujeeb - 31.12.2011, 14:43
Re: My timed kill command isn't working. - by NeverKnow - 31.12.2011, 14:47
Re: My timed kill command isn't working. - by FireCat - 31.12.2011, 14:48
Re: My timed kill command isn't working. - by NeverKnow - 31.12.2011, 14:49
Re: My timed kill command isn't working. - by Norck - 31.12.2011, 14:50
Re: My timed kill command isn't working. - by PlayHard - 31.12.2011, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)