Score dosen't show?
#5

Where did you set player's score?
And also, create all of your textdraws inside OnGameModeInit
Код:
for(new i=0;i<MAX_PLAYERS;i++)
	{
Textdraw0[i] = CreatePlayerTextDraw(i, 498.398, 100.799, "Score - -=-");
	PlayerTextDrawAlignment(i, Textdraw0[i], 1);
	PlayerTextDrawColor(i, Textdraw0[i], -1);
	PlayerTextDrawSetOutline(i, Textdraw0[i], 1);
	PlayerTextDrawBackgroundColor(i, Textdraw0[i], 51);
	PlayerTextDrawFont(i, Textdraw0[i], 2);
	PlayerTextDrawSetProportional(i, Textdraw0[i], 1);
	PlayerTextDrawShow(i, Textdraw0[i]);

	Textdraw1[i] = CreatePlayerTextDraw(i, 497.600, 120.212, "Ping - -=- ms");
	PlayerTextDrawAlignment(i, Textdraw1[i], 1);
	PlayerTextDrawColor(i, Textdraw1[i], -1);
	PlayerTextDrawSetOutline(i, Textdraw1[i], 1);
	PlayerTextDrawBackgroundColor(i, Textdraw1[i], 51);
	PlayerTextDrawFont(i, Textdraw1[i], 2);
	PlayerTextDrawSetProportional(i, Textdraw1[i], 1);
    PlayerTextDrawShow(i, Textdraw1[i]);
}
And on player connect just change textdraw's string, and start a timer:
Код:
new score[16], ping[16];
	format(score, sizeof(score), "Score - %d", GetPlayerScore(playerid));
	format(ping, sizeof(ping), "Ping - %d ms", GetPlayerPing(playerid));
	PlayerTextDrawSetString(playerid, Textdraw0[playerid], score);
	PlayerTextDrawSetString(playerid, Textdraw1[playerid], ping);
        updatetimer[playerid] = SetTimerEx("update", 1000, true, "d", playerid);
EDIT: I've just found that player textdraws need to be put under on player connect. But still, you can create normal textdraws, and load score with them.
Reply


Messages In This Thread
Score dosen't show? - by Tuntun - 15.11.2013, 10:25
Re: Score dosen't show? - by Tuntun - 15.11.2013, 10:48
Re: Score dosen't show? - by Sojo12 - 15.11.2013, 11:13
Re: Score dosen't show? - by Tuntun - 15.11.2013, 11:49
Re: Score dosen't show? - by dominik523 - 15.11.2013, 12:07
Re: Score dosen't show? - by Tuntun - 15.11.2013, 12:45
Re: Score dosen't show? - by dominik523 - 15.11.2013, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)