What do i do wrong?
#1

So this should save also the positions when i log out
Код:
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;
}
But when i log out, the positions don't change.. they stay at the default ones
Reply


Messages In This Thread
What do i do wrong? - by Stefans94 - 03.01.2011, 20:16
Re: What do i do wrong? - by Marty_Alex - 03.01.2011, 22:27
Re: What do i do wrong? - by Stefans94 - 04.01.2011, 20:43
Re: What do i do wrong? - by alpha500delta - 04.01.2011, 20:48
Re: What do i do wrong? - by Stefans94 - 05.01.2011, 09:28
Re: What do i do wrong? - by Stefans94 - 06.01.2011, 14:43
Re: What do i do wrong? - by bartje01 - 06.01.2011, 14:49
Re: What do i do wrong? - by Calgon - 06.01.2011, 14:53
Re: What do i do wrong? - by Stefans94 - 06.01.2011, 17:46

Forum Jump:


Users browsing this thread: 1 Guest(s)