18.05.2012, 09:59
Quote:
Hook the function:
pawn Код:
You need to CREATE THE PLAYER-TEXTDRAW. https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw |
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xF30000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_LIGHTBLUE 0x00D0F6AA
#define COLOR_WHITE 0xF6F6F6AA
#define COLOR_PURPLE 0xA600F6AA
#define COLOR_TUT 0xF6C861AA
#define COLOR_ROYAL 0x00C1F6AA
#define COLOR_CWHITE 0xE0FFFFAA
#define PRIVATE 0
#define CORPORAL 1
#define SERGENTEANT 2
#define CAPTAIN 3
#define BRIGADIER 4
#define GENERAL 5
new Text:Private;
new Text:Corporal;
new Text:Sergenteant;
new Text:Captain;
new Text:Brigadier;
new Text:General;
new Text:Score;
new PlayerLogged[MAX_PLAYERS];
new Rank[MAX_PLAYERS];
stock h_SetPlayerScore(playerid, score)
{
SetPlayerScore(playerid, score);
Score = TextDrawCreate(496.000000, 128.000000, "Score: ");
TextDrawBackgroundColor(Score, 255);
TextDrawFont(Score, 1);
TextDrawLetterSize(Score, 0.440000, 1.500000);
TextDrawColor(Score, 16711935);
TextDrawSetOutline(Score, 1);
TextDrawSetProportional(Score, 1);
new tdstring[24];
format(tdstring, sizeof(tdstring), "Score: ~Y~%i", score);
PlayerTextDrawSetString(playerid, TD_pScore[playerid], tdstring);
return 1;
}
#if defined _ALS_SetPlayerScore
#undef SetPlayerScore
#else
#define _ALS_SetPlayerScore
#endif
#define SetPlayerScore h_SetPlayerScore