How to update objects when player teleport
#1

im using incognitos streamer and when i teleport to somewhere (on the sky) i start to flying,

how to make objects update/refresh when i teleport so i cant fall down ?
Reply
#2

Freeze player with a timer for 5 secs. It will be enough for objects load.
Reply
#3

can you make this here please ?
Reply
#4

pawn Код:
stock Pause(playerid)
{
        TogglePlayerControllable(playerid,false);
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        SetPlayerPos(playerid,x,y,z+1.5);
        SetTimerEx("UnfreezePlayer", 5000, false, "i", playerid);

}


forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid)
{  
    TogglePlayerControllable(playerid, 1)
}
How to use it?
Код:
Pause(playerid);
SetPlayerPos(...);
Reply
#5

just use (streamer functions - can be found in the streamer.inc)
pawn Код:
native Streamer_Update(playerid);
native Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
which load the items directly (without waiting for the next tic)

If you use Streamer_Update than you need to put it after SetPlayerPos since it updates the objects at there current position
So I suggest to use Streamer_UpdateEx with the new coordinates
Reply
#6

im using incognitos streamer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)