15.07.2015, 10:46
everytime i create textdraw it gets fucked up, when i click on the box it should work but it doesn't here is my codes
also look on this picture Empty Slot the one at the buttom it's different and it's the same color as the others
http://prntscr.com/7sxgdo
please tell me what i have to do -_-
i know you'll ask for, did u make it OnPlayerClickTextdraw, yeah i did look
also look on this picture Empty Slot the one at the buttom it's different and it's the same color as the others
http://prntscr.com/7sxgdo
please tell me what i have to do -_-
Код:
PlayerData[playerid][pTextdraws][0] = CreatePlayerTextDraw(playerid, 403.522705, 115.250000, "_");//whitebox PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][0], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][0], 1); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][0], 0.000000, 24.831480); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][0], -1); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][0], 0); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][0], 1); PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][0], 1); PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][0], 1); PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][0], 1717986918); PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][0], 233.197662, 0.000000); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][0], 0); PlayerData[playerid][pTextdraws][1] = CreatePlayerTextDraw(playerid, 320.000183, 120.166664, "My Characters"); PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][1], 2); PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][1], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][1], 0); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][1], 0.449999, 1.600000); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][1], -65281); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][1], 1); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][1], 1); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][1], 0); PlayerData[playerid][pTextdraws][2] = CreatePlayerTextDraw(playerid, 394.152343, 166.000015, "_");//selectableone PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][2], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][2], 1); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][2], 0.000000, 2.636668); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][2], -1); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][2], 0); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][2], 1); PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][2], 1); PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][2], 1); PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][2], -205); PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][2], 243.973648, 0.000000); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][2], 1); PlayerData[playerid][pTextdraws][3] = CreatePlayerTextDraw(playerid, 394.152343, 226.666625, "_");//selectableone PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][3], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][3], 1); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][3], 0.000000, 2.636668); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][3], -1); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][3], 0); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][3], 1); PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][3], 1); PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][3], 1); PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][3], -205); PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][3], 243.973648, 0.000000); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][3], 1); PlayerData[playerid][pTextdraws][4] = CreatePlayerTextDraw(playerid, 394.152343, 285.333221, "_");//selectableone PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][4], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][4], 1); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][4], 0.000000, 2.636668); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][4], -1); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][4], 0); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][4], 1); PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][4], 1); PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][4], 1); PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][4], -205); PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][4], 243.973648, 0.000000); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][4], 1); PlayerData[playerid][pTextdraws][5] = CreatePlayerTextDraw(playerid, 317.189025, 171.500000, "Empty Slot"); PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][5], 2); PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][5], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][5], 1); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][5], 0.353953, 0.905833); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][5], -1); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][5], 1); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][5], 1); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][5], 0); PlayerData[playerid][pTextdraws][6] = CreatePlayerTextDraw(playerid, 317.189025, 232.166641, "Empty Slot"); PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][6], 2); PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][6], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][6], 1); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][6], 0.353953, 0.905833); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][6], -1); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][6], 1); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][6], 1); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][6], 0); PlayerData[playerid][pTextdraws][7] = CreatePlayerTextDraw(playerid, 317.189025, 293.416595, "Empty Slot"); PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][7], 2); PlayerTextDrawBackgroundColor(playerid, PlayerData[playerid][pTextdraws][7], 255); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][7], 1); PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][7], 0.353953, 0.905833); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][7], -1); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][7], 1); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][7], 1); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][7], 0); PlayerData[playerid][pTextdraws][8] = CreatePlayerTextDraw(playerid, 399.774505, 119.916664, "_");// Black Box PlayerTextDrawLetterSize(playerid, PlayerData[playerid][pTextdraws][8], 0.000000, 23.859260); PlayerTextDrawTextSize(playerid, PlayerData[playerid][pTextdraws][8], 236.945831, 0.000000); PlayerTextDrawAlignment(playerid, PlayerData[playerid][pTextdraws][8], 1); PlayerTextDrawColor(playerid, PlayerData[playerid][pTextdraws][8], 0); PlayerTextDrawUseBox(playerid, PlayerData[playerid][pTextdraws][8], true); PlayerTextDrawBoxColor(playerid, PlayerData[playerid][pTextdraws][8], 102); PlayerTextDrawSetShadow(playerid, PlayerData[playerid][pTextdraws][8], 0); PlayerTextDrawSetOutline(playerid, PlayerData[playerid][pTextdraws][8], 0); PlayerTextDrawFont(playerid, PlayerData[playerid][pTextdraws][8], 0); PlayerTextDrawSetProportional(playerid, PlayerData[playerid][pTextdraws][8], 1); PlayerTextDrawSetSelectable(playerid, PlayerData[playerid][pTextdraws][8], 0);
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if (!Dialog_Opened(playerid)) { if (!PlayerData[playerid][pCharacter]) { if (playertextid == PlayerData[playerid][pTextdraws][2]) SelectCharacter(playerid, 1); else if (playertextid == PlayerData[playerid][pTextdraws][3]) SelectCharacter(playerid, 2); else if (playertextid == PlayerData[playerid][pTextdraws][4]) SelectCharacter(playerid, 3); } } return 1; }