28.08.2011, 18:25
Here is code:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new Float:Facing_Angle;
new name[MAX_PLAYER_NAME], file[256];
new Float:POS_X, Float:POS_Y, Float:POS_Z;
GetPlayerPos(playerid,POS_X,POS_Y,POS_Z);
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(gPlayerLogged[playerid] == 1)
{
dini_IntSet(file, "Skin", PlayerInfo[playerid][pSkin]);
dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
dini_IntSet(file, "Dollars", GetPlayerMoney(playerid));
dini_IntSet(file, "Cents", GetPlayerCents(playerid));
dini_IntSet(file, "Pos_x", POS_X);
dini_IntSet(file, "Pos_y", POS_Y);
dini_IntSet(file, "Pos_z", POS_Z);
dini_IntSet(file, "Facing Ange", GetPlayerFacingAngle(playerid, Facing_Angle));
}
if(IsPlayerNPC(playerid)) return 1;
gPlayerLogged[playerid] = 0;
return 1;
}