Setting Player Pos
#1

Solved
Reply
#2

Set a timer (non-repeated) at 1500 ms on "onplayerspawn" and see what you get
Reply
#3

Try to use https://sampwiki.blast.hk/wiki/SetSpawnInfo.
Reply
#4

You want the spawn position to be 2531.3379,-1665.7101,15.1674?

Why not just assign the values directly to the enum?

SaveMyPos[playerid][x] = 2531.3379;
SaveMyPos[playerid][y] = -1665.7101;
SaveMyPos[playerid][z] = 15.1674;
Reply
#5

GetPlayerPos is actually called when the player is still at his/her old pos, because SetPlayerPos takes some time to set the pos of the player.
That's why GetPlayerPos will get in your case the pos BEFORE SetPlayerPos was executed completely.
Reply
#6

pawn Код:
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SaveMyPos[playerid][x] = X;
SaveMyPos[playerid][y] = Y;
SaveMyPos[playerid][z] = Z;
SetPlayerPos(playerid,2531.3379,-1665.7101,15.1674);
SetPlayerFacingAngle(playerid,91.2278);
Order is important.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)