27.04.2014, 21:44
Quote:
If you are using something like SmokeCommand[playerid] = 1 it would be...
CMD ![]() { if(SmokeCommand[playerid] == 0) return SendClientMessage(playerid, -1, "You're not even smoking..."); SmokeCommand[playerid] = 0; SendClientMessage(playerid, -1, "You have stopped smoking."); return 1; } Then stop the timer. |
The timer:
pawn Код:
SetTimerEx("Timer",60000,1,"i",playerid);
pawn Код:
forward Timer(playerid); // Tell the server that "Timer" is a public function
public Timer(playerid)
{
new Float:hp; // Create a float value where we will store the players HP
GetPlayerHealth(playerid,hp); // Get players health and store it inside "hp"
SetPlayerHealth(playerid,hp-1); // Set Players health to their current health (hp) minus 1
}