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;
}
//NO TOPO DA GM
#include <a_samp>
new PlayerText:Score;
//NO public OnplayerConnect
public OnPlayerConnect(playerid)
{
Score = CreatePlayerTextDraw(playerid,52.0, 316.0,"");
PlayerTextDrawBackgroundColor(playerid, Score, 255);
PlayerTextDrawFont(playerid,Score, 1);
PlayerTextDrawLetterSize(playerid,Score, 0.5199, 1.6000);
PlayerTextDrawColor(playerid,Score, -1);
PlayerTextDrawSetOutline(playerid,Score, 1);
SetTimerEx("AtualizarScore", 1000, true,"i",playerid);
}
//NO FINAL DA GM
forward AtualizarScore(playerid);
public AtualizarScore(playerid)
{
new STR[26];
format(STR, 26, "~r~Level:~w~%d", GetPlayerScore(playerid));
PlayerTextDrawShow(playerid,Score);
PlayerTextDrawSetString(playerid,Score,STR);
return true;
}
error 017: undefined symbol "playerid" |