How to update objects when player teleport - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to update objects when player teleport (
/showthread.php?tid=233762)
How to update objects when player teleport -
Gotti_ - 02.03.2011
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 ?
Respuesta: How to update objects when player teleport -
Code8976Man - 02.03.2011
Freeze player with a timer for 5 secs. It will be enough for objects load.
Re: How to update objects when player teleport -
Gotti_ - 02.03.2011
can you make this here please ?
Respuesta: How to update objects when player teleport -
Code8976Man - 02.03.2011
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(...);
AW: How to update objects when player teleport -
Nero_3D - 02.03.2011
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
Re: How to update objects when player teleport -
Gotti_ - 02.03.2011
im using incognitos streamer