03.01.2011, 20:16
So this should save also the positions when i log out
But when i log out, the positions don't change.. they stay at the default ones
Код:
public OnPlayerDisconnect(playerid, reason) { new Float:Angle, Float:x, Float:y, Float:z; new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(gPlayerLogged[playerid] == 1) { GetPlayerPos(playerid, x, y, z); dini_IntSet(file, "Score", GetPlayerScore(playerid)); dini_IntSet(file, "Money", GetPlayerMoney(playerid)); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]); dini_IntSet(file, "PlayerFace", GetPlayerFacingAngle(playerid, Angle)); dini_FloatSet(file, "PosX", x); dini_FloatSet(file, "PosY", y); dini_FloatSet(file, "PosZ", z); dini_IntSet(file, "Skin", GetPlayerSkin(playerid)); } gPlayerLogged[playerid] = 0; return 1; }