07.10.2017, 02:34
When I click on Texture1, I will notice that the text it's made of Texture2 is not Texture1. How should I fix it?
This is example.
I choose Textdraw1, but the text is up to Textdraw2. That's it. The word A is not the same as the word B, even if I click anywhere on the screen.
This is the code for both Textdraw.
How should I fix it?
This is example.
Quote:
public OnPlayerClickTextDraw(playerid, Text:clickedid) { new string[128], headers[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); if(Text:INVALID_TEXT_DRAW == clickedid) { if(!CloseTextDraw[playerid]) SelectTextDraw(playerid, 0x00FF00FF); } if(clickedid == Textdraw1) { SendClientMessage(playerid, -1, "B"); } else if(clickedid == Textdraw2) { SendClientMessage(playerid, -1, "A"); } return 1; } |
This is the code for both Textdraw.
Quote:
Textdraw2 = TextDrawCreate(570.000000, 9.333334, "TEXTDRAW2"); TextDrawLetterSize(Textdraw2, 0.449999, 1.600000); TextDrawAlignment(Textdraw2, 1); TextDrawColor(Textdraw2, -1); TextDrawSetShadow(Textdraw2, 0); TextDrawSetOutline(Textdraw2, 1); TextDrawBackgroundColor(Textdraw2, 51); TextDrawFont(Textdraw2, 2); TextDrawSetProportional(Textdraw2, 1); TextDrawSetSelectable(Textdraw2, true); Textdraw3 = TextDrawCreate(424.250000, 9.187500, "TEXTDRAW3"); TextDrawLetterSize(Textdraw3, 0.449999, 1.600000); TextDrawAlignment(Textdraw3, 1); TextDrawColor(Textdraw3, -1); TextDrawSetShadow(Textdraw3, 0); TextDrawSetOutline(Textdraw3, 1); TextDrawBackgroundColor(Textdraw3, 51); TextDrawFont(Textdraw3, 2); TextDrawSetProportional(Textdraw3, 1); TextDrawSetSelectable(Textdraw3, true); |