26.01.2014, 11:12
Ok guys, i made a menu with clickable textdraws where it shows some categories of the shop. (Vehicles, Weapons, Vip Vehicles etc).
The problem is, if i click on the "Vehicles", the category textdraws doesn't hide. Even if i click "Weapons" or "Vip Vehicles".
This is an example code:
I clicked the category "Vehicles", from the menu, im hiding the menu textdraws and showing vehicles textdraw (with the names of vehicles to buy). The problem is not hiding the MENU textdraws.
Stocks:
The problem is, if i click on the "Vehicles", the category textdraws doesn't hide. Even if i click "Weapons" or "Vip Vehicles".
This is an example code:
pawn Код:
if(clickedid == ShopMenu2) //Vehicles
{
RespPlayerMenuHide(playerid);
VipVehMenuHide(playerid);
RespPlayerWepMenuHide(playerid);
WeaponsMenuHide(playerid);
VipWepMenuHide(playerid);
CancelSelectTextDraw(playerid);
TextDrawShowForPlayer(playerid, VehiclesTxd0);
TextDrawShowForPlayer(playerid, VehiclesTxd1);
TextDrawShowForPlayer(playerid, VehiclesTxd2);
TextDrawShowForPlayer(playerid, VehiclesTxd3);
TextDrawShowForPlayer(playerid, VehiclesTxd4);
TextDrawShowForPlayer(playerid, VehiclesTxd5);
TextDrawShowForPlayer(playerid, VehiclesTxd6);
TextDrawShowForPlayer(playerid, VehiclesTxd7);
TextDrawShowForPlayer(playerid, VehiclesTxd8);
TextDrawShowForPlayer(playerid, VehiclesTxd9);
TextDrawShowForPlayer(playerid, VehiclesTxd10);
TextDrawShowForPlayer(playerid, VehiclesTxd11);
TextDrawShowForPlayer(playerid, VehiclesTxd12);
SelectTextDraw(playerid, -1);
}
Stocks:
pawn Код:
stock RespPlayerMenuHide(playerid)
{
TextDrawHideForPlayer(playerid, RespPlayerVeh0);
TextDrawHideForPlayer(playerid, RespPlayerVeh1);
TextDrawHideForPlayer(playerid, RespPlayerVeh2);
TextDrawHideForPlayer(playerid, RespPlayerVeh3);
TextDrawHideForPlayer(playerid, RespPlayerVeh4);
TextDrawHideForPlayer(playerid, RespPlayerVeh5);
TextDrawHideForPlayer(playerid, RespPlayerVeh6);
return 1;
}
stock VipVehMenuHide(playerid)
{
TextDrawHideForPlayer(playerid, VipVeh0);
TextDrawHideForPlayer(playerid, VipVeh1);
TextDrawHideForPlayer(playerid, VipVeh2);
TextDrawHideForPlayer(playerid, VipVeh3);
TextDrawHideForPlayer(playerid, VipVeh4);
TextDrawHideForPlayer(playerid, VipVeh5);
TextDrawHideForPlayer(playerid, VipVeh6);
TextDrawHideForPlayer(playerid, VipVeh7);
TextDrawHideForPlayer(playerid, VipVeh8);
return 1;
}
stock RespPlayerWepMenuHide(playerid)
{
TextDrawHideForPlayer(playerid, RespPlayerWep0);
TextDrawHideForPlayer(playerid, RespPlayerWep1);
TextDrawHideForPlayer(playerid, RespPlayerWep2);
TextDrawHideForPlayer(playerid, RespPlayerWep3);
TextDrawHideForPlayer(playerid, RespPlayerWep4);
TextDrawHideForPlayer(playerid, RespPlayerWep5);
return 1;
}
stock VehiclesMenuHide(playerid)
{
TextDrawHideForPlayer(playerid, VehiclesTxd0);
TextDrawHideForPlayer(playerid, VehiclesTxd1);
TextDrawHideForPlayer(playerid, VehiclesTxd2);
TextDrawHideForPlayer(playerid, VehiclesTxd3);
TextDrawHideForPlayer(playerid, VehiclesTxd4);
TextDrawHideForPlayer(playerid, VehiclesTxd5);
TextDrawHideForPlayer(playerid, VehiclesTxd6);
TextDrawHideForPlayer(playerid, VehiclesTxd7);
TextDrawHideForPlayer(playerid, VehiclesTxd8);
TextDrawHideForPlayer(playerid, VehiclesTxd9);
TextDrawHideForPlayer(playerid, VehiclesTxd10);
TextDrawHideForPlayer(playerid, VehiclesTxd11);
TextDrawHideForPlayer(playerid, VehiclesTxd12);
return 1;
}
stock WeaponsMenuHide(playerid)
{
TextDrawHideForPlayer(playerid, WeaponsTxd0);
TextDrawHideForPlayer(playerid, WeaponsTxd1);
TextDrawHideForPlayer(playerid, WeaponsTxd2);
TextDrawHideForPlayer(playerid, WeaponsTxd3);
TextDrawHideForPlayer(playerid, WeaponsTxd4);
TextDrawHideForPlayer(playerid, WeaponsTxd5);
TextDrawHideForPlayer(playerid, WeaponsTxd6);
TextDrawHideForPlayer(playerid, WeaponsTxd7);
TextDrawHideForPlayer(playerid, WeaponsTxd8);
TextDrawHideForPlayer(playerid, WeaponsTxd9);
TextDrawHideForPlayer(playerid, WeaponsTxd10);
TextDrawHideForPlayer(playerid, WeaponsTxd11);
TextDrawHideForPlayer(playerid, WeaponsTxd12);
TextDrawHideForPlayer(playerid, WeaponsTxd13);
return 1;
}
stock VipWepMenuHide(playerid)
{
TextDrawHideForPlayer(playerid, VipWep0);
TextDrawHideForPlayer(playerid, VipWep1);
TextDrawHideForPlayer(playerid, VipWep2);
TextDrawHideForPlayer(playerid, VipWep3);
TextDrawHideForPlayer(playerid, VipWep4);
TextDrawHideForPlayer(playerid, VipWep5);
return 1;
}