15.06.2012, 00:22
Top of your script:
Under OnPlayerDisconnect:
Under OnPlayerSpawn:
Under your Login System:
Under your load function:
This is how it works for me.
pawn Код:
new
Float: PosX[MAX_PLAYERS],
Float: PosY[MAX_PLAYERS],
Float: PosZ[MAX_PLAYERS],
Float: Angle[MAX_PLAYERS]
pawn Код:
GetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]);
GetPlayerFacingAngle(playerid,Angle[playerid]);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteFloat(File,"PositionX",PosX[playerid]);
INI_WriteFloat(File,"PositionY",PosY[playerid]);
INI_WriteFloat(File,"PositionZ",PosZ[playerid]);
INI_WriteFloat(File,"Angle",Angle[playerid]);
INI_Close(File);
pawn Код:
if(PosX[playerid] !=0 && PosY[playerid] !=0 && PosZ[playerid] !=0 && Angle[playerid] != 0)
{
SetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]);
SetPlayerFacingAngle(playerid,Angle[playerid]);
}
pawn Код:
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin],PosX[playerid],PosY[playerid],PosZ[playerid],Angle[playerid], 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
pawn Код:
INI_Float("PositionX",PosX[playerid]);
INI_Float("PositionY",PosY[playerid]);
INI_Float("PositionZ",PosZ[playerid]);
INI_Float("Angle",Angle[playerid]);