02.06.2010, 00:22
Hi I Want to know how to do /kill and wait 150 sec before do it Agian '
So please help me/Jonas4334
So please help me/Jonas4334
new PlayerKilled[MAX_PLAYERS] = 0;
if(strcmp(cmdtext, "/kill", true) == 0)
{
if(PlayerKilled[playerid] == 1)
{
SendClientMessage(playerid, COLOR, "You have to wait 150 seconds before typing this again.");
return 1;
}
SetPlayerHealth(playerid, 0;
PlayerKilled[playerid] = 1;
SetTimerEx("ResetKill",150000, false, "i", playerid);
}
forward ResetKill(playerid);
public ResetKill(playerid)
{
PlayerKilled[playerid] = 0;
return 1;
}
Originally Posted by »Shadow™«
pawn Код:
|
Originally Posted by jonas4334
Hi I Want to know how to do /kill and wait 150 sec before do it Agian '
So please help me/Jonas4334 |
new PlayerKilled[MAX_PLAYERS] = 0;
if(strcmp(cmdtext, "/kill", true) == 0) { if(PlayerKilled[playerid] == 1) { SendClientMessage(playerid, COLOR, "You have to wait 150 seconds before typing this again."); return 1; } SetPlayerHealth(playerid, 0; PlayerKilled[playerid] = 1; SetTimerEx("ResetKill",150000, false, "i", playerid); }
forward ResetKill(playerid); public ResetKill(playerid) { PlayerKilled[playerid] = 0; return 1; }