[Tutorial] Login / Register System Using Southclaw's INI System!
#10

Quote:
Originally Posted by nogh445
Посмотреть сообщение
For me the x, y, and z positions keep going back to 0.00000 in my player file when I /q
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(fexist(UserPath(playerid)))
    {
        GetPlayerPos(playerid, PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosY], PlayerInfo[playerid][PosZ]);
        GetPlayerFacingAngle(playerid, PlayerInfo[playerid][PosA]);
        file_Open(UserPath(playerid));
        file_SetVal("Admin", PlayerInfo[playerid][Admin]);
        file_SetVal("Health", PlayerInfo[playerid][Health]);
        file_SetVal("Armor", PlayerInfo[playerid][Armor]);
        file_SetVal("Money", PlayerInfo[playerid][Money]);
        file_SetVal("Skin", PlayerInfo[playerid][Skin]);
        file_SetVal("Level", PlayerInfo[playerid][Level]);
        file_SetVal("Banned", PlayerInfo[playerid][Banned]);
        file_SetFloat("Posx", PlayerInfo[playerid][Posx]);
        file_SetFloat("Posy", PlayerInfo[playerid][Posy]);
        file_SetFloat("Posz", PlayerInfo[playerid][Posz]);
        file_Close();
    }
    return 1;
}
This is on player disconnect..
I'm not sure why it is not saving them.
You should get the player's position, i edited the code above check it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)