Streamer Freeze Player and loadobjects first
#1

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
Reply
#2

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

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

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);
}
Reply
#5

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)