Textdraw help -
NealPeteros - 04.05.2017
I've got a pretty bad eye here, is there something unusual in these statements that makes the textdraw automatically shown when player is connected?
PHP код:
Toolbar = TextDrawCreate(642.000000, 1.000000, "");
TextDrawBackgroundColor(Toolbar, 255);
TextDrawFont(Toolbar, 1);
TextDrawLetterSize(Toolbar, 0.500000, 2.299998);
TextDrawColor(Toolbar, -1);
TextDrawSetOutline(Toolbar, 0);
TextDrawSetProportional(Toolbar, 1);
TextDrawSetShadow(Toolbar, 1);
TextDrawUseBox(Toolbar, 1);
TextDrawBoxColor(Toolbar, 0xB1B5B8FF);
TextDrawTextSize(Toolbar, -5.000000, 0.000000);
TextDrawSetSelectable(Toolbar, 1);
The code is placed on OnFilterscriptInit, and OnPlayerConnect and OnPlayerSpawn is empty
Re: Textdraw help -
GTLS - 04.05.2017
Nope. i dont see anything wrong in your code. Try Re-compiling your script and then connecting.
Re: Textdraw help -
NealPeteros - 04.05.2017
Great, now it doesn't show up. I moved the code above to OnPlayerConnect, and created a cmd to show it.
PHP код:
CMD:test(playerid, params[])
{
TextDrawShowForPlayer(playerid, Toolbar);
SelectTextDraw(playerid, 0xA3B4C5FF);
return 1;
}
Re: Textdraw help -
GTLS - 04.05.2017
You cant create Global Textdraws in OnPlayerConnect. Thats the Problem.
Use it on OnFilterScriptInit or OnGameModeInit what ever you are using. then use in testcmd to show the textdraw.
Try and tell what's the result.
EDIT:
If the TextDraw is shown to the player he connects, show us OnPlayerConnect and if it is shown to the player when he spawns, Show us OnPlayerSpawn code.
Re: Textdraw help -
NealPeteros - 04.05.2017
It never shows again. Even with the command called.
PHP код:
Toolbar = TextDrawCreate(642.000000, 1.000000, "");
TextDrawBackgroundColor(Toolbar, 255);
TextDrawFont(Toolbar, 1);
TextDrawLetterSize(Toolbar, 0.500000, 2.299998);
TextDrawColor(Toolbar, -1);
TextDrawSetOutline(Toolbar, 0);
TextDrawSetProportional(Toolbar, 1);
TextDrawSetShadow(Toolbar, 1);
TextDrawUseBox(Toolbar, 1);
TextDrawBoxColor(Toolbar, 0xB1B5B8FF);
TextDrawTextSize(Toolbar, -5.000000, 0.000000);
TextDrawSetSelectable(Toolbar, 1);
Re: Textdraw help -
GTLS - 04.05.2017
Tell me about that TextDraw.. is it a box or what?
if possible show me a SS.
Re: Textdraw help -
NealPeteros - 04.05.2017
Well, to simplify it, I borrowed the hud from [
this] gm, and editted it.
Re: Textdraw help -
GTLS - 04.05.2017
When it was showing, was it showing properly?
and now, it is not showing at all?
Try the original one on OnFilterScriptInit and add it in testcmd and check if it is shown.
Re: Textdraw help -
NealPeteros - 04.05.2017
Somehow fixed it, but it doesnt show when the cmd is used
PHP код:
CMD:test(playerid, params[])
{
TextDrawShowForPlayer(playerid, Toolbar);
return 1;
}
Re: Textdraw help -
NealPeteros - 04.05.2017
I just discovered that a textdraw won't show without any string assigned to.