Freeze entering - 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: Freeze entering (
/showthread.php?tid=240209)
Freeze entering -
Vlad_Dubonos - 15.03.2011
Hello,
I want ask if you have some [fs] when i enter in some Intrior its freeze me for 3-4 sec or black screen something
like that
Thanks to helper's
Re: Freeze entering -
Serbish - 15.03.2011
This callback will help you.
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange
Also, when the callback is called you should freeze the player with
pawn Код:
TogglePlayerControllable(playerid, 0);
and put a timer to unfreeze
pawn Код:
TogglePlayerControllable(playerid, 1);
the player.
EDIT: Help for timers:
https://sampwiki.blast.hk/wiki/SetTimer
Re: Freeze entering -
Vlad_Dubonos - 15.03.2011
Thanks
Re: Freeze entering -
SkizzoTrick - 15.03.2011
Here is the timer :
pawn Код:
public OnPlayerInteriorChange(...)
{
TogglePlayerControllable(playerid,0);
SetTimerEx("Unfreeze",3000,false,"i",playerid);//Change 3000 with whatever you want
return 1;
}
public Unfreeze(playerid)
{
TogglePlayerControllable(playerid,1);
return 1;
}