Textdraw Score?
#1

Hey, i wanna to create a textdraw with score like kills: 0

Every time the player kill some one the 0 change to 1 then 2 then..

So how can i do it?

This is the line i have it

PlayerInfo[playerid][Kills] = dini_Int(file, "Kills");

I wanna to put it on text draw
Reply
#2

pawn Код:
new TextDraw:welcomeText[MAX_PLAYERS];

TextDraw[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Kills : %d",PlayerInfo[playerid][Kills]);
PlayerTextDrawShow(playerid, welcomeText[playerid]);
Reply
#3

(443) : error 017: undefined symbol "TextDraw"
(443) : error 017: undefined symbol "playerid"
(443) : error 029: invalid expression, assumed zero
(443) : fatal error 107: too many error messages on one line

Reply
#4

Aviv_Raj, you CANNOT use that in a function, also the tag is PlayerText:my_Var, not TextDraw.
You have to use TextDrawSetString(....);
pawn Код:
new PlayerText:welcomeText[MAX_PLAYERS];

TextDraw[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Kills ");
new st[10];
format(st, 10, "Kills: %d", PlayerInfo[playerid][Kills]);
PlayerTextDrawSetString(TextDraw[playerid], st);
PlayerTextDrawShow(playerid, welcomeText[playerid]);
Reply
#5

Same

In GameModeInit right?
Reply
#6

No. OnPlayerConnect, because you are using a 'playerid' parameter which cannot be accessed under OnGameModeInit.
Reply
#7

TextDraw[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Kills ")

The same omg
Reply
#8

So what can i do now?
Reply
#9

Rajat has told you correctly dude.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)