20.03.2014, 22:06
pawn Код:
// On top of script:
new Text:Textdraw0[MAX_PLAYERS];
// In OnGameModeInit prefferably, we procced to create our textdraws:
for(new i; i < MAX_PLAYERS; i++)
{
Textdraw0[i] = TextDrawCreate(311.000000, 348.000000, "0");
TextDrawBackgroundColor(Textdraw0[i], 255);
TextDrawFont(Textdraw0[i], 1);
TextDrawLetterSize(Textdraw0[i], 0.500000, 1.800000);
TextDrawColor(Textdraw0[i], -65281);
TextDrawSetOutline(Textdraw0[i], 0);
TextDrawSetProportional(Textdraw0[i], 1);
TextDrawSetShadow(Textdraw0[i], 1);
}
pawn Код:
public OnPlayerUpdate(playerid)
{
new string[256];
format(string,sizeof(string),"~w~%d",GetPlayerScore(playerid));
TextDrawSetString(Textdraw0[playerid],string);
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
return 1;
}