Help neededwith message boxes
#1

Ok, the problem is when i open any box like cars list and i want to take one car, then it doesnt take effect, doesnt depend whawt does the menu consist, can anyone help?
Reply
#2

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 0)
	{
	    if(listitem == 0)
	    {
	        // Option one on the menu goes here
	    }
	    if(listitem == 1)
	    {
	        // Option two on the menu goes here
	    }
	    if(listitem == 2)
	    {
	        // Option three on the menu goes here
	    }
	    return 1;
	}
}
Reply
#3

Quote:
Originally Posted by The DeLuca
Посмотреть сообщение
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 0)
	{
	    if(listitem == 0)
	    {
	        // Option one on the menu goes here
	    }
	    if(listitem == 1)
	    {
	        // Option two on the menu goes here
	    }
	    if(listitem == 2)
	    {
	        // Option three on the menu goes here
	    }
	    return 1;
	}
}
everything is done like that but still doesnt work :/
Reply
#4

Show us your code so we can find your mistake.
Reply
#5

Quote:
Originally Posted by Campbell-
Посмотреть сообщение
Show us your code so we can find your mistake.
its not my made but here it is:

PHP код:
public OnFilterScriptInit()
{
    print(
"Vehicle Selection Menu v"#VERSION" by [03]Garsino has been loaded.");
    
return 1;
}
public 
OnFilterScriptExit()
{
    print(
"Vehicle Selection Menu v"#VERSION" by [03]Garsino has been unloaded.");
    
return 1;
}
public 
OnPlayerConnect(playerid)
{
    
cVeh[playerid] = INVALID_VEHICLE_ID;
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
VehicleDestroy(playerid);
    return 
1;
}
stock VehicleDestroy(playeridbool:always_destroy false)
{
    if(
cVeh[playerid] == INVALID_VEHICLE_ID) return 0;
    if(
always_destroy == true)
    {
        
DestroyVehicle(cVeh[playerid]);
    }
    else
    {
        if(!
IsVehicleOccupied(cVeh[playerid]))
        {
            
DestroyVehicle(cVeh[playerid]);
        }
        else return 
0;
    }
    
cVeh[playerid] = INVALID_VEHICLE_ID;
    return 
1;
}
#if COMMAND_TYPE == ZCMD
CMD:carmenu(playeridparams[])
{
    
#if ADMIN_ONLY == true
        
if(!IsPlayerAdmin(playerid)) return 0;
    
#endif
     
_ShowDialog(playerid);
    return 
1;
}
#endif
#if COMMAND_TYPE == DCMD
dcmd_carmenu(playeridparams[])
{
    
#pragma unused params
    #if ADMIN_ONLY == true
        
if(!IsPlayerAdmin(playerid)) return 0;
    
#endif
     
_ShowDialog(playerid);
    return 
1;
}
#endif
#if COMMAND_TYPE != ZCMD
public OnPlayerCommandText(playeridcmdtext[])
{
    
#if COMMAND_TYPE == DCMD
    
dcmd(carmenu7cmdtext);
    
#else
    
if(!strcmp(cmdtext"/carmenu"))
    {
        
#if ADMIN_ONLY == true
            
if(!IsPlayerAdmin(playerid)) return 0;
        
#endif
         
_ShowDialog(playerid);
    }
    
#endif
    
return 0;
}
#endif
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    new 
cMenuString[408];
    
cMenuString "";
//==============================================================================
//                                   Carmenu
//==============================================================================
    
if(dialogid == DIALOGID && response)
    {
        switch(
listitem)
        {
               case 
0ShowPlayerDialog(playerid, (DIALOGID 1), DIALOG_STYLE_LIST"Bikes""BF-400\nBike\nBMX\nHPV1000\nFaggio\nFCR-900\nFreeway\nMountain Bike\nNRG-500\nPCJ-600\nPizzaboy\nSanchez\nWayfarer\nQuad\nBack""Select""Cancel");
            case 
1// Cars [A-E]
            
{
                
strcat(cMenuString"Admiral\nAlpha\nAmbulance\nBaggage\nBandito\nBanshee\nBarracks\nBenson\nBerkley's RC Van\nBF Injection\nBlade\nBlista Compact\nBloodring Banger\nBobcat\nBoxville 1\nBoxville 2\nBravura\nBroadway\nBuccaneer\nBuffalo\nBullet\nBurrito\nBus\nCabbie\n");
                
strcat(cMenuString"Caddy\nCadrona\nCamper\nCement Truck\nCheetah\nClover\nClub\nCoach\nCombine Harvester\nComet\nDFT-30\nDozer\nDumper\nDune(ride)\nElegant\nElegy\nEmperor\nEsperanto\nEuros\nBack");
                
ShowPlayerDialog(playerid, (DIALOGID 2), DIALOG_STYLE_LIST"Cars 1 [A-E]"cMenuString"Select""Cancel");
            }
            case 
2// Cars 2 [F-P]
            
{
                
strcat(cMenuString"FBI Rancher\nFBI Truck\nFeltzer\nFiretruck 1\nFiretruck 2\nFlash\nFlatbed\nForklift\nFortune\nGlendale 1\nGlendale 2\nGreenwood\nHermes\nHotdog\nHotknife\nHotring Racer 1\nHotring Racer 2\nHotring Racer 3\nHuntley\nHustler\nInfernus\nIntruder\nJester\nJourney\nKart\nLandstalker\nLinerunner\nMajestic\nManana\nMerit\nMesa\nMonster\nMonster A\nMonster B\nMoonbeam\nMower\nMr Whoopee\nMule\nNebula\n");
                
strcat(cMenuString"Newsvan\nOceanic\nPacker\nBack");
                
ShowPlayerDialog(playerid, (DIALOGID 3), DIALOG_STYLE_LIST"Cars 2 [F-P]"cMenuString"Select""Cancel");
            }
            case 
3:
            {
                
strcat(cMenuString"Patriot\nPerenniel\nPetrol Tanker\nPhoenix\nPicador\nPolice Car (LSPD)\nPolice Car (SFPD)\nPolice Car (LVPD)\nPolice Ranger\nPolice Truck (Enforcer)\nPolice Truck (SWAT)\nPony\nPremier\nPrevion\nPrimo\nRancher\nRegina\nRemington\n");
                
strcat(cMenuString"Rhino\nRoadtrain\nRomero\nRumpo\nSabre\nSadler 1\nSadler 2\nSandking\nSavanna\nSecuricar\nSentinel\nSlamvan\nSolair\nStafford\nStallion\nStratum\nStretch\nSultan\nSunrise\nBack");
                
ShowPlayerDialog(playerid, (DIALOGID 4), DIALOG_STYLE_LIST"Cars 3 [P-S]"cMenuString"Select""Cancel");
            }
            case 
4ShowPlayerDialog(playerid, (DIALOGID 5), DIALOG_STYLE_LIST"Cars 4 [S-Z]""Super GT\nSweeper\nTahoma\nTampa\nTaxi\nTornado\nTowtruck\nTractor\nTrashmaster\nTug\nTurismo\nUranus\nUtility Van\nVincent\nVirgo\nVoodoo\nWalton\nWashington\nWilliard\nWindsor\nYankee\nYosemite\nZR-350\nBack""Select""Cancel");
            case 
5ShowPlayerDialog(playerid, (DIALOGID 6), DIALOG_STYLE_LIST"Helicopters""Cargobob\nHunter\nLeviathan\nMaverick\nPolice Maverick\nNews Chopper\nRaindance\nSparrow\nSea Sparrow\nBack""Select""Cancel");
            case 
6ShowPlayerDialog(playerid, (DIALOGID 7), DIALOG_STYLE_LIST"Planes""Andromada\nAT-400\nBeagle\nCropduster\nDodo\nHydra\nNevada\nRustler\nShamal\nSkimmer\nStuntplane\nBack""Select""Cancel");
            case 
7ShowPlayerDialog(playerid, (DIALOGID 8), DIALOG_STYLE_LIST"Boats""Coastguard\nDinghy\nJetmax\nLaunch\nMarquis\nPredator\nReefer\nSpeeder\nSquallo\nTropic\nBack""Select""Cancel");
            case 
8ShowPlayerDialog(playerid, (DIALOGID 9), DIALOG_STYLE_LIST"Trains""Brown Streak\nFreight Box Trailer\nFreight Flat Trailer\nFreight\nStreak Trailer\nTram\nBack""Select""Cancel");
            case 
9ShowPlayerDialog(playerid, (DIALOGID 10), DIALOG_STYLE_LIST"Trailers""Article Trailer 1\nArticle Trailer 2\nArticle Trailer 3\nBaggage Trailer (A)\nBaggage Trailer (B)\nFarm Trailer\nPetrol Trailer\nTug Stairs Trailer\nUtility Trailer\nBack""Select""Cancel");
            case 
10ShowPlayerDialog(playerid, (DIALOGID 11), DIALOG_STYLE_LIST"RC Vehicles + Vortex""RC Bandit\nRC Cam\nRC Tiger\nRC Baron\nRC Goblin\nRC Raider\nVortex\nBack""Select""Cancel");
        }
        return 
1;
    }
//==============================================================================
//                                   Bikes
//==============================================================================
    
if(dialogid == (DIALOGID 1) && response// Bikes
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid581); // BF-400
            
case 1CreateVehicleEx(playerid509); // Bike
            
case 2CreateVehicleEx(playerid481);//  BMX
            
case 3CreateVehicleEx(playerid523); //  HPV1000
            
case 4CreateVehicleEx(playerid462); //  Faggio
            
case 5CreateVehicleEx(playerid521); // FCR-900
            
case 6CreateVehicleEx(playerid463); // Freeway
            
case 7CreateVehicleEx(playerid510); // Mountain Bike
            
case 8CreateVehicleEx(playerid522); // NRG-500
            
case 9CreateVehicleEx(playerid461); // PCJ-600
            
case 10CreateVehicleEx(playerid448); // Pizzaboy
            
case 11CreateVehicleEx(playerid468); // Sanchez
            
case 12CreateVehicleEx(playerid586); // Wayfarer
            
case 13CreateVehicleEx(playerid471); // Quad
            
case 14_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                   Cars 1
//==============================================================================
    
if(dialogid == (DIALOGID 2) && response// Cars 1
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid445); // Admiral
            
case 1CreateVehicleEx(playerid602); // Alpha
            
case 2CreateVehicleEx(playerid416); // Ambulance
            
case 3CreateVehicleEx(playerid485); // Baggage
            
case 4CreateVehicleEx(playerid568); // Bandito
            
case 5CreateVehicleEx(playerid429); // Banshee
            
case 6CreateVehicleEx(playerid433); // Barracks
            
case 7CreateVehicleEx(playerid499); // Benson
            
case 8CreateVehicleEx(playerid459); // Berkley's RC Van
            
case 9CreateVehicleEx(playerid424);  //BF Injection
            
case 10CreateVehicleEx(playerid536); // Blade
            
case 11CreateVehicleEx(playerid496); // Blista Compact
            
case 12CreateVehicleEx(playerid504); // Bloodring Banger
            
case 13CreateVehicleEx(playerid422); // Bobcat
            
case 14CreateVehicleEx(playerid609); // Boxville 1
            
case 15CreateVehicleEx(playerid498); // Boxville 2
            
case 16CreateVehicleEx(playerid401); // Bravura
            
case 17CreateVehicleEx(playerid575); // Broadway
            
case 18CreateVehicleEx(playerid518); // Buccaneer
            
case 19CreateVehicleEx(playerid402); // Buffalo
            
case 20CreateVehicleEx(playerid541);  // Bullet
            
case 21CreateVehicleEx(playerid482);  // Burrito
            
case 22CreateVehicleEx(playerid431); // Bus
            
case 23CreateVehicleEx(playerid438); // Cabbie
            
case 24CreateVehicleEx(playerid457); // Caddy
            
case 25CreateVehicleEx(playerid527); // Cadrona
            
case 26CreateVehicleEx(playerid483); // Camper
            
case 27CreateVehicleEx(playerid524); // Cement Truck
            
case 28CreateVehicleEx(playerid415); // Cheetah
            
case 29CreateVehicleEx(playerid542); // Clover
            
case 30CreateVehicleEx(playerid589); // Club
            
case 31CreateVehicleEx(playerid437); // Coach
            
case 32CreateVehicleEx(playerid532); // Combine Harvester
            
case 33CreateVehicleEx(playerid480); // Comet
            
case 34CreateVehicleEx(playerid578); // DFT-30
            
case 35CreateVehicleEx(playerid486); // Dozer
            
case 36CreateVehicleEx(playerid406); // Dumper
            
case 37CreateVehicleEx(playerid573); // Dune(ride)
            
case 38CreateVehicleEx(playerid507); // Elegant
            
case 39CreateVehicleEx(playerid562); // Elegy
            
case 40CreateVehicleEx(playerid585); // Emperor
            
case 41CreateVehicleEx(playerid419); // Esperanto
            
case 42CreateVehicleEx(playerid587); // Euros
            
case 43_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                   Cars 2
//==============================================================================
    
if(dialogid == (DIALOGID 3) && response// Cars 2
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid490); // FBI Rancher
            
case 1CreateVehicleEx(playerid528); // FBI Truck
            
case 2CreateVehicleEx(playerid533); // Feltzer
            
case 3CreateVehicleEx(playerid544); // Firetruck 1
            
case 4CreateVehicleEx(playerid407); // Firetruck 2
            
case 5CreateVehicleEx(playerid565); // Flash
            
case 6CreateVehicleEx(playerid455); // Flatbed
            
case 7CreateVehicleEx(playerid530); // Forklift
            
case 8CreateVehicleEx(playerid526); // Fortune
            
case 9CreateVehicleEx(playerid466); // Glendale 1
            
case 10CreateVehicleEx(playerid604); // Glendale 2
            
case 11CreateVehicleEx(playerid492); // Greenwood
            
case 12CreateVehicleEx(playerid474); // Hermes
            
case 13CreateVehicleEx(playerid588); // Hotdog
            
case 14CreateVehicleEx(playerid434); // Hotknife
            
case 15CreateVehicleEx(playerid502); // Hotring Racer 1
            
case 16CreateVehicleEx(playerid503); // Hotring Racer 2
            
case 17CreateVehicleEx(playerid494); // Hotring Racer 3
            
case 18CreateVehicleEx(playerid579); // Huntley
            
case 19CreateVehicleEx(playerid545); // Hustler
            
case 20CreateVehicleEx(playerid411); // Infernus
            
case 21CreateVehicleEx(playerid546); // Intruder
            
case 22CreateVehicleEx(playerid559); // Jester
            
case 23CreateVehicleEx(playerid508); // Journey
            
case 24CreateVehicleEx(playerid571); // Kart
            
case 25CreateVehicleEx(playerid400); // Landstalker
            
case 26CreateVehicleEx(playerid403); // Linerunner
            
case 27CreateVehicleEx(playerid517); // Majestic
            
case 28CreateVehicleEx(playerid410); // Manana
            
case 29CreateVehicleEx(playerid551); // Merit
            
case 30CreateVehicleEx(playerid500); // Mesa
            
case 31CreateVehicleEx(playerid444); // Monster
            
case 32CreateVehicleEx(playerid556); // Monster A
            
case 33CreateVehicleEx(playerid557); // Monster B
            
case 34CreateVehicleEx(playerid418); // Moonbeam
            
case 35CreateVehicleEx(playerid572); // Mower
            
case 36CreateVehicleEx(playerid423); // Mr Whoopee
            
case 37CreateVehicleEx(playerid414); // Mule
            
case 38CreateVehicleEx(playerid516); // Nebula
            
case 39CreateVehicleEx(playerid582); // Newsvan
            
case 40CreateVehicleEx(playerid467); // Oceanic
            
case 41CreateVehicleEx(playerid443); // Packer
            
case 42_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                         Cars 3
//==============================================================================
    
if(dialogid == (DIALOGID 4) && response// Cars 3
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid470); // Patriot
            
case 1CreateVehicleEx(playerid404); // Perenniel
            
case 2CreateVehicleEx(playerid514); // Petrol Tanker
            
case 3CreateVehicleEx(playerid603); // Phoenix
            
case 4CreateVehicleEx(playerid600); // Picador
            
case 5CreateVehicleEx(playerid596); // Police Car LSPD
            
case 6CreateVehicleEx(playerid597); // Police Car SFPD
            
case 7CreateVehicleEx(playerid598); // Police Car LVPD
            
case 8CreateVehicleEx(playerid599); // Police Ranger
            
case 9CreateVehicleEx(playerid427); // Police Truck (Enforcer)
            
case 10CreateVehicleEx(playerid601); // Police Truck (SWAT)
            
case 11CreateVehicleEx(playerid413); // Pony
            
case 12CreateVehicleEx(playerid426); // Premier
            
case 13CreateVehicleEx(playerid436); // Previon
            
case 14CreateVehicleEx(playerid547); // Primo
            
case 15CreateVehicleEx(playerid489); // Rancher
            
case 16CreateVehicleEx(playerid479); // Regina
            
case 17CreateVehicleEx(playerid534); // Remington
            
case 18CreateVehicleEx(playerid432); // Rhino
            
case 19CreateVehicleEx(playerid515); // Roadtrain
            
case 20CreateVehicleEx(playerid442); // Romero
            
case 21CreateVehicleEx(playerid440); // Rumpo
            
case 22CreateVehicleEx(playerid475); // Sabre
            
case 23CreateVehicleEx(playerid543); // Sadler 1
            
case 24CreateVehicleEx(playerid605); // Sadler 2
            
case 25CreateVehicleEx(playerid495); // Sandking
            
case 26CreateVehicleEx(playerid567); // Savanna
            
case 27CreateVehicleEx(playerid428); // Securicar
            
case 28CreateVehicleEx(playerid405); // Sentinel
            
case 29CreateVehicleEx(playerid535); // Slamvan
            
case 30CreateVehicleEx(playerid458); // Solair
            
case 31CreateVehicleEx(playerid580); // Stafford
            
case 32CreateVehicleEx(playerid439); // Stallion
            
case 33CreateVehicleEx(playerid561); // Stratum
            
case 34CreateVehicleEx(playerid409); // Stretch
            
case 35CreateVehicleEx(playerid560);// Sultan
            
case 36CreateVehicleEx(playerid550); // Sunrise
            
case 37_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                   Cars 4
//==============================================================================
    
if(dialogid == (DIALOGID 5) && response// Cars 4
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid506); // Super GT
            
case 1CreateVehicleEx(playerid574); // Sweeper
            
case 2CreateVehicleEx(playerid566); // Tahoma
            
case 3CreateVehicleEx(playerid549); // Tampa
            
case 4CreateVehicleEx(playerid420); // Taxi
            
case 5CreateVehicleEx(playerid576); // Tornado
            
case 6CreateVehicleEx(playerid525); // Towtruck
            
case 7CreateVehicleEx(playerid531); // Tractor
            
case 8CreateVehicleEx(playerid408); // Trashmaster
            
case 9CreateVehicleEx(playerid583); // Tug
            
case 10CreateVehicleEx(playerid451); // Turismo
            
case 11CreateVehicleEx(playerid558); // Uranus
            
case 12CreateVehicleEx(playerid552); // Utility Van
            
case 13CreateVehicleEx(playerid540); // Vincent
            
case 14CreateVehicleEx(playerid491); // Virgo
            
case 15CreateVehicleEx(playerid412); // Voodoo
            
case 16CreateVehicleEx(playerid478); // Walton
            
case 17CreateVehicleEx(playerid421); // Washington
            
case 18CreateVehicleEx(playerid529); // Williard
            
case 19CreateVehicleEx(playerid555); // Windsor
            
case 20CreateVehicleEx(playerid456); // Yankee
            
case 21CreateVehicleEx(playerid554); // Yosemite
            
case 22CreateVehicleEx(playerid477); // ZR-350
            
case 23_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                   Helicopters
//==============================================================================
    
if(dialogid == (DIALOGID 6) && response// Helicopters
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid548); // Cargobob
            
case 1CreateVehicleEx(playerid425); // Hunter
            
case 2CreateVehicleEx(playerid417); // Leviathan
            
case 3CreateVehicleEx(playerid487); // Maverick
            
case 4CreateVehicleEx(playerid497); // Police Maverick
            
case 5CreateVehicleEx(playerid488); // News Chopper
            
case 6CreateVehicleEx(playerid563); // Raindance
            
case 7CreateVehicleEx(playerid469); // Sparrow
            
case 8CreateVehicleEx(playerid447); // Sea Sparrow
            
case 9:  _ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                  Planes
//==============================================================================
    
if(dialogid == (DIALOGID 7) && response// Planes
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid592); // Andromada
            
case 1CreateVehicleEx(playerid577); // At-400
            
case 2CreateVehicleEx(playerid511); // Beagle
            
case 3CreateVehicleEx(playerid512); // Cropduster
            
case 4CreateVehicleEx(playerid593); // Dodo
            
case 5CreateVehicleEx(playerid520); // Hydra
            
case 6CreateVehicleEx(playerid553); // Nevada
            
case 7CreateVehicleEx(playerid476); // Rustler
            
case 8CreateVehicleEx(playerid519); // Shamal
            
case 9CreateVehicleEx(playerid460); // Skimmer
            
case 10CreateVehicleEx(playerid513); // Stuntplane
            
case 11_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                  Boats
//==============================================================================
    
if(dialogid == (DIALOGID 8) && response// Boats
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid472); // Coastguard
            
case 1CreateVehicleEx(playerid473); // Dinghy
            
case 2CreateVehicleEx(playerid493); // Jetmax
            
case 3CreateVehicleEx(playerid595); // Launch
            
case 4CreateVehicleEx(playerid484); // Marquis
            
case 5CreateVehicleEx(playerid430); // Predator
            
case 6CreateVehicleEx(playerid453); // Reefer
            
case 7CreateVehicleEx(playerid452); // Speeder
            
case 8CreateVehicleEx(playerid446); // Squallo
            
case 9CreateVehicleEx(playerid454); // Tropic
            
case 10_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                   Trains
//==============================================================================
    
if(dialogid == (DIALOGID 9) && response// Trains
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid537); // Brown Streak
            
case 1CreateVehicleEx(playerid590); // Freight Box Trailer
            
case 2CreateVehicleEx(playerid569); // Freight Flat Trailer
            
case 3CreateVehicleEx(playerid538); // Freight
            
case 4CreateVehicleEx(playerid570); // Streak Trailer
            
case 5CreateVehicleEx(playerid449); // Tram
            
case 6_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                                   Trailers
//==============================================================================
    
if(dialogid == (DIALOGID 10) && response// Trailers
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid435); // Article Trailer 1
            
case 1CreateVehicleEx(playerid450); // Article Trailer 2
            
case 2CreateVehicleEx(playerid591); // Article Trailer 3
            
case 3CreateVehicleEx(playerid606); // Baggage Trailer (A)
            
case 4CreateVehicleEx(playerid607); // Baggage Trailer (B)
            
case 5CreateVehicleEx(playerid610); // Farm Trailer
            
case 6CreateVehicleEx(playerid584); // Petrol Trailer
            
case 7CreateVehicleEx(playerid608); // Tug Stairs Trailer
            
case 8CreateVehicleEx(playerid611); // Utility Trailer
            
case 9_ShowDialog(playerid);
        }
        return 
1;
    }
//==============================================================================
//                          RC Vehicles + Vortex
//==============================================================================
    
if(dialogid == (DIALOGID 11) && response// RC Vehicles + Vortex
    
{
        switch(
listitem)
        {
            case 
0CreateVehicleEx(playerid441); // RC Bandit
            
case 1CreateVehicleEx(playerid594); // RC Cam
            
case 2CreateVehicleEx(playerid564); // RC Tiger
            
case 3CreateVehicleEx(playerid464); // RC Baron
            
case 4CreateVehicleEx(playerid501); // RC Goblin
            
case 5CreateVehicleEx(playerid465); // RC Raider
            
case 6CreateVehicleEx(playerid539); // Vortex
            
case 7_ShowDialog(playerid);
        }
        return 
1;
    }
    return 
0;
}
//==============================================================================
stock IsVehicleOccupied(vehicleid)
{
      for(new 
iMAX_PLAYERSi++)
    {
        if(
IsPlayerInVehicle(ivehicleid)) return 1;
    }
    return 
0;
}
//==============================================================================
stock CreateVehicleEx(playeridmodelid)
{
    new 
pState GetPlayerState(playerid);
    if(
pState != PLAYER_STATE_DRIVER && pState != PLAYER_STATE_ONFOOT) return 0;
    
#if ADMIN_ONLY_VEHICLES == true
    
switch(modelid)
    {
        case 
464449570537538569590430220476577592447425432:
        {
            if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid0xFFFFFFFF"Only RCON admins may spawn this vehicle.");
        }
    }
    
#endif
    
new world GetPlayerVirtualWorld(playerid), interior GetPlayerInterior(playerid), Float:Pos[4], Float:Velocity[3], vehicleid GetPlayerVehicleID(playerid);
    
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]), GetPlayerFacingAngle(playeridPos[3]);
    
VehicleDestroy(playerid);
    if(
vehicleid != 0)
    {
        
GetVehicleVelocity(vehicleidVelocity[0], Velocity[1], Velocity[2]);
        
DestroyVehicle(vehicleid);
    }
    
cVeh[playerid] = CreateVehicle(modelidPos[0], Pos[1], Pos[2], Pos[3], -1, -1, -1);
     
LinkVehicleToInterior(cVeh[playerid], interior), SetVehicleVirtualWorld(cVeh[playerid], world), SetVehiclePos(cVeh[playerid], Pos[0], Pos[1], (Pos[2] + 1.5));
    
SetVehicleZAngle(cVeh[playerid], Pos[3]), PutPlayerInVehicle(playeridcVeh[playerid], 0), SetVehicleVelocity(cVeh[playerid], Velocity[0], Velocity[1], Velocity[2]);
    return 
1;
}
//============================================================================== 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)