Text Draw 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: Text Draw help (
/showthread.php?tid=606288)
Text Draw help -
GeorgeMcReary - 02.05.2016
Hello guys i was making a new ATM system with textdraws in my server. every thing works fine except 2 things:
1: when that TextDraw comes, the arrow to select on of the option dont come.
2: there is a TextDaw with default string as NAMEHERE. i use TextDrawSetString when he uses commands /atm. but the string is not getting updated to his name and but, insted it just satys NAMEHERE.
please what am i doing wrong. here is the code of /atm.
PHP код:
CMD:atm(playerid, params[])
{
new atmnamestring[65];
if(IsAtATM(playerid))
{
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][0]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][1]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][2]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][3]);
format(atmnamestring, sizeof(atmnamestring), "%s", GetPlayerNameEx(playerid));
TextDrawSetString(TDEditor_PTD[playerid][4], atmnamestring);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][4]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][5]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][6]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][7]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][8]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][9]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][10]);
}
return 1;
}
P.S. : i have not done anything in OnPlayerClickTextdraw so is that a prob? i just made that TD and just wanted to see if its showing or not. also, thanks to adri1's TDE Editor. thats great.
Re: Text Draw help -
GTLS - 02.05.2016
try increasing size of the string atmnamestring to 128 or something.. may be it should work
Re: Text Draw help -
PrO.GameR - 02.05.2016
It's because it's not a textdraw but a
player-textdraw
use PlayerTextDrawSetString
Quote:
Originally Posted by GTLS
try increasing size of the string atmnamestring to 128 or something.. may be it should work
|
Stop suggesting people random BS, please.
Re: Text Draw help -
GTLS - 02.05.2016
OMG i am so sorry, i didnt knew either about that Function. and btw i just did not suggesting him random solution, that worked for me once.. i had string size set as 28 so TextDraw was not updating but when i increased its size to 156, it worked but i dont remember that was a TextDraw or PlayerTextDraw but from your solution, i guess it was TextDraw..