29.03.2013, 22:22
I have three textdraws...
As you can see each textdraw is selectable.....
this is my CMD:
The next and prev button are selectable but the wear buttong isn't...
pawn Код:
PrevButton[playerid] = CreatePlayerTextDraw(playerid, 222.000000, 297.000000, "< Prev");
PlayerTextDrawBackgroundColor(playerid, PrevButton[playerid], 65320);
PlayerTextDrawFont(playerid, PrevButton[playerid], 3);
PlayerTextDrawLetterSize(playerid, PrevButton[playerid], 0.569999, 1.799998);
PlayerTextDrawColor(playerid, PrevButton[playerid], -65281);
PlayerTextDrawSetOutline(playerid, PrevButton[playerid], 1);
PlayerTextDrawSetProportional(playerid, PrevButton[playerid], 1);
PlayerTextDrawUseBox(playerid, PrevButton[playerid], 1);
PlayerTextDrawBoxColor(playerid, PrevButton[playerid], 65330);
PlayerTextDrawTextSize(playerid, PrevButton[playerid], 292.000000, 57.000000);
PlayerTextDrawSetSelectable(playerid, PrevButton[playerid], 1);
NextButton[playerid] = CreatePlayerTextDraw(playerid, 350.000000, 297.000000, "Next >");
PlayerTextDrawBackgroundColor(playerid, NextButton[playerid], 65320);
PlayerTextDrawFont(playerid, NextButton[playerid], 3);
PlayerTextDrawLetterSize(playerid, NextButton[playerid], 0.569999, 1.799998);
PlayerTextDrawColor(playerid, NextButton[playerid], -65281);
PlayerTextDrawSetOutline(playerid, NextButton[playerid], 1);
PlayerTextDrawSetProportional(playerid, NextButton[playerid], 1);
PlayerTextDrawUseBox(playerid, NextButton[playerid], 1);
PlayerTextDrawBoxColor(playerid, NextButton[playerid], 65330);
PlayerTextDrawTextSize(playerid, NextButton[playerid], 424.000000, 298.000000);
PlayerTextDrawSetSelectable(playerid, NextButton[playerid], 1);
WearButton[playerid] = CreatePlayerTextDraw(playerid, 293.000000, 327.000000, "wear");
PlayerTextDrawBackgroundColor(playerid, WearButton[playerid], 65320);
PlayerTextDrawFont(playerid, WearButton[playerid], 3);
PlayerTextDrawLetterSize(playerid, WearButton[playerid], 0.569999, 1.799998);
PlayerTextDrawColor(playerid, WearButton[playerid], -65281);
PlayerTextDrawSetOutline(playerid, WearButton[playerid], 0);
PlayerTextDrawSetProportional(playerid, WearButton[playerid], 1);
PlayerTextDrawUseBox(playerid, WearButton[playerid], 1);
PlayerTextDrawBoxColor(playerid, WearButton[playerid], 65310);
PlayerTextDrawTextSize(playerid, WearButton[playerid], 350.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid, WearButton[playerid], 1);
this is my CMD:
pawn Код:
CMD:uniform(playerid, params[])
{
new faction = PlayerInfo[playerid][pFaction];
if(faction == 0) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");
if(faction == LSPD && PlayerToPoint(3.0, playerid, Factions[faction][fUniformX], Factions[faction][fUniformY], Factions[faction][fUniformZ]))
{
if(PlayerInfo[playerid][pSex] == 2) return SCM(playerid, COLOR_LIGHTRED, "Uniform is only for males.");
if(!CopDuty{playerid}) return SCM(playerid, COLOR_INFO, "You must be on duty in order to change uniform.");
SetPlayerPos(playerid, 1458.3811,-1762.3105,3285.2859);
SetPlayerFacingAngle(playerid, 231.8820);
SetPlayerCameraPos(playerid, 1461.4155,-1765.1774,3285.2859);
SetPlayerCameraLookAt(playerid, 1458.3811,-1762.3105,3285.2859);
SelectTextDraw(playerid, 0xFFFFFFFF);
PlayerTextDrawShow(playerid, WearButton[playerid]);
PlayerTextDrawShow(playerid, NextButton[playerid]);
PlayerTextDrawShow(playerid, PrevButton[playerid]);
SetIntVar(playerid, "SelectingUniform", 1);
SetPlayerSkin(playerid, LSPDSkins[0]);
SkinSlot[playerid] = 0;
OnPlayAnim(playerid,"DEALER","DEALER_IDLE",4.0,1,0,0,0,0);
}
else return SCM(playerid, COLOR_LIGHTRED, "You are not at the uniform position.");
return 1;
}