Position Saver - 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: Position Saver (
/showthread.php?tid=438451)
Position Saver -
Akcent_Voltaj - 20.05.2013
I made the position save so if he logs out and log in at same position,But if he dies in interior: 0 and dies then he falls through interior ...
AW: Position Saver -
HurtLocker - 20.05.2013
You have to add a 4th variable which drags the interior id on disconnect. Like if you have already Pos[3] make it Pos[4] and on playerdisconnect: Pos[3]=GetPlayerInterior(playerid);
EDIT: I suppose you defined Pos[3] like Float:Pos[3] so the interior id cannot be saved in any of this array's cell since its integer. So create a different variable to save the interior id
Re: Position Saver -
Akcent_Voltaj - 20.05.2013
look.if I relog with interior 6 that's good.but if I die in interior 0 or diffrent interior I fall through interior..
PS:OnPlayerDisconnect
PHP код:
new Float: X, Float: Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
GetPlayerInterior(playerid);
PlayerInfo[playerid][pPos_x] = X;
PlayerInfo[playerid][pPos_y] = Y;
PlayerInfo[playerid][pPos_z] = Z
;
EDIT: I don't know how!