18.07.2016, 22:19
Creating the textdraw =
stock to show them all
onplayerclick....
Код:
DealershipCatCon[playerid] = CreatePlayerTextDraw(playerid, 198.333343, 180.444412, "Convertibles"); PlayerTextDrawLetterSize(playerid, DealershipCatCon[playerid], 0.359665, 1.716148); PlayerTextDrawTextSize(playerid, DealershipCatCon[playerid], -7.000000, -130.666687); PlayerTextDrawAlignment(playerid, DealershipCatCon[playerid], 2); PlayerTextDrawColor(playerid, DealershipCatCon[playerid], -1); PlayerTextDrawUseBox(playerid, DealershipCatCon[playerid], true); PlayerTextDrawBoxColor(playerid, DealershipCatCon[playerid], 255); PlayerTextDrawSetShadow(playerid, DealershipCatCon[playerid], 0); PlayerTextDrawSetOutline(playerid, DealershipCatCon[playerid], 0); PlayerTextDrawBackgroundColor(playerid, DealershipCatCon[playerid], -2139062017); PlayerTextDrawFont(playerid, DealershipCatCon[playerid], 2); PlayerTextDrawSetProportional(playerid, DealershipCatCon[playerid], 1); PlayerTextDrawSetSelectable(playerid, DealershipCatCon[playerid], true);
Код:
stock ShowDealershipCats(playerid) { ... PlayerTextDrawShow(playerid, DealershipCatCon[playerid]); ... return 1; }
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if(GetIntVar(playerid, "TestVBuy") == 1) { if(playertextid == DealershipCatClose[playerid]) { SetIntVar(playerid, "TestVBuy", 0); HideDealershipCats(playerid); SCM(playerid, COLOR_RED, "You closed the menu!"); } if(playertextid == DealershipCatCon[playerid]) { SCM(playerid, COLOR_GREEN, "You clicked Convertibles!"); } if(playertextid == DealershipCatInd[playerid]) { SCM(playerid, COLOR_GREEN, "You clicked Industrial!"); }