SA-MP Forums Archive
Streamer Freeze Player and loadobjects first - 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: Streamer Freeze Player and loadobjects first (/showthread.php?tid=488323)



Streamer Freeze Player and loadobjects first - SomebodyAndMe - 17.01.2014

Hello,

Is there a way to call a function on OnPlayerSpawn that freezes the player, and then when the objects near the player has finished loading, he becomes unfrozen.

Is there a way to do this, if yes how would that be possible?

Yours sincerely,

Kevin


Re: Streamer Freeze Player and loadobjects first - SyntaxQ - 17.01.2014

http://forum.sa-mp.com/showthread.ph...=Object+loader


Re: Streamer Freeze Player and loadobjects first - Ace155 - 17.01.2014

Check out this thread https://sampforum.blast.hk/showthread.php?tid=400341


Re: Streamer Freeze Player and loadobjects first - Raza2013 - 17.01.2014

Use
pawn Код:
forward Update(); //on the top

public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid,0);
//
SetTimer("Update", 10000, false); // 10 seconds for streaming object that will be fine
    return 1;
}
//lacks
public Update()
{
   TogglePlayerControllable(playerid,1);
}



Re: Streamer Freeze Player and loadobjects first - M3HR4N - 17.01.2014

add this near stocks :
pawn Код:
stock freeze()
{
   TogglePlayerControllable(playerid, 1);
}
and add this one under onplayerspawn
pawn Код:
TogglePlayerControllable(playerid, 0);
SetTimer(freeze, 20000, false);



Re: Streamer Freeze Player and loadobjects first - Raza2013 - 17.01.2014

Quote:
Originally Posted by M3HR4N
Посмотреть сообщение
add this near stocks :
pawn Код:
stock freeze()
{
   TogglePlayerControllable(playerid, 1);
}
and add this one under onplayerspawn
pawn Код:
TogglePlayerControllable(playerid, 0);
SetTimer(freeze, 20000, false);
@Mehran
pawn Код:
SetTimer(freeze, 20000, false);
20000 = 20 seconds lol are you mad? 10 seconds will be fine