02.11.2012, 09:27
You have to update it when you give them score; it doesn't automatically update. Scripts don't 'guess' how you want things to work.
Either hook SetPlayerScore or make a custom function like SetPlayerScoreEx (I'd recommend hooking SetPlayerScore).
Put this before any calls of SetPlayerScore (not every one.. once..)
I.e. just after main() {}
I'd also recommend player-textdraws for this kind of thing.
Either hook SetPlayerScore or make a custom function like SetPlayerScoreEx (I'd recommend hooking SetPlayerScore).
Put this before any calls of SetPlayerScore (not every one.. once..)
pawn Код:
stock hook_SetPlayerScore(playerid, score)
{
if(!IsPlayerConnected(playerid)) return 0;
SetPlayerScore(playerid, score);
// Update the TD here using TextDrawSetString
return 1;
}
#if defined _ALS_SetPlayerScore
#undef SetPlayerScore
#else
#define _ALS_SetPlayerScore
#endif
#define SetPlayerScore hook_SetPlayerScore
I'd also recommend player-textdraws for this kind of thing.

