How can i make that players freeze when they exit interiors. - 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)
+--- Thread: How can i make that players freeze when they exit interiors. (
/showthread.php?tid=285990)
How can i make that players freeze when they exit interiors. -
Feel - 26.09.2011
Title says it all.
Re: How can i make that players freeze when they exit interiors. - [L3th4l] - 26.09.2011
Please use the wiki next time!
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange
pawn Код:
public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
if(newinteriorid == 0)
{
TogglePlayerControllable(playerid, false);
SetTimerEx("Unfreeze", 5000, false, "i", playerid);
}
}
forward Unfreeze(playerid);
public Unfreeze(playerid)
{
TogglePlayerControllable(playerid, true);
return 1;
}
Re: How can i make that players freeze when they exit interiors. -
aRoach - 26.09.2011
Feel, use the thing i gaved you

!
Re: How can i make that players freeze when they exit interiors. -
Xyrex - 26.09.2011
Not tested.
pawn Код:
public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
if(newinteriorid == 0)
TogglePlayerControllable(playerid,0);
return 1;
}
Re: How can i make that players freeze when they exit interiors. -
Feel - 26.09.2011
Alright, i did it and it worked, Now i have only one small request. How do i make that cars wont fall thro the map? I really need that badly, becouse i cant respawn cars every 5 minutes -.-
Re: How can i make that players freeze when they exit interiors. -
Feel - 26.09.2011
Help
Re: How can i make that players freeze when they exit interiors. -
aRoach - 26.09.2011
Well if you want, I can make you a Vehicle Streamer ! ( It's Better, The Official Creator is Zh3r0 )
Re: How can i make that players freeze when they exit interiors. -
andrew4699 - 26.09.2011
Set a timer to spawn the cars 2 seconds after the objects.