Exercice en Pawn - Avancй
#24

Voila j'ai edit pour les paramиtres optionnel mкme si toute fois ca restй optionel et voila ma fonction GetVehicleModelByName :

Code:
new NomVehicule[212][32] = {
   "Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana",
   "Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat",
   "Mr Whoopee","BF Injection","Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife",
   "Trailer","Previon","Coach","Cabbie","Stallion","Rumpo","RC Bandit","Romero","Packer","Monster Truck","Admiral","Squalo",
   "Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van",
   "Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider","Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard",
   "Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina","Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick",
   "News Chopper","Rancher","FBI Rancher","Virgo","Greenwood","Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville",
   "Benson","Mesa","RC Goblin","Hotring Racer","Hotring Racer","Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike",
   "Beagle","Cropdust","Stunt","Tanker","RoadTrain","Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000",
   "Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck","Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade",
   "Freight","Streak","Vortex","Vincent","Bullet","Clover","Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise",
   "Merit","Utility","Nevada","Yosemite","Windsor","Monster Truck","Monster Truck","Uranus","Jester","Sultan","Stratum","Elegy","Raindance",
   "RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer","Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400",
   "DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer","Emperor","Wayfarer","Euros","Hotdog","Club","Trailer","Trailer","Andromada",
   "Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)","Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha",
   "Phoenix","Glendale","Sadler","Luggage Trailer","Luggage Trailer","Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};


stock GetVehicleModelByName(vname[])    // Dйtermine l'id du model avec le nom du vйhicule
{
    for(new i = 0; i < 211; i++)
    {
        if(strfind(NomVehicule[i], vname, true) != -1)
        return i + 400;
    }
    return -1;
}

EDIT: Il n'y aucune fonction de ce type dans gl_common
Reply


Messages In This Thread
Exercice en Pawn - Avancй - by Dutheil - 16.04.2015, 20:40
Re : Exercice en Pawn - Avancй - by Z3N0N - 16.04.2015, 21:03
Re : Exercice en Pawn - Avancй - by Ivory - 17.04.2015, 15:01
Re : Exercice en Pawn - Avancй - by Dutheil - 17.04.2015, 15:16
Re : Exercice en Pawn - Avancй - by Ivory - 17.04.2015, 16:06
Re : Exercice en Pawn - Avancй - by Chipardeur - 17.04.2015, 16:17
Re : Exercice en Pawn - Avancй - by Ivory - 17.04.2015, 16:19
Re : Exercice en Pawn - Avancй - by Dutheil - 17.04.2015, 16:31
Re : Exercice en Pawn - Avancй - by Ivory - 17.04.2015, 18:52
Re : Exercice en Pawn - Avancй - by TheWWorld - 19.04.2015, 11:18
Re : Exercice en Pawn - Avancй - by Vukilore - 19.04.2015, 11:31
Re : Exercice en Pawn - Avancй - by Sunaxx - 22.04.2015, 18:50
Re : Exercice en Pawn - Avancй - by MrAlexisX2 - 24.04.2015, 12:19
Re : Exercice en Pawn - Avancй - by TheWWorld - 27.04.2015, 17:44
Re : Exercice en Pawn - Avancй - by nicolaskettler - 03.05.2015, 22:45
Re : Exercice en Pawn - Avancй - by nicolaskettler - 03.05.2015, 22:47
Re : Exercice en Pawn - Avancй - by S4t3K - 04.05.2015, 09:31
Re: Exercice en Pawn - Avancй - by Noliax8 - 04.05.2015, 09:36
Re : Exercice en Pawn - Avancй - by S4t3K - 04.05.2015, 09:40
Re : Exercice en Pawn - Avancй - by Chipardeur - 04.05.2015, 23:38
Re : Exercice en Pawn - Avancй - by S4t3K - 05.05.2015, 12:42
Re : Exercice en Pawn - Avancй - by Ivory - 05.05.2015, 14:46
Re : Exercice en Pawn - Avancй - by S4t3K - 05.05.2015, 15:08
Re : Exercice en Pawn - Avancй - by Ivory - 05.05.2015, 17:09
Re : Exercice en Pawn - Avancй - by Chipardeur - 06.05.2015, 02:12
Re: Exercice en Pawn - Avancй - by TheArrow - 06.05.2015, 07:34
Re : Exercice en Pawn - Avancй - by Ivory - 06.05.2015, 08:42
Re : Exercice en Pawn - Avancй - by S4t3K - 06.05.2015, 14:18
Re : Exercice en Pawn - Avancй - by Ivory - 06.05.2015, 15:35
Re : Exercice en Pawn - Avancй - by Dutheil - 20.05.2015, 19:25
Re : Exercice en Pawn - Avancй - by S4t3K - 06.11.2015, 10:29
Re : Exercice en Pawn - Avancй - by S4t3K - 08.11.2015, 15:36

Forum Jump:


Users browsing this thread: 4 Guest(s)