24.11.2010, 20:42
Ok the problem is when i do /v mod the menu shows up which is good but when i click space bar on the items non of them work.heres my code sorry for poor indention
pawn Код:
vWModM = CreateMenu("Wheels", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(vWModM, 0, "Wheel Arch Angels Wheel type 6 - $750");
AddMenuItem(vWModM, 0, "Wheel Arch Angels Wheel type 3 - $750");
AddMenuItem(vWModM, 0, "Wheel Arch Angels Wheel type 2 - $750");
AddMenuItem(vWModM, 0, "Loco' Low Co. Wheel type 4");
AddMenuItem(vWModM, 0, "Loco' Low Co. Wheel type 1");
AddMenuItem(vWModM, 0, "Loco' Low Co. Wheel type 3");
AddMenuItem(vWModM, 0, "Wheel Arch Angels Wheel type 1");
AddMenuItem(vWModM, 0, "Wheel Arch Angels Wheel type 5");
AddMenuItem(vWModM, 0, "Wheel Arch Angels Wheel type 4");
AddMenuItem(vWModM, 0, "Transfender Wheel type 1");
AddMenuItem(vWModM, 0, "Loco' Low Co. Wheel type 2");
AddMenuItem(vWModM, 0, "Loco' Low Co. Wheel type 5");
AddMenuItem(vWModM, 0, "Transfender Wheel type 2");
AddMenuItem(vWModM, 0, "Transfender Wheel type 3");
AddMenuItem(vWModM, 0, "Transfender Wheel type 4");
AddMenuItem(vWModM, 0, "Transfender Wheel type 5");
vModM = CreateMenu("Modification", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(vModM, 0, "Engine Repair(250$)");
AddMenuItem(vModM, 0, "Body Repair($500)");
AddMenuItem(vModM, 0, "Wheels(750$)");
pawn Код:
else if(Current == vModM) {
switch(row) {
case 0:
{
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicleid, 1000.0);
}
case 1:
{
new vehicleid = GetPlayerVehicleID(playerid);
RepairVehicle(vehicleid);
}
case 2:
{
ShowMenuForPlayer(vWModM, playerid);
}
}
}
else if(Current == vWModM) {
switch(row) {
case 0:
{
new vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1073);
GivePlayerPCash(playerid,-750);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1073;
SaveCars();
}
case 1:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1074);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1074;
SaveCars();
}
case 2:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1075);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1075;
SaveCars();
}
case 3:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1076);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1076;
SaveCars();
}
case 4:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1077);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1077;
SaveCars();
}
case 5:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1078);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1078;
SaveCars();
}
case 6:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1079);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1079;
SaveCars();
}
case 7:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1080);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1080;
SaveCars();
}
case 8:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1081);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1081;
SaveCars();
}
case 9:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1082);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1082;
SaveCars();
}
case 10:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1083);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1083;
SaveCars();
}
case 11:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1084);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1084;
SaveCars();
}
case 12:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1085);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1085;
SaveCars();
}
case 13:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1096);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1096;
SaveCars();
}
case 14:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1097);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1097;
SaveCars();
}
case 15:
{
new vehicleid = GetPlayerVehicleID(playerid);
GivePlayerPCash(playerid,-750);
AddVehicleComponent(vehicleid, 1098);
CarInfo[VehicleOwned[vehicleid]][cMod][0] = 1098;
SaveCars();
}
}
}
}