12.09.2010, 09:29
Hello,
The stats like position don't save on disconnect, and they don't to in a timer. I know that the callback gets called, cause a message with 'It gets called' just gets called.
So it doesnt save the stats.. Ain't that weird?
Regards, Jochem
Note: everything is allright. format of file is ok.
The stats like position don't save on disconnect, and they don't to in a timer. I know that the callback gets called, cause a message with 'It gets called' just gets called.
pawn Код:
public StatsSave(playerid)
{
if(PlayerInfo[playerid][IsLogged] == 1 && PlayerInfo[playerid][IsPlayerSpawned] == 1)
{
new Playername[MAX_PLAYER_NAME];
GetPlayerRPName(playerid,Playername,sizeof(Playername));
format(file,sizeof(file),"JoAdmin/Accounts/%s.ini",Playername);
dini_IntSet(file, "Money", GetPlayerMoney(playerid));
dini_IntSet(file, "Score", GetPlayerScore(playerid));
dini_IntSet(file, "Skin", GetPlayerSkin(playerid));
GetPlayerPos(playerid,X,Y,Z);
Int = GetPlayerInterior(playerid);
dini_FloatSet(file, "PosX", X);
dini_FloatSet(file, "PosY", Y);
dini_FloatSet(file, "PosZ", Z);
dini_FloatSet(file, "Interior",Int);
dini_IntSet(file, "InJail",PlayerInfo[playerid][IsJailed]);
SendClientMessage(playerid,COLOR_WHITE," It gets called.");
}
return true;
}
Regards, Jochem
Note: everything is allright. format of file is ok.