08.07.2010, 04:20
Hi everybody, i was doing up my xp system and suddenly i realized something wrong.
When i Log in it shows the Xp Textdraw But when i /q and rejoin the textdraw appears still without being logged in.
I tryed killing the timer at OnPlayerDisconnect but it just dont work for some reason...
Ok ill point out my codes..
^^ where the login part is..
^^^ The Timer that contributes to the login part.
^^^ public OnPlayerDisconnect(playerid, reason)
Please help, im not sure whats wrong here.
When i Log in it shows the Xp Textdraw But when i /q and rejoin the textdraw appears still without being logged in.
I tryed killing the timer at OnPlayerDisconnect but it just dont work for some reason...
Ok ill point out my codes..
pawn Код:
XPTDLoad(playerid);
SetTimerEx("PlayerXPTimer", 100, true, "d", playerid);
PlayerInfo[playerid][pExp] = dini_Int(file,"XP");
pawn Код:
forward PlayerXPTimer(playerid);
public PlayerXPTimer(playerid)
{
new string[128];
TextDrawHideForPlayer(playerid, TDSTATS[playerid]);
format(string, sizeof(string), "~p~XP:%d", GetPlayerXP(playerid));
TextDrawSetString(TDSTATS[playerid], string);
TextDrawShowForPlayer(playerid, TDSTATS[playerid]);
}
pawn Код:
KillTimer(PlayerXPTimer(playerid));
Please help, im not sure whats wrong here.