Seek solution.
#1

Good evening,

I have minor problems of script.
At the time of the spawn, I spent a time of freeze so that the mapping load. But at the end of the timer, the character is not unfreeze.
Have you to it solution, thank you in advance.

Код:
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid,0);
SetTimerEx("TogglePlayerControllable",2000,1,"1",playerid);
....
}
Reply
#2

This should work :
pawn Код:
public OnPlayerSpawn(playerid)
{
 SetTimerEx("Unfreeze", 2000, 0, "i",playerid);
 TogglePlayerControllable(playerid, 0);
 return 1;
}

forward UnFreeze(playerid);
public UnFreeze(playerid)
{
   TogglePlayerControllable(playerid, 1);
   return 1;
}
Reply
#3

The
Код:
return 1;
bug on spawn, but if doesn't work
Reply
#4

Quote:
Originally Posted by antoine53
The
Код:
return 1;
bug on spawn, but if doesn't work
What? Use the code that Viruzz gave you. There shouldn't be any problems.
Reply
#5

SetTimerEx("TogglePlayerControllable", 2000, 0, "i",playerid);
TogglePlayerControllable(playerid, 0);

Isn't it odd?
Reply
#6

This should work

pawn Код:
forward UnFreeze(playerid);
public UnFreeze(playerid)
{
    TogglePlayerControllable(playerid, 1);
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    TogglePlayerControllable(playerid, 0);
    SetTimerEx("UnFreeze", 2000, 0, "i", playerid);
    return 1;
}
Reply
#7

Oops, sorry my mistakes :
it shouldn't bee SetTimerEx("TogglePlayerControllable"....)
and public unfreeze() should return 1; sorry.

Edited my last post, it should work too
Reply
#8

Thanks 'MadeMan'.

'ViruZZzZ_ChiLLL' is
Код:
TogglePlayerControllable(playerid, 0);
SetTimerEx("UnFreeze", 2000, 0, "i", playerid);
no
Код:
 SetTimerEx("Unfreeze", 2000, 0, "i",playerid);
 TogglePlayerControllable(playerid, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)