Textdraw Score? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw Score? (
/showthread.php?tid=430223)
Textdraw Score? -
JimmyNeonHD - 13.04.2013
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
Re: Textdraw Score? -
Avi Raj - 13.04.2013
pawn Код:
new TextDraw:welcomeText[MAX_PLAYERS];
TextDraw[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Kills : %d",PlayerInfo[playerid][Kills]);
PlayerTextDrawShow(playerid, welcomeText[playerid]);
Re: Textdraw Score? -
JimmyNeonHD - 13.04.2013
(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
Re: Textdraw Score? -
RajatPawar - 13.04.2013
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]);
Re: Textdraw Score? -
JimmyNeonHD - 13.04.2013
Same
In GameModeInit right?
Re: Textdraw Score? -
RajatPawar - 13.04.2013
No. OnPlayerConnect, because you are using a 'playerid' parameter which cannot be accessed under OnGameModeInit.
Re: Textdraw Score? -
JimmyNeonHD - 13.04.2013
TextDraw[playerid] = CreatePlayerTextDraw(playerid, 240.0, 580.0, "Kills ")
The same omg
Re: Textdraw Score? -
JimmyNeonHD - 13.04.2013
So what can i do now?
Re: Textdraw Score? -
Isolated - 13.04.2013
Rajat has told you correctly dude.