Timer Problem
#1

This only works correctly for ID 0 for some reason if ID 1 does /enter it sets ID 1 inside 177.4720,1894.8317,1149.6217
but dosn't unfreeze him only unfreezes id 0 what is causing this...

Код:
	if(strcmp(cmd, "/enter", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
            if (IsPlayerInRangeOfPoint(playerid,1.0,201.5866,1869.4396,13.1406))
            {
				SetPlayerPos(playerid,177.4720,1894.8317,1149.6217);
				TogglePlayerControllable(playerid, 0);
                SetTimer("DeMorganFreeze",2 * 1000,false);
			}
Код:
forward DeMorganFreeze(playerid);
Код:
public DeMorganFreeze(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        TogglePlayerControllable(playerid, 1);
    }
    return 1;
}
Reply
#2

pawn Код:
SetTimeExr("DeMorganFreeze",2 * 1000,false ,"i");
Instead:

pawn Код:
SetTimer("DeMorganFreeze",2 * 1000,false);
Reply
#3

C:\Documents and Settings\Owner\Desktop\SA-MP Optical\gamemodes\OGv67.pwn(20401) : error 017: undefined symbol "SetTimeExr"
Reply
#4

Nvm fixed that you made a typo anyway I replaced it with

SetTimerEx("DeMorganFreeze",2 * 1000,false ,"i");

now... it dosn't unfreeze NO ONE when they do /enter
Reply
#5

Quote:
Originally Posted by ShawnMiller1337
Посмотреть сообщение
Nvm fixed that you made a typo anyway I replaced it with

SetTimerEx("DeMorganFreeze",2 * 1000,false ,"i");

now... it dosn't unfreeze NO ONE when they do /enter
Remove the condition: IsPlayerConnected(playerid)

If it's not working, it's a bug somewhere else. Because that "must" unfreeze, according I see on the code
Reply
#6

I removed IsPlayerConnected(playerid) under public DeMorganFreeze(playerid)


Still not unfreezing...
Reply
#7

Last attempt:

pawn Код:
SetTimerEx("DeMorganFreeze", 2000, false, "i");

And:

If it's not working, it due some bug, because I had this same problem before, of time not working. For confirm if it's working add on the public of the function which will be set to: printf("working");. If shows, it's working. Otherwise, no.
Reply
#8

I added in printf("working"); on the public... it says "working" but for some reason its not unfreezing..
Reply
#9

You must pass the playerid parameter
pawn Код:
SetTimerEx("DeMorganFreeze", 2000, false, "d", playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)