31.07.2012, 16:32
(
Последний раз редактировалось Makkebakke; 31.07.2012 в 18:06.
)
WARNING: COMPLETE SCRIPTING NOOB
So basically, I'm trying to make a menu that will spawn a vehicle there are 7 choices.
I've pretty much made it all already, but for some reason the compiling just screws up.
I partially followed the tutorial on the SAMP wiki, but that doesn't seem right.
Here's the code:
Thank you in advance if you can help in any way.
So basically, I'm trying to make a menu that will spawn a vehicle there are 7 choices.
I've pretty much made it all already, but for some reason the compiling just screws up.
I partially followed the tutorial on the SAMP wiki, but that doesn't seem right.
Here's the code:
Код:
new Menu:carspawnmenu;
if (CurrentMenu == carspawnmenu)
{
switch(row)
{
case 0: //Clover
{
CreateVehicle(542, 2816.1345, -2438.1392, 12.5097, 90.0000, -1, -1, 0);
}
case 1: //Picador
{
CreateVehicle(600, 2816.1345, -2438.1392, 12.5097, 90.0000, -1, -1, 0);
}
case 2: //Manana
{
CreateVehicle(410, 2816.1345, -2438.1392, 12.5097, 90.0000, -1, -1, 0);
}
case 3: //Tampa
{
CreateVehicle(549, 2816.1345, -2438.1392, 12.5097, 90.0000, -1, -1, 0);
}
case 4: //Walton
{
CreateVehicle(478, 2816.1345, -2438.1392, 12.5097, 90.0000, -1, -1, 0);
}
case 5: //Glendale Shit
{
CreateVehicle(604, 2816.1345, -2438.1392, 12.5097, 90.0000, -1, -1, 0);
}
case 6: //Majestic
{
CreateVehicle(517, 2816.1345, -2438.1392, 12.5097, 90.0000, -1, -1, 0);
}
}
}
public OnGameModeInit()
{
carspawnmenu = CreateMenu("Carspawnmenu", 1, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(carspawnmenu, 0, "Clover");
AddMenuItem(carspawnmenu, 0, "Picador");
AddMenuItem(carspawnmenu, 0, "Manana");
AddMenuItem(carspawnmenu, 0, "Tampa");
AddMenuItem(carspawnmenu, 0, "Walton");
AddMenuItem(carspawnmenu, 0, "Glendale");
AddMenuItem(carspawnmenu, 0, "Majestic");
return 1;
}
public OnPlayerSpawn(playerid)
{
ShowMenuForPlayer(carspawnmenu, playerid);
return 1;
}


