25.12.2011, 04:59
Hello,
I have this script of saving last position:
I have it under OnPlayerDisconnect. I want to make like, when a player spawn it reads the file and sets his pos to the last pos!
I have this script of saving last position:
pawn Код:
new Float:X, Float:Y, Float:Z, Float:A, Float:I, Float:W;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid, A);// I Added this Incase you asked later // A saves Players ANGLE
I = GetPlayerInterior(playerid);// This Saves Players Interior
W = GetPlayerVirtualWorld(playerid); // This saves Players Virtual World if you plan on using it
INI_WriteFloat(File,"Health",HEALTH);
INI_WriteFloat(File,"Armour",ARMOUR);
INI_WriteFloat(File,"Posx",X);
INI_WriteFloat(File,"Posy",Y);
INI_WriteFloat(File,"Posz",Z);
INI_WriteFloat(File,"Posa",A);
INI_WriteFloat(File,"Posi",I);
INI_WriteFloat(File,"Posw",W);