Textdraw issue - 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 issue (
/showthread.php?tid=385362)
Textdraw issue -
Zaila - 15.10.2012
I got a issue here with textdraws which i cant wrap my head around. Haven't been using textdraws before so might be a beginner mistake but i dont belive so.
Basiclly, need to create a set of textdraw for a function and currently working on creating the textdraws.
Код:
new Text:box[MAX_PLAYERS];
new Text:texxt[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
box[playerid] = TextDrawCreate(140.0,580.0,"_");
TextDrawUseBox(box[playerid], 1);
TextDrawBoxColor(box[playerid], 0x000000AA);
texxt[playerid] = TextDrawCreate(140.0,580.0,"Welcome to my SA-MP server");
TextDrawColor(texxt[playerid],COLOR_WHITE);
TextDrawTextSize(texxt[playerid], 2.0, 3.6);
return 1;
}
COMMAND:join(playerid, params[])
{
OnPlayerConnect(playerid);
return 1;
}
COMMAND:textdraw(playerid, params[])
{
TextDrawShowForPlayer(playerid, box[playerid]);
TextDrawShowForPlayer(playerid, texxt[playerid]);
return 1;
}
Above is the current code. The textdraw is supposed to be created when a player connects. The command /join is to simulate connecting to the textdraws creates (they are destroyed with OnFilterScriptExit on a filterscript reload) and /textdraw is supposed to show the textdraws.
My problem is, no textdraws is showing up at all. Both me and another person is getting the same result when trying.
Am i overlooking something, or is the textdraw feature simply bugged?
Re: Textdraw issue - Glint - 15.10.2012
Why are you creating the textdraw on connect ?
Why not OnFilterScriptInit
Re: Textdraw issue -
Randy More - 15.10.2012
The colors you use are not the ones required for the text-draws, you will have to get the hex ones such as this color..
Re: Textdraw issue -
Zaila - 15.10.2012
Quote:
Originally Posted by Glint
Why are you creating the textdraw on connect ?
Why not OnFilterScriptInit
|
Tried it aswell, same result.
Quote:
Originally Posted by Randy More
The colors you use are not the ones required for the text-draws, you will have to get the hex ones such as this color..
|
Are you sure? Checking the wiki (
https://sampwiki.blast.hk/wiki/TextDrawUseBox), i'm doing it correct.
Nevertheless, tried your suggestion, didnt work.
Re: Textdraw issue - Glint - 16.10.2012
What did you use to get the coordinates of the textdraw ? Are you sure they are correct ?