question
#1

how i can make the text draw with player score ?

i mean somewhere on screen is textdraw with player score how i can make that ?
Reply
#2

Here:

Код:
new Text:Textdraw1;
public OnGameModeInit()
Код:
new string[124];

format(string,sizeof(string),"Score 0");
Textdraw1 = TextDrawCreate(542.000000,433.000000,string);
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawFont(Textdraw1,3);
TextDrawLetterSize(Textdraw1,0.299999,1.000000);
TextDrawColor(Textdraw1,0xffffffff);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw1,1);
public OnplayerConnect(playerid);
Код:
TextDrawShowForPlayer(playerid,Textdraw1);
new string[124];
new score = GetPlayerScore(playerid);
format(string,sizeof(string),"score %d", score);
TextDrawSetString(Textdraw1,string);
In a 1 secsond timer

Код:
for(new i = 0; i < MAX_PLAYERS; i++)
new string[124];
new score = GetPlayerScore(i);
format(string,sizeof(string),"Score %d", score);
Tell me if thats it what you wanted
Reply
#3

◄╝J.Bull╚►, you're code is wrong.

It should be for all players:
pawn Код:
new Text:Textdraw1[MAX_PLAYERS];

TextDrawShowForPlayer(playerid,Textdraw1[playerid]);

// and so on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)