Timer...
#3

Easy.
pawn Код:
new Timer[MAX_PLAYERS];//We'll use this to kill the timer,The reason why there is MAX_PLAYER is because the timer will start for each player, not in global
pawn Код:
Timer[playerid] = SetTimerEx("MyTimer",500,1,"i",playerid);//This will the timer only for the player.
//This is where most scripters fuck up, you should use SetTimerEx in case you want it to start only for the player
pawn Код:
forward MyTimer(playerid);
public MyTimer(playerid)
{
//if(meter[playerid] == 1)//Assuming you used a variable to detect if the meter is true or false
{
//this is the part where you should cost him money, maybe Money[playerid] ++;?
}
//else if(meter[playerid] == 0)//If the meter isn't true.
{
KillTimer(Timer[playerid]);
//That will simply kill the timer.
}
Reply


Messages In This Thread
Timer... - by Phil_Cutcliffe - 27.02.2013, 09:43
Re: Timer... - by Scrillex - 27.02.2013, 09:58
Re: Timer... - by DaRk_RaiN - 27.02.2013, 10:09
Re: Timer... - by Phil_Cutcliffe - 27.02.2013, 10:43

Forum Jump:


Users browsing this thread: 1 Guest(s)