Textdraw help - 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 help (
/showthread.php?tid=495877)
Textdraw help -
Hybris - 19.02.2014
Hello recently I've created a couple of textdraw's and now I need them to disappear when the user has registerd/logged in I used "TextDrawHideForPlayer(playerid,textdraw);" but I this error "(249) : error 017: undefined symbol "textdraw""
Line 249 is "TextDrawHideForPlayer(playerid,textdraw);"
Re: Textdraw help -
Scenario - 19.02.2014
You need to assign a variable to your textdraw(s). To do this, you'll need to first declare the variable towards the top of your script (or somewhere outside of a function).
pawn Код:
new Text:textDrawNameHere;
Then you'll need to find the line for your text draw that has "TextDrawCreate(...)" and then add the following:
Your line should now look like this, somewhat:
pawn Код:
textDrawNameHere = TextDrawCreate(/*Values go here*/);
Now that you've completed all of that, you can THEN use TextDrawDestroy and use "textDrawNameHere" in place of "textdraw".
Re: Textdraw help -
Hybris - 19.02.2014
Im using zamaroth's textdraw editor so I already have these
Код:
Textdraw0 = TextDrawCreate(646.000000, 153.000000, "txt1");
Re: Textdraw help -
Scenario - 19.02.2014
Okay, then use "Textdraw0" instead of "textDrawNameHere" and don't worry about declaring the variable.
Re: Textdraw help -
Hybris - 19.02.2014
I am I have everything set up but I only get errors when I put this
Код:
TextDrawHideForPlayer(playerid,textdraw)
under OnPlayerSpawn which I guess it removes it when the player spawns so can it be something else a variable or something?
Re: Textdraw help -
Hybris - 19.02.2014
Can anyone please help me with this?