TimerEX
#1

Hello guys, so I was wondering,
how to kill/stop a TimerEx for a player?
Reply
#2

PHP код:
KillTimer(connect_timer[playerid]); 
Reply
#3

Quote:
Originally Posted by Skimmer
Посмотреть сообщение
PHP код:
KillTimer(connect_timer[playerid]); 
I tried that, but the timer kept runing
Reply
#4

How are you setting the timer? Can you show me the line?
Reply
#5

SetTimerEx("RapeEffect", RapeTimer, true, "i", playerid);
Reply
#6

Why you don't pass the id of this timer into a variable? I mean.

PHP код:
new gRapeTimer[MAX_PLAYERS];
// initialize
gRapeTimer[playerid] = SetTimerEx("RapeEffect"RapeTimertrue"i"playerid);
// to kill this timer
KillTimer(gRapeTimer[playerid]);
// Don't forget to clear the value when user leaves the server.
public OnPlayerDisconnect(playerid)
{
    ...
    
KillTimer(gRapeTimer[playerid]);
    
gRapeTimer = -1;

Reply
#7

Thank you bro
+REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)