20.07.2016, 23:58
PHP код:
new Text:ScoreTextDraw[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("AtualizarScore", 1000, true);
for(new x = 0; x < MAX_PLAYERS; x++)
{
ScoreTextDraw[x] = TextDrawCreate(546.000000, 54.000000, "LEVEL:1000000");
TextDrawBackgroundColor(ScoreTextDraw[x], 255);
TextDrawFont(ScoreTextDraw[x], 2);
TextDrawLetterSize(ScoreTextDraw[x], 0.280000, 1.100000);
TextDrawColor(ScoreTextDraw[x], -1);
TextDrawSetOutline(ScoreTextDraw[x], 1);
TextDrawSetProportional(ScoreTextDraw[x], 1);
TextDrawSetSelectable(ScoreTextDraw[x], 0);
}
//__
//Final do GM
forward AtualizarScore();
public AtualizarScore()
{
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(!IsPlayerConnected(x)) continue;
new STR[26];
format(STR, 26, "~r~LEVEL: ~w~%d", GetPlayerScore(x));
TextDrawSetString(ScoreTextDraw[x], STR);
}
return true;
}