15.10.2012, 15:41
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.
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?
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; }
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?