SA-MP Forums Archive
I'm confused [TextDraw will not show] - 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: I'm confused [TextDraw will not show] (/showthread.php?tid=602548)



I'm confused [TextDraw will not show] - ross8839 - 08.03.2016

From what I understand, my code is correct and should show, but isn't. I was wondering if anyone could tell me the reason and lend me a hand on fixing the issue.

pawn Код:
new string[128];
    format(string, sizeof(string), "Money: $%i", PlayerInfo[playerid][Money]);
    MoneyTD[playerid] = TextDrawCreate(153 ,459 , "Money");
    TextDrawSetString(MoneyTD[playerid], string);
    TextDrawFont(MoneyTD[playerid] , 1);
    TextDrawLetterSize(MoneyTD[playerid] , 0.4, 2.8000000000000003);
    TextDrawColor(MoneyTD[playerid] , 0xFFFFFFAA);
    TextDrawSetOutline(MoneyTD[playerid] , false);
    TextDrawSetProportional(MoneyTD[playerid] , true);
    TextDrawSetShadow(MoneyTD[playerid] , 1);
    //TextDrawUseBox(MoneyTD[playerid], 1);
    //TextDrawBoxColor(MoneyTD[playerid], 0x000000AA);
    TextDrawShowForPlayer(playerid, MoneyTD[playerid]);
pawn Код:
new Text:MoneyTD[MAX_PLAYERS];
I did try the textdraw without the MAX_PLAYERS and [playerid] in everything, but that didn't work either!

No errors, the Textdraw just simply will not show.


Re: I'm confused [TextDraw will not show] - Joron - 08.03.2016

Where do u want the textdraw to be shown?


Re: I'm confused [TextDraw will not show] - ross8839 - 08.03.2016

OnPlayerSpawn... I think is what you mean... but if you mean position on the map, I mean just right underneathe and to the right of the map


Re: I'm confused [TextDraw will not show] - Joron - 08.03.2016

Well i think OnPlayerSpawn
Quote:

TextDrawShowForPlayer(playerid, MoneyTD);




Re: I'm confused [TextDraw will not show] - ross8839 - 08.03.2016

Well it's all in OnPlayerSpawn


Re: I'm confused [TextDraw will not show] - Joron - 08.03.2016

Huh? u already have it then remove maxplayers from new text:MoneyTD


Re: I'm confused [TextDraw will not show] - Joron - 08.03.2016

Edit:Sorry fr double post try https://sampwiki.blast.hk/wiki/TextDrawShowForAll


Re: I'm confused [TextDraw will not show] - ross8839 - 08.03.2016

Read it, this is already there and I explain I have tried it without the MAX_PLAYERS


Re: I'm confused [TextDraw will not show] - SickAttack - 08.03.2016

Use per-player textdraws, not global ones!