SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Русский/Russian

Reply
 
Thread Tools Display Modes
Old 09/11/2009, 08:41 PM   #1
Jeka91
Little Clucker
 
Join Date: Jul 2009
Posts: 21
Reputation: 3
Default Гараж тюнинга для всех машин сразу

Видел на какомто сервере гараж с тюнингом заезжаешь туда пишешь /car tuning и ты с тачей появляешься в интерьере и там листаешь спойлеры,колёса ну в общем тюнинг для всех машин сразу!
Jeka91 is offline   Reply With Quote
Old 10/11/2009, 03:28 AM   #2
ZonReim
Big Clucker
 
Join Date: Oct 2009
Posts: 79
Reputation: 3
Default Re: Гараж тюнинга для всех машин сразу

Это довольно легко сделать.

Телепортишь в интерьер гаража, ставишь камеру как в настоящих гаражах и выдаёшь менюшку сделанную через CreateMenu.
ZonReim is offline   Reply With Quote
Old 10/11/2009, 04:23 AM   #3
heufix
Big Clucker
 
Join Date: May 2009
Posts: 139
Reputation: 10
Default Re: Гараж тюнинга для всех машин сразу

Quote:
Originally Posted by ZonReim
Это довольно легко сделать.

Телепортишь в интерьер гаража, ставишь камеру как в настоящих гаражах и выдаёшь менюшку сделанную через CreateMenu.
Забудь про старые менюшки! Используйте ShowPlayerDialog
heufix is offline   Reply With Quote
Old 10/11/2009, 04:44 AM   #4
ZonReim
Big Clucker
 
Join Date: Oct 2009
Posts: 79
Reputation: 3
Default Re: Гараж тюнинга для всех машин сразу

Quote:
Originally Posted by heufix
Забудь про старые менюшки! Используйте ShowPlayerDialog
Параметры:
(playerid, dialogid, style, caption[], info[], button1[], button2[])

Как используя его создать менюшку? :3
ZonReim is offline   Reply With Quote
Old 10/11/2009, 08:03 AM   #5
Serafim_sd
Big Clucker
 
Join Date: Jul 2008
Posts: 198
Reputation: 10
Default Re: Гараж тюнинга для всех машин сразу

Quote:
Originally Posted by ZonReim
Это довольно легко сделать.

Телепортишь в интерьер гаража, ставишь камеру как в настоящих гаражах и выдаёшь менюшку сделанную через CreateMenu.
да, но ты не учел, что для каждого автомобиля надор деталей свой, я пытался повторить игровую систему тюнинга когда делал мод для гта юнитед, и у меня получилось но делал я это очень уш долго и было все равно не так как в игре, т.е. открывалось меню сразу со всем списком деталей, спойлеры, юбки, фары, но если какаято деталь на машину не ставилась то выдавалось сообщение типа детать не подходит к этому автомобилю...
Serafim_sd is offline   Reply With Quote
Old 10/11/2009, 10:24 AM   #6
Jeka91
Little Clucker
 
Join Date: Jul 2009
Posts: 21
Reputation: 3
Default Re: Гараж тюнинга для всех машин сразу

можете скинуть код пример плиз а то я незнаю с чего начать
Jeka91 is offline   Reply With Quote
Old 10/11/2009, 10:35 AM   #7
Serafim_sd
Big Clucker
 
Join Date: Jul 2008
Posts: 198
Reputation: 10
Default Re: Гараж тюнинга для всех машин сразу

1. Сначала я создал массив разрешающих значений, где для каждого вида запчастей стояло 1 либо 0, можно ставить или нет.
Code:
#define VEHICLES_SIZE 212
enum VehicleInfo {
	  vehicle_model,
  vehicle_name[MAX_NAME],
  t_nitro,
  t_hidro,
  t_wheels,
  t_spl,
  t_rf,
  t_exh,
  t_wg,
  t_bnt,
}
new Vehicles[VEHICLES_SIZE][VehicleInfo] = {
{509,	"Bike",0,0,0,0,0,0,0,0},
{510,	"MountainBike",0,0,0,0,0,0,0,0},
{492,	"Greenwood",1,1,1,1,1,0,0,1},
{410,	"Manana",1,1,1,1,0,1,1,0},
{481,	"BMX",0,0,0,0,0,0,0,0},
{482,	"Burrito",1,1,1,0,0,0,0,0},
{439,	"Stallion",1,1,1,1,0,1,1,0},
{413,	"Pony",1,1,1,0,0,0,0,0},
{419,	"Esperanto",1,1,1,0,0,0,0,0},
{475,	"Sabre",1,1,1,0,0,0,0,0},
{505,	"Rancher",1,1,1,1,1,1,0,1},
{420,	"Taxi",1,1,1,1,0,1,0,1},
{412,	"Voodoo",1,1,1,0,0,0,0,0},
{468,	"Sanchez",0,0,0,0,0,0,0,0},
{489,	"Rancher",1,1,1,1,1,1,0,1},
{405,	"Sentinel",1,1,1,1,0,1,0,0},
{400,	"Landstalker",1,1,1,0,0,1,0,0},
{440,	"Rumpo",1,1,1,0,0,0,0,0},
{436,	"Previon",1,1,1,1,1,1,1,0},
{496,	"BlistaCompact",1,1,1,1,1,1,1,1},
{422,	"Bobcat",1,1,1,0,0,1,1,0},
{416,	"Ambulance",1,1,1,0,0,0,0,0},
{461,	"PCJ-600",0,0,0,0,0,0,0,0},
{477,	"ZR350",1,1,1,0,1,1,1,0},
{500,	"Mesa",1,1,1,0,0,1,0,0},
{424,	"BFInjection",1,1,1,0,0,0,0,0},
{402,	"Buffalo",1,1,1,0,0,0,0,0},
{411,	"Infernus",1,1,1,0,0,0,0,0},
{504,	"BloodringBanger",1,1,1,0,0,0,0,0},
{478,	"Walton",1,1,1,0,0,0,0,0},
{535,	"Slamvan"},
{463,	"Freeway",0,0,0,0,0,0,0,0},
{494,	"Hotring",1,1,1,0,0,0,0,0},
{506,	"SuperGT",1,1,1,0,0,0,0,0},
{429,	"Banshee",1,1,1,0,0,0,0,0},
{451,	"Turismo",1,1,1,0,0,0,0,0},
{495,	"Sandking",1,1,1,0,0,0,0,0},
{415,	"Cheetah",1,1,1,1,0,1,1,0},
{470,	"Patriot",1,1,1,0,0,0,0,0},
{401,	"Bravura",1,1,1,1,1,1,1,1},
{403,	"Linerunner",1,1,1,0,0,0,0,0},
{404,	"Pereniel",1,1,1,1,0,1,1,0},
{406,	"Dumper",1,1,1,0,0,0,0,0},
{407,	"Firetruck",1,1,1,0,0,0,0,0},
{408,	"Trashmaster",1,1,1,0,0,0,0,0},
{409,	"Stretch",1,1,1,0,0,0,0,0},
{414,	"Mule",1,1,1,0,0,0,0,0},
{417,	"Leviathan",0,0,0,0,0,0,0,0},
{418,	"Moonbeam",1,1,1,0,0,0,0,0},
{421,	"Washington",1,1,1,1,0,1,0,0},
{423,	"MrWhoopee",1,1,1,0,0,0,0,0},
{425,	"Hunter",0,0,0,0,0,0,0,0},
{426,	"Premier",1,1,1,1,1,1,0,1},
{427,	"Enforcer",1,1,1,0,0,0,0,0},
{428,	"Securicar",1,1,1,0,0,0,0,0},
{430,	"Predator",0,0,0,0,0,0,0,0},
{431,	"Bus",1,1,1,0,0,0,0,0},
{432,	"Rhino",0,0,0,0,0,0,0,0},
{433,	"Barracks",1,1,1,0,0,0,0,0},
{434,	"Hotknife",1,1,1,0,0,0,0,0},
{435,	"Trailer",0,0,0,0,0,0,0,0},
{437,	"Coach",1,1,1,0,0,0,0,0},
{438,	"Cabbie",1,1,1,0,0,0,0,0},
{441,	"RCBandit",0,0,0,0,0,0,0,0},
{442,	"Romero",1,1,1,0,0,0,0,0},
{443,	"Packer",1,1,1,0,0,0,0,0},
{444,	"Monster",1,0,1,0,0,0,0,0},
{445,	"Admiral",1,1,1,0,0,0,0,0},
{446,	"Squalo",0,0,0,0,0,0,0,0},
{447,	"Seasparrow",0,0,0,0,0,0,0,0},
{448,	"Pizzaboy",0,0,0,0,0,0,0,0},
{449,	"Tram",0,0,0,0,0,0,0,0},
{450,	"Trailer",0,0,0,0,0,0,0,0},
{452,	"Speeder",0,0,0,0,0,0,0,0},
{453,	"Reefer",0,0,0,0,0,0,0,0},
{454,	"Tropic",0,0,0,0,0,0,0,0},
{455,	"Flatbed",1,1,1,0,0,0,0,0},
{456,	"Yankee",1,1,1,0,0,0,0,0},
{457,	"Caddy",0,0,0,0,0,0,0,0},
{458,	"Solair",1,1,1,0,0,0,0,0},
{459,	"Berkley'sRCVan",1,1,1,0,0,0,0,0},
{460,	"Skimmer",0,0,0,0,0,0,0,0},
{462,	"Faggio",0,0,0,0,0,0,0,0},
{464,	"RCBaron",0,0,0,0,0,0,0,0},
{465,	"RCRaider",0,0,0,0,0,0,0,0},
{466,	"Glendale",1,1,1,0,0,0,0,0},
{467,	"Oceanic",1,1,1,0,0,0,0,0},
{469,	"Sparrow",0,0,0,0,0,0,0,0},
{471,	"Quad",0,0,0,0,0,0,0,0},
{472,	"Coastguard",0,0,0,0,0,0,0,0},
{473,	"Dinghy",0,0,0,0,0,0,0,0},
{474,	"Hermes",1,1,1,0,0,0,0,0},
{476,	"Rustler",0,0,0,0,0,0,0,0},
{479,	"Regina",1,1,1,0,0,0,0,0},
{480,	"Comet",1,1,1,0,0,0,0,0},
{483,	"Camper",0,0,0,0,0,0,0,0},
{484,	"Marquis",0,0,0,0,0,0,0,0},
{485,	"Baggage",0,0,0,0,0,0,0,0},
{486,	"Dozer",0,0,0,0,0,0,0,0},
{487,	"Maverick",0,0,0,0,0,0,0,0},
{488,	"NewsChopper",1,1,1,0,0,0,0,0},
{490,	"FBIRancher",1,1,1,0,0,0,0,0},
{491,	"Virgo",1,1,1,1,0,1,1,1},
{493,	"Jetmax",0,0,0,0,0,0,0,0},
{497,	"PoliceMaverick",0,0,0,0,0,0,0,0},
{498,	"Boxville",1,1,1,0,0,0,0,0},
{499,	"Benson",1,1,1,0,0,0,0,0},
{501,	"RCGoblin",0,0,0,0,0,0,0,0},
{502,	"HotringRacer",1,1,1,0,0,0,0,0},
{503,	"HotringRacer",1,1,1,0,0,0,0,0},
{507,	"Elegant",1,1,1,0,0,0,0,0},
{508,	"Journey",0,0,0,0,0,0,0,0},
{511,	"Beagle",0,0,0,0,0,0,0,0},
{512,	"Cropdust",0,0,0,0,0,0,0,0},
{513,	"Stunt",0,0,0,0,0,0,0,0},
{514,	"Trailer",0,0,0,0,0,0,0,0},
{515,	"RoadTrain",1,1,1,0,0,0,0,0},
{516,	"Nebula",1,1,1,1,0,1,1,1},
{517,	"Majestic",1,1,1,1,0,1,1,1},
{518,	"Buccaneer",1,1,1,1,1,1,1,1},
{519,	"Shamal",0,0,0,0,0,0,0,0},
{520,	"Hydra",0,0,0,0,0,0,0,0},
{521,	"FCR-900",0,0,0,0,0,0,0,0},
{522,	"NRG-500",0,0,0,0,0,0,0,0},
{523,	"HPV1000",0,0,0,0,0,0,0,0},
{524,	"CementTruck",1,1,1,0,0,0,0,0},
{525,	"TowTruck",1,1,1,0,0,0,0,0},
{526,	"Fortune",1,1,1,0,0,0,0,0},
{527,	"Cadrona",1,1,1,1,0,1,1,0},
{528,	"FBITruck",1,1,1,0,0,0,0,0},
{529,	"Willard",1,1,1,1,1,1,1,1},
{530,	"Forklift",0,0,0,0,0,0,0,0},
{531,	"Tractor",0,0,0,0,0,0,0,0},
{532,	"Combine",0,0,0,0,0,0,0,0},
{533,	"Feltzer",1,1,1,0,0,0,0,0},
{534,	"Remington"},
{536,	"Blade"},
{537,	"Freight",0,0,0,0,0,0,0,0},
{538,	"Streak",0,0,0,0,0,0,0,0},
{539,	"Vortex",1,1,1,0,0,0,0,0},
{540,	"Vincent",1,1,1,0,0,0,0,0},
{541,	"Bullet",1,1,1,0,0,0,0,0},
{542,	"Clover",1,1,1,1,0,1,0,1},
{543,	"Sadler",1,1,1,0,0,0,0,0},
{544,	"Firetruck",1,1,1,0,0,0,0,0},
{545,	"Hustler",1,1,1,0,0,0,0,0},
{546,	"Intruder",1,1,1,1,1,1,1,1},
{547,	"Primo",1,1,1,1,0,1,0,1},
{548,	"Cargobob",0,0,0,0,0,0,0,0},
{549,	"Tampa",1,1,1,1,0,1,1,1},
{550,	"Sunrise",1,1,1,1,1,1,0,1},
{551,	"Merit",1,1,1,1,1,1,0,1},
{552,	"Utility",1,1,1,0,0,0,0,0},
{553,	"Nevada",0,0,0,0,0,0,0,0},
{554,	"Yosemite",1,1,1,0,0,0,0,0},
{555,	"Windsor",1,1,1,0,0,0,0,0},
{556,	"Monster",1,0,1,0,0,0,0,0},
{557,	"Monster",1,0,1,0,0,0,0,0},
{558,	"Uranus"},
{559,	"Jester"},
{560,	"Sultan"},
{561,	"Stratum"},
{562,	"Elegy"},
{563,	"Raindance",0,0,0,0,0,0,0,0},
{564,	"RCTiger",0,0,0,0,0,0,0,0},
{565,	"Flash"},
{566,	"Tahoma",1,1,1,0,0,0,0,0},
{567,	"Savanna"},
{568,	"Bandito",1,1,1,0,0,0,0,0},
{569,	"Freight",0,0,0,0,0,0,0,0},
{570,	"Trailer",0,0,0,0,0,0,0,0},
{571,	"Kart",1,1,1,0,0,0,0,0},
{572,	"Mower",1,1,1,0,0,0,0,0},
{573,	"Duneride",1,1,1,0,0,0,0,0},
{574,	"Sweeper",0,0,0,0,0,0,0,0},
{575,	"Broadway"},
{576,	"Tornado"},
{577,	"AT-400",0,0,0,0,0,0,0,0},
{578,	"DFT-30",1,1,1,0,0,0,0,0},
{579,	"Huntley",1,1,1,0,0,0,0,0},
{580,	"Stafford",1,1,1,1,1,1,1,0},
{581,	"BF-400",0,0,0,0,0,0,0,0},
{582,	"Newsvan",1,1,1,0,0,0,0,0},
{583,	"Tug",1,1,1,0,0,0,0,0},
{584,	"Trailer",0,0,0,0,0,0,0,0},
{585,	"Emperor",1,1,1,1,1,1,1,1},
{586,	"Wayfarer",0,0,0,0,0,0,0,0},
{587,	"Euros",1,1,1,0,0,0,0,0},
{588,	"Hotdog",1,1,1,0,0,0,0,0},
{589,	"Club",1,1,1,1,1,1,1,1},
{590,	"Trailer",0,0,0,0,0,0,0,0},
{591,	"Trailer",0,0,0,0,0,0,0,0},
{592,	"Andromada",0,0,0,0,0,0,0,0},
{593,	"Dodo",0,0,0,0,0,0,0,0},
{594,	"RCCam",0,0,0,0,0,0,0,0},
{595,	"Launch",0,0,0,0,0,0,0,0},
{596,	"PoliceCar(LSPD)",1,1,1,0,0,0,0,0},
{597,	"PoliceCar(SFPD)",1,1,1,0,0,0,0,0},
{598,	"PoliceCar(LVPD)",1,1,1,0,0,0,0,0},
{599,	"PoliceRanger",1,1,1,0,0,0,0,0},
{600,	"Picador",1,1,1,0,1,1,1,1},
{601,	"S.W.A.T.Van",1,1,1,0,0,0,0,0},
{602,	"Alpha",1,1,1,0,0,0,0,0},
{603,	"Phoenix",1,1,1,1,1,1,1,1},
{604,	"Glendale",1,1,1,0,0,0,0,0},
{605,	"Sadler",1,1,1,0,0,0,0,0},
{606,	"LuggageTrailer",0,0,0,0,0,0,0,0},
{607,	"LuggageTrailer",0,0,0,0,0,0,0,0},
{608,	"StairTrailer",0,0,0,0,0,0,0,0},
{609,	"Boxbville",0,0,0,0,0,0,0,0},
{610,	"FarmPlow",0,0,0,0,0,0,0,0},
{611,	"UtilityTrailer",0,0,0,0,0,0,0,0}
};
2. Написал структуру меню:
Code:
 /*TuningMenu = CreateMenu("Tuning Menu", 2, 200.0, 100.0, 150.0, 150.0);
 AddMenuItem(TuningMenu, 0, "Nitro");
 AddMenuItem(TuningMenu, 0, "Hydravlics");
 AddMenuItem(TuningMenu, 0, "Wheels");
 AddMenuItem(TuningMenu, 0, "Spoilers");
 AddMenuItem(TuningMenu, 0, "Roof");
 AddMenuItem(TuningMenu, 0, "Exhausts");
 AddMenuItem(TuningMenu, 0, "Side Skirts");
 AddMenuItem(TuningMenu, 0, "Hoods");
 AddMenuItem(TuningMenu, 0, "<Close Menu>");
 AddMenuItem(TuningMenu, 1, " ");
 AddMenuItem(TuningMenu, 1, "$");
 AddMenuItem(TuningMenu, 1, " ");
 AddMenuItem(TuningMenu, 1, " ");
 AddMenuItem(TuningMenu, 1, "$");
 AddMenuItem(TuningMenu, 1, " ");
 AddMenuItem(TuningMenu, 1, "$");
 AddMenuItem(TuningMenu, 1, " ");
 AddMenuItem(TuningMenu, 1, " ");
 NitroMenu = CreateMenu("Nitro", 2, 200.0, 100.0, 150.0, 150.0);
 AddMenuItem(NitroMenu, 0, "Nitro x2");
 AddMenuItem(NitroMenu, 0, "Nitro x5");
 AddMenuItem(NitroMenu, 0, "NItro x10");
 AddMenuItem(NitroMenu, 0, "<Back>");
 AddMenuItem(NitroMenu, 1, "$");
 AddMenuItem(NitroMenu, 1, "$");
 AddMenuItem(NitroMenu, 1, "$");
 AddMenuItem(NitroMenu, 1, " ");
 WheelsMenu = CreateMenu("Wheels", 2, 200.0, 100.0, 150.0, 150.0);
 AddMenuItem(WheelsMenu, 0, "Wheel SR1");
 AddMenuItem(WheelsMenu, 0, "Wheel SR2");
 AddMenuItem(WheelsMenu, 0, "Wheel SR3");
 AddMenuItem(WheelsMenu, 0, "Wheel SR4");
 AddMenuItem(WheelsMenu, 0, "Wheel SR5");
 AddMenuItem(WheelsMenu, 0, "Wheel SR6");
 AddMenuItem(WheelsMenu, 0, "Wheel GN1");
 AddMenuItem(WheelsMenu, 0, "Wheel GN2");
 AddMenuItem(WheelsMenu, 0, "Wheel OR");
 AddMenuItem(WheelsMenu, 0, "<Back>");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, "$");
 AddMenuItem(WheelsMenu, 1, " ");
 SplMenu = CreateMenu("Spoilers", 2, 200.0, 100.0, 150.0, 150.0);
 AddMenuItem(SplMenu, 0, "Spoiler 1");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 2");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 3");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 4");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 5");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 6");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 7");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 8");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "Spoiler 9");
 AddMenuItem(SplMenu, 1, "$");
 AddMenuItem(SplMenu, 0, "<Back>");
 AddMenuItem(SplMenu, 1, " ");
 BntMenu = CreateMenu("Hoods", 2, 200.0, 100.0, 150.0, 150.0);
 AddMenuItem(BntMenu, 0, "Hood 1");
 AddMenuItem(BntMenu, 1, "$");
 AddMenuItem(BntMenu, 0, "Hood 1");
 AddMenuItem(BntMenu, 1, "$");
 AddMenuItem(BntMenu, 0, "Hood 1");
 AddMenuItem(BntMenu, 1, "$");
 AddMenuItem(BntMenu, 0, "Hood 1");
 AddMenuItem(BntMenu, 1, "$");
 AddMenuItem(BntMenu, 0, "Hood 1");
 AddMenuItem(BntMenu, 1, "$");
 AddMenuItem(BntMenu, 0, "Hood 1");
 AddMenuItem(BntMenu, 1, "$");
 AddMenuItem(BntMenu, 0, "<Back>");
 AddMenuItem(BntMenu, 1, " ");
 ExhMenu = CreateMenu("Exhautst", 2, 200.0, 100.0, 150.0, 150.0);
 AddMenuItem(ExhMenu, 0, "Exh 1");
 AddMenuItem(ExhMenu, 1, "$");
 AddMenuItem(ExhMenu, 0, "Exh 1");
 AddMenuItem(ExhMenu, 1, "$");
 AddMenuItem(ExhMenu, 0, "Exh 1");
 AddMenuItem(ExhMenu, 1, "$");
 AddMenuItem(ExhMenu, 0, "Exh 1");
 AddMenuItem(ExhMenu, 1, "$");
 AddMenuItem(ExhMenu, 0, "Exh 1");
 AddMenuItem(ExhMenu, 1, "$");
 AddMenuItem(ExhMenu, 0, "<Back>");
 AddMenuItem(ExhMenu, 1, " ");*/
Serafim_sd is offline   Reply With Quote
Old 10/11/2009, 10:36 AM   #8
Serafim_sd
Big Clucker
 
Join Date: Jul 2008
Posts: 198
Reputation: 10
Default Re: Гараж тюнинга для всех машин сразу

3. Потом действия в меню
Code:
if(Current == TuningMenu) {
	  if(IsPlayerInAnyVehicle(playerid))
	  {
	    new vehicleid = GetPlayerVehicleID(playerid);
	    new massiveid;
	    for(new i;i<VEHICLES_SIZE;i++)
	    {
	      if(Vehicles[i][vehicle_model]==GetVehicleModel(vehicleid))
	      {
	      massiveid = i;
	      }
	    }
	    switch(row) {
		      case 0: {
    		    if(Vehicles[massiveid][t_nitro]==1) { HideMenuForPlayer(TuningMenu, playerid); ShowMenuForPlayer(NitroMenu, playerid); }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 1: {
         if(Vehicles[massiveid][t_hidro]==1) {
           if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1087);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); ShowMenuForPlayer(TuningMenu, playerid);}
      		    else { SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500"); }
    		    }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 2: {
    		    if(Vehicles[massiveid][t_wheels]==1) { HideMenuForPlayer(TuningMenu, playerid); ShowMenuForPlayer(WheelsMenu, playerid); }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 3: {
    		    if(Vehicles[massiveid][t_spl]==1) { HideMenuForPlayer(TuningMenu, playerid); ShowMenuForPlayer(SplMenu, playerid); }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 4: {
    		    if(Vehicles[massiveid][t_rf]==1) {
           if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1006);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); ShowMenuForPlayer(TuningMenu, playerid);}
      		    else { SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500"); ShowMenuForPlayer(TuningMenu, playerid);}
    		    }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 5: {
    		    if(Vehicles[massiveid][t_exh]==1) { HideMenuForPlayer(TuningMenu, playerid); ShowMenuForPlayer(ExhMenu, playerid); }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 6: {
    		    if(Vehicles[massiveid][t_wg]==1) {
           if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1017);	uAddVehicleComponent(vehicleid, 1007);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); ShowMenuForPlayer(TuningMenu, playerid);}
      		    else { SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500"); ShowMenuForPlayer(TuningMenu, playerid); }
    		    }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 7: {
    		    if(Vehicles[massiveid][t_bnt]==1) { HideMenuForPlayer(TuningMenu, playerid); ShowMenuForPlayer(BntMenu, playerid); }
         else { SendClientMessage(playerid,COLOR_RED,"* Деталь недоступна."); ShowMenuForPlayer(TuningMenu, playerid); }
       }
       case 8: TogglePlayerControllable(playerid, 1);
     }
   }
   return 1;
 }
 if(Current == NitroMenu) {
	  //TogglePlayerControllable(playerid, 1);
	  HideMenuForPlayer(NitroMenu, playerid);
	  if(IsPlayerInAnyVehicle(playerid))
	  {
	    new vehicleid = GetPlayerVehicleID(playerid);
	    switch(row) {
		      case 0: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1008);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 1: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1009);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 2: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1010);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
     }
     ShowMenuForPlayer(TuningMenu, playerid);
   }
   return 1;
 }
 if(Current == WheelsMenu) {
	  //TogglePlayerControllable(playerid, 1);
	  HideMenuForPlayer(WheelsMenu, playerid);
	  if(IsPlayerInAnyVehicle(playerid))
	  {
	    new vehicleid = GetPlayerVehicleID(playerid);
	    switch(row) {
		      case 0: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1079);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 1: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1075);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 2: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1074);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 3: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1081);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 4: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1080);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 5: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1073);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 6: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1082);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 7: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1085);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 8: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1025);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
     }
     ShowMenuForPlayer(TuningMenu, playerid);
   }
   return 1;
 }
 if(Current == SplMenu) {
	  //TogglePlayerControllable(playerid, 1);
	  HideMenuForPlayer(SplMenu, playerid);
	  if(IsPlayerInAnyVehicle(playerid))
	  {
	    new vehicleid = GetPlayerVehicleID(playerid);
	    switch(row) {
		      case 0: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1000);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 1: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1001);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 2: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1002);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 3: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1003);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 4: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1014);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 5: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1015);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 6: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1016);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 7: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1023);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 8: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1139);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
     }
     ShowMenuForPlayer(TuningMenu, playerid);
   }
   return 1;
 }
 if(Current == BntMenu) {
	  //TogglePlayerControllable(playerid, 1);
	  HideMenuForPlayer(BntMenu, playerid);
	  if(IsPlayerInAnyVehicle(playerid))
	  {
	    new vehicleid = GetPlayerVehicleID(playerid);
	    switch(row) {
		      case 0: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1004);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 1: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1005);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 2: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1011);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 3: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1012);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 4: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1142);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 5: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1143);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
     }
     ShowMenuForPlayer(TuningMenu, playerid);
   }
   return 1;
 }
 if(Current == ExhMenu) {
	  //TogglePlayerControllable(playerid, 1);
	  HideMenuForPlayer(ExhMenu, playerid);
	  if(IsPlayerInAnyVehicle(playerid))
	  {
	    new vehicleid = GetPlayerVehicleID(playerid);
	    switch(row) {
		      case 0: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1018);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 1: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1019);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 2: {
    		    if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1020);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 3: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1021);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
       case 4: {
         if (uGetPlayerMoney(playerid) >= 500) { uGivePlayerMoney(playerid,-500); uAddVehicleComponent(vehicleid, 1122);	SendClientMessage(playerid,COLOR_GREEN,"* Установлено!"); }
    		    else SendClientMessage(playerid, COLOR_RED, "* Вам необходимо $500");
       }
     }
     ShowMenuForPlayer(TuningMenu, playerid);
   }
 }*/
Меню вызывалось когда игрок на машине попадает в чекпоинт, но это каждый может сделать как он хочет... это пример из рабочего кода, так что некоторые функции были заменены моими аналогами

мдееее а с кодировочкой проблемы...
Serafim_sd is offline   Reply With Quote
Old 10/11/2009, 12:05 PM   #9
Jeka91
Little Clucker
 
Join Date: Jul 2009
Posts: 21
Reputation: 3
Default Re: Гараж тюнинга для всех машин сразу

блин есть у кого icq или skype
Jeka91 is offline   Reply With Quote
Old 10/11/2009, 01:09 PM   #10
heufix
Big Clucker
 
Join Date: May 2009
Posts: 139
Reputation: 10
Default Re: Гараж тюнинга для всех машин сразу

Quote:
Originally Posted by ZonReim
Quote:
Originally Posted by heufix
Забудь про старые менюшки! Используйте ShowPlayerDialog
Параметры:
(playerid, dialogid, style, caption[], info[], button1[], button2[])

Как используя его создать менюшку? :3
ShowPlayerDialog(playerid,dialogid,меню_стиль,масс ив, кнопка 1, кнопка2)
heufix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Сохранение в файлы убийства,деньги, DeaD_MaN Русский/Russian 2 24/06/2010 08:06 AM
Палево команд чата для РКОН админа (решенl Maximaka Русский/Russian 13 13/06/2010 01:18 PM
Сохранение трёх машын без регистрации Maximaka Русский/Russian 7 31/05/2010 06:40 PM
Просьба: Таймер на диалоговое окно KPECTak Русский/Russian 11 30/05/2010 04:45 PM
Проект интернационального ТДМ сервера and_sem Русский/Russian 40 26/02/2010 04:33 PM


All times are GMT. The time now is 02:43 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.