Seek solution. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Seek solution. (
/showthread.php?tid=152340)
Seek solution. -
antoine53 - 03.06.2010
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);
....
}
Re: Seek solution. -
ViruZZzZ_ChiLLL - 03.06.2010
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;
}
Re: Seek solution. -
antoine53 - 05.06.2010
The
bug on spawn, but if doesn't work
Re: Seek solution. -
DJDhan - 05.06.2010
Quote:
Originally Posted by antoine53
The bug on spawn, but if doesn't work
|
What? Use the code that Viruzz gave you. There shouldn't be any problems.
Re: Seek solution. -
antoine53 - 05.06.2010
SetTimerEx("TogglePlayerControllable", 2000,
0, "i",playerid);
TogglePlayerControllable(playerid,
0);
Isn't it odd?
Re: Seek solution. -
MadeMan - 05.06.2010
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;
}
Re: Seek solution. -
ViruZZzZ_ChiLLL - 05.06.2010
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
Re: Seek solution. -
antoine53 - 06.06.2010
Thanks 'MadeMan'.
'ViruZZzZ_ChiLLL' is
Код:
TogglePlayerControllable(playerid, 0);
SetTimerEx("UnFreeze", 2000, 0, "i", playerid);
no
Код:
SetTimerEx("Unfreeze", 2000, 0, "i",playerid);
TogglePlayerControllable(playerid, 0);