Textdraw showing respect. -
lQs - 29.05.2013
Hey, i have something like this for respect textdraw:
pawn Код:
Textdraw3 = TextDrawCreate(487.000000, 98.000000, "Respect:0");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.519999, 1.600000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
And how to change this to show me pRespect? I mean:
pawn Код:
PlayerInfo[playerid][pRespect]
AW: Textdraw showing respect. -
HurtLocker - 29.05.2013
https://sampwiki.blast.hk/wiki/Format
Re: Textdraw showing respect. -
lQs - 29.05.2013
And? Lol.
Re: Textdraw showing respect. -
Konewka - 29.05.2013
pawn Код:
new string[11];
format(string, sizeof(string), "%d", PlayerInfo[playerid][pRespect]);
Textdraw3 = TextDrawCreate(487.000000, 98.000000, string);
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.519999, 1.600000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
Simple as that.
Re: Textdraw showing respect. -
lQs - 29.05.2013
Line:
pawn Код:
format(string, sizeof(string), "%d", PlayerInfo[playerid][pRespect]);
Error:
pawn Код:
error 017: undefined symbol "playerid"
Re: Textdraw showing respect. -
Konewka - 29.05.2013
So do it other way around. Put TextDrawSetString wherever you show this TextDraw to the player.
pawn Код:
new string[11];
format(string, sizeof(string), "%d", PlayerInfo[playerid][pRespect]);
TextDrawSetString(Textdraw3, string);
AW: Textdraw showing respect. -
HurtLocker - 29.05.2013
Show the textdrawshowforplayer line
Re: Textdraw showing respect. -
lQs - 29.05.2013
Okay, i created something like this:
pawn Код:
new string[30];
format(string, sizeof(string), "Respect:%d", PlayerInfo[playerid][pRespect]);
TextDrawSetString(Textdraw3, string);
TextDrawShowForPlayer(playerid, Textdraw3);
But it aint working. Why? Any ideas?
Re: Textdraw showing respect. -
Konewka - 29.05.2013
pawn Код:
Textdraw3 = TextDrawCreate(487.000000, 98.000000, "Respect:0");
Make this string " " just in case. So replace "Respect:0" into " " (blank space). However check whether pRespect in the enum is an integer not a string.
Re: Textdraw showing respect. -
lQs - 29.05.2013
I already did that. Still not working.