CMD:SaveStats(playerid, params[])
{
SendClientMessage(playerid,COLOR_GREEN,"Successful Saved");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Score",GetPlayerScore(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Wanted",GetPlayerWantedLevel(playerid));
INI_Close(File);
return 1;
}
|
forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Score",PlayerInfo[playerid][pScore]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Admin",PlayerInfo[playerid][pAdmin]); INI_Int("Kills",PlayerInfo[playerid][pKills]); INI_Int("Deaths",PlayerInfo[playerid][pDeaths]); INI_Int("Wanted",PlayerInfo[playerid][pWanted]); return 1; } |
|
public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)) ; INI_WriteInt(File,"Score",GetPlayerScore(playerid) ); INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]); INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]); INI_WriteInt(File,"Wanted",GetPlayerWantedLevel(pl ayerid)); INI_Close(File); return 1; } |
CMD:savestats(playerid, params[])
|
PHP код:
|
|
uggghh why didn't I think about that!!!!!
good good :P that the solve to ur problem fisherman ![]() |