16.10.2012, 02:03
Hey all I have thsi awheels command that brings up a dialog with all wheels but when i click on the wheel it wont install, heres all parts of the script realted too it.
Код:
//define; #define Menu 8898 //OnDialogResponse code; if(dialogid == Menu) { new vehicleid = GetPlayerVehicleID(playerid); if(!response) { SendClientMessage(playerid, 0xFF0000FF, "{AAAAAA}You cancelled."); return 1; } if(response) { if (vehicleid) { if(listitem == 0) return AddVehicleComponent(vehicleid, 1073); if(listitem == 1) return AddVehicleComponent(vehicleid, 1074); if(listitem == 2) return AddVehicleComponent(vehicleid, 1075); if(listitem == 3) return AddVehicleComponent(vehicleid, 1076); if(listitem == 4) return AddVehicleComponent(vehicleid, 1077); if(listitem == 5) return AddVehicleComponent(vehicleid, 1078); if(listitem == 6) return AddVehicleComponent(vehicleid, 1079); if(listitem == 7) return AddVehicleComponent(vehicleid, 1080); if(listitem == 8) return AddVehicleComponent(vehicleid, 1081); if(listitem == 9) return AddVehicleComponent(vehicleid, 1082); if(listitem == 10) return AddVehicleComponent(vehicleid, 1083); if(listitem == 11) return AddVehicleComponent(vehicleid, 1084); if(listitem == 12) return AddVehicleComponent(vehicleid, 1085); if(listitem == 13) return AddVehicleComponent(vehicleid, 1096); if(listitem == 14) return AddVehicleComponent(vehicleid, 1097); if(listitem == 15) return AddVehicleComponent(vehicleid, 1098); } } return 1; } //Command; CMD:awheels(playerid, params[]) { if(GetAdminLevel(playerid)>= 1 || IsPlayerAdmin(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { ShowPlayerDialog(playerid, Menu, DIALOG_STYLE_LIST, "Admin Wheels System", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess", "Ok", "Exit"); } else { SendClientMessage(playerid, -1, "{F23A0D}ERROR: {AAAAAA}You need to be in a vehcile to use this command!"); } } else { SendClientMessage(playerid, -1, NO_PERM); } return 1; }