Timer Problem.
#1

Code:
forward unfreezetimer(playerid);

public unfreezetimer(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pJailed] == 1)
	    {
            TogglePlayerControllable(playerid, 1);
            return true;
		}
	}
	return true;
}
And at the command i put:

Code:
SetTimerEx("unfreezetimer",2000,0,"d",playerid);
The problem: I get freeze but i don't get unfreeze after 2 seconds..
Reply
#2

If the timer is activated by a variable you should set the timer to repeat every so often and then reset the variable. Proberly a better way of doing it.
Reply
#3

i dont get why you do settimerex because i use settimer it works fine for me
Reply
#4

No work. Another solution.

@hadzx: i did'n see your reply. I will test now.
Reply
#5

I've tested, no work.. Same thing.. I don't get unfreeze.
Reply
#6

Quote:
Originally Posted by hadzx
View Post
i dont get why you do settimerex because i use settimer it works fine for me
He has a param within his callback, so it is easier to use SetTimerEx.

Quote:
Originally Posted by GaB1TzZzu
View Post
No work. Another solution.
The problem must lie within the variable you are checking. Make sure it is being set to '1' before the timer to unfreeze the player is activated.
Reply
#7

Quote:
Originally Posted by Infamous
View Post
The problem must lie within the variable you are checking. Make sure it is being set to '1' before the timer to unfreeze the player is activated.
I don't understand what you said..
Reply
#8

Quote:
Originally Posted by GaB1TzZzu
View Post
I don't understand what you said..
Are you setting this bit (Code Below) to 1 before you run your timer?

pawn Code:
if(PlayerInfo[playerid][pJailed] == 1)
Reply
#9

just tryed a settimer instead of settimerex nd i got a error playerid undefined so timers dont work for me now lol
Reply
#10

I edited to:

Code:
public unfreezetimer(playerid)
{
	TogglePlayerControllable(playerid, 1);
	return true;
}
No work..
Reply
#11

ffs i keep gettin this error

Код:
: warning 235: public function lacks forward declaration (symbol "message")
Reply
#12

Wrong topic?
Reply
#13

Quote:
Originally Posted by GaB1TzZzu
Посмотреть сообщение
Wrong topic?
naw i tryed his code and then tryed it a different way lol


EDIT: yeah the way i tryed worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)