18.07.2010, 00:09
Hello, I got a problem with my XP system.. When i go to my accounts directory and set my XP to like 100 then join the server, it loads but when i disconnect it dosent save for some reason...
My code:
^^ OnPlayerDisconnect
^^ The timer that never ends - ( for updating the status of XP ) and that timer in on the login section..
Does anyone know how to fix this
Help xD
My code:
pawn Код:
if(dini_Exists(file))
{
dini_IntSet(file, "XP", PlayerInfo[playerid][pXP]);
}
pawn Код:
forward PlayerXPTimer(playerid);
public PlayerXPTimer(playerid)
{
if(gPlayerLogged[playerid] == 1)
{
new file[128];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), ACC_FOLDER, pname);
new string[128];
TextDrawHideForPlayer(playerid, TDSTATS[playerid]);
format(string, sizeof(string), "~p~XP:%d", dini_Int(file, "XP"));
TextDrawSetString(TDSTATS[playerid], string);
TextDrawShowForPlayer(playerid, TDSTATS[playerid]);
}
}
Does anyone know how to fix this
Help xD