SetPlayerHealth problems
#8

Quote:
Originally Posted by Abagail
Посмотреть сообщение
If you are using something like SmokeCommand[playerid] = 1 it would be...

CMDtopsmoking(playerid, params[])
{
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.
I was thinking about adding some anti nicotine gum with a command like /eatgum and it would have a chance of working..
The timer:
pawn Код:
SetTimerEx("Timer",60000,1,"i",playerid);
The forward n stuff:
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
}
Would it work if I placed this under the eatgum cmd KillTimer(Timer);?
Reply


Messages In This Thread
SetPlayerHealth problems - by Zens - 27.04.2014, 21:01
Re: SetPlayerHealth problems - by ikkentim - 27.04.2014, 21:05
Re: SetPlayerHealth problems - by Konstantinos - 27.04.2014, 21:06
Re: SetPlayerHealth problems - by Zens - 27.04.2014, 21:09
Re: SetPlayerHealth problems - by Abagail - 27.04.2014, 21:20
Re: SetPlayerHealth problems - by Zens - 27.04.2014, 21:28
Re: SetPlayerHealth problems - by Abagail - 27.04.2014, 21:34
Re: SetPlayerHealth problems - by Zens - 27.04.2014, 21:44

Forum Jump:


Users browsing this thread: 3 Guest(s)