How to..
#1

How to know a Timer ID?

So i can KillTimer it :S
Reply
#2

new Timer;
Timer = SetTimer();
KillTimer(Timer);

That may not be correct. Doing it strictly from memory, haven't used pawn in a while. A bit rusty xD
You can change,
new Timer; to what ever name.
Then just do, KillTimer(NameYouChoose);
Reply
#3

Ermm... Both things didn't worked
Reply
#4

What does your current code look like?
Reply
#5

Up of all..
Код:
forward JobCash(playerid);
In a callback..
Код:
JobCash = SetTimerEx("CashJob",5000,true,"i",playerid);
In another callback
Код:
KillTimer(JobCash);  // Here is an error
Reply
#6

Quote:
Originally Posted by Lynn
Посмотреть сообщение
new Timer;
Nah, in your code you used forward for the timer name.
Reply
#7

pawn Код:
forward JobCash(playerid);

new PlayerJobTimer[MAX_PLAYERS];


PlayerJobTimer[playerid] = SetTimerEx("JobCash",5000,true,"i",playerid);


public JobCash(playerid)
{
//Here
}

KillTimer(PlayerJobTimer[playerid]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)