24.02.2014, 17:53
Hello there.
I've been trying to fix this problem for 2 weeks right now.
When i'm trying to click on the ''EXIT'' textdraw. It doenst work .
This is the code.
The textdraw code:
I would appreciate it if someone could help me..
Thank you very much!
Edit; Yes i've enabled the textdraw selection. so the mouse button is actually showing tho'.
I've been trying to fix this problem for 2 weeks right now.
When i'm trying to click on the ''EXIT'' textdraw. It doenst work .
This is the code.
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if(GetPVarInt(playerid, "vspawner_active") == 0) return 0; new curpage = GetPVarInt(playerid, "vspawner_page"); // Handle: next button if(playertextid == gNextButtonTextDrawId[playerid]) { if(curpage < (GetNumberOfPages() - 1)) { SetPVarInt(playerid, "vspawner_page", curpage + 1); ShowPlayerModelPreviews(playerid); UpdatePageTextDraw(playerid); PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0); } else { PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0); } return 1; } // Handle: previous button if(playertextid == gPrevButtonTextDrawId[playerid]) { if(curpage > 0) { SetPVarInt(playerid, "vspawner_page", curpage - 1); ShowPlayerModelPreviews(playerid); UpdatePageTextDraw(playerid); PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0); } else { PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0); } return 1; } // Search in the array of textdraws used for the items new x=0; while(x != SELECTION_ITEMS) { if(playertextid == gSelectionItems[playerid][x]) { HandlePlayerItemSelection(playerid, x); PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0); DestroySelectionMenu(playerid); CancelSelectTextDraw(playerid); SetPVarInt(playerid, "vspawner_active", 0); return 1; } x++; } if(playertextid == DLexit[playerid]) { SetCameraBehindPlayer(playerid); PlayerTextDrawHide(playerid, DLbox1[playerid]); PlayerTextDrawHide(playerid, DLbox2[playerid]); PlayerTextDrawHide(playerid, DLbox3[playerid]); PlayerTextDrawHide(playerid, DLmodify[playerid]); PlayerTextDrawHide(playerid, DLspeedtest[playerid]); PlayerTextDrawHide(playerid, DLcitytest[playerid]); PlayerTextDrawHide(playerid, DLpaint[playerid]); PlayerTextDrawHide(playerid, DLbuy[playerid]); PlayerTextDrawHide(playerid, DLexit[playerid]); CancelSelectTextDraw(playerid); return 1; } return 0; }
Код:
new PlayerText:DLexit[MAX_PLAYERS]; DLexit[playerid] = CreatePlayerTextDraw(playerid, 552.000000, 274.000000, "EXIT"); PlayerTextDrawBackgroundColor(playerid, DLexit[playerid], 255); PlayerTextDrawFont(playerid, DLexit[playerid], 1); PlayerTextDrawLetterSize(playerid, DLexit[playerid], 1.130000, 7.400000); PlayerTextDrawColor(playerid, DLexit[playerid], -1); PlayerTextDrawSetOutline(playerid, DLexit[playerid], 0); PlayerTextDrawSetProportional(playerid, DLexit[playerid], 1); PlayerTextDrawSetShadow(playerid, DLexit[playerid], 1); PlayerTextDrawSetSelectable(playerid, DLexit[playerid], 1); PlayerTextDrawTextSize(playerid, DLexit[playerid], 1000.0000, 160.0000000);
Thank you very much!
Edit; Yes i've enabled the textdraw selection. so the mouse button is actually showing tho'.