TextDraw Help
#1

How do I show my score to the screen?
I want to show it with the text "Score: %"
How can I do that?
Reply
#2

Anyone plz reply... I give +rep each person
Reply
#3

pawn Код:
"Score:%i", GetPlayerScore(playerid));
Example:
pawn Код:
//Using zcmd.
COMMAND:myscore(playerid,params[])
{
   SendClientMessage(playerid, 0xFF0000, "Score:%i, GetPlayerScore(playerid));
Reply
#4

I mean textdraw, not that. But thanks.
Reply
#5

How?
Reply
#6

pawn Код:
public OnPlayerUpdate(playerid) {
new string[256];
format(string, sizeof(string),"Scores:%d",GetPlayerScore(playerid));
TextDrawSetString(/*yourtextdraw*/,string);
return 1;
}
Reply
#7

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
pawn Код:
public OnPlayerUpdate(playerid) {
new string[256];
format(string, sizeof(string),"Scores:%d",GetPlayerScore(playerid));
TextDrawSetString(/*yourtextdraw*/,string);
return 1;
}
Just my input on this, the string doesn't need to be 256 cells, he is only displaying the players score. Also, I suggest not placing this under OnPlayerUpdate as I doubt the players score is going to get updated that many times a second, I suggest creating a timer that can be called every 5+ seconds to update the textdraw.
Reply
#8

But. do I need to place it at OnGameModeInit?
Reply
#9

What do i need to put here
Код:
/*yourtextdraw*/
Reply
#10

Your textdraw's Name
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)