Freeze player and wait for map loads - 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: Freeze player and wait for map loads (
/showthread.php?tid=331559)
Freeze player and wait for map loads -
SkyWings - 05.04.2012
Hi guys, i need script, for player waiting (freeze), when map loads 2 seconds. Thanks for help.
This is teleport script:
Код:
if(listitem == 0)
{
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid), 2411.8435, 4171.2080, 54.3416);
else SetPlayerPos(playerid,2411.8435, 4171.2080, 54.3416);
SendClientMessage(playerid, BLUE, "Long race zone");
ResetPlayerWeapons(playerid);
new playerx[30];
new messagex[128];
GetPlayerName(playerid, playerx, 30);
format(zinute, 280, "%s has teleported to long race!", playerx);
SendClientMessageToAll(BLUE, messagex);
}
Re: Freeze player and wait for map loads -
Shabi RoxX - 05.04.2012
Use TTogglePlayerControllable like
pawn Код:
{//so this start of your function in which you wanna freeze player
TogglePlayerControllable(playerid,0);//this will freeze player
SetTimerEx("Unfreeze",12000,false,playerid);//timer to call function Unfreeze(playerid) 12000 is time in miliseconds
}
forward Unfreeze(playerid);
public Unfreeze(playerid)
{
TogglePlayerControllable(playerid,1);//this will unfreeze player
}
Re: Freeze player and wait for map loads -
SkyWings - 05.04.2012
Thanks.
Re: Freeze player and wait for map loads -
Scripter12345 - 05.04.2012
Quote:
Originally Posted by SkyWings
Thanks.
|
Or where ever you are making the person teleport to you could try adding