new const VehicleModelName[212][] =
{
{"Landstalker"}, {"Bravura"}, {"Buffalo"}, {"Linerunner"}, {"Perennial"},
{"Sentinel"}, {"Dumper"}, {"Fire Truck"}, {"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"}, {"Article Trailer 1"}, {"Previon"},
{"Coach"}, {"Cabbie"}, {"Stallion"}, {"Rumpo"}, {"RC Bandit"}, {"Romero"},
{"Packer"}, {"Monster"}, {"Admiral"}, {"Squalo"}, {"Seasparrow"}, {"Pizzaboy"},
{"Tram"}, {"Article Trailer 2"}, {"Turismo"}, {"Speeder"}, {"Reefer"},
{"Tropic"}, {"Flatbed"}, {"Yankee"}, {"Caddy"}, {"Solair"}, {"Berkleys RC Van"},
{"Skimmer"}, {"PCJ-600"}, {"Faggio"}, {"Freeway"}, {"RC Baron"}, {"RC Raider"},
{"Glendale"}, {"Oceanic"}, {"Sanchez"}, {"Sparrow"}, {"Patriot"}, {"Quadbike"},
{"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 Racer"}, {"Sandking"}, {"Blista Compact"}, {"Police Maverick"},
{"Boxville"}, {"Benson"}, {"Mesa"}, {"RC Goblin"}, {"Hotring Racer (A)"},
{"Hotring Racer (B)"}, {"Bloodring Banger"}, {"Rancher 2"},
{"Super GT"}, {"Elegant"}, {"Journey"}, {"Bike"}, {"Mountain Bike"},
{"Beagle"}, {"Cropduster"}, {"Stuntplane"}, {"Tanker"}, {"Roadtrain"},
{"Nebula"}, {"Majestic"}, {"Buccaneer"}, {"Shamal"}, {"Hydra"}, {"FCR-900"},
{"NRG-500"}, {"HPV1000"}, {"Cement Truck"}, {"Towtruck"}, {"Fortune"}, {"Cardona"},
{"FBI Truck"}, {"Willard"}, {"Forklift"}, {"Tractor"}, {"Combine Harvester"},
{"Feltzer"}, {"Remington"}, {"Slamvan"}, {"Blade"}, {"Freight"}, {"Brown Streak"},
{"Vortex"}, {"Vincent"}, {"Bullet"}, {"Clover"}, {"Sadler"}, {"Fire Truck 2"},
{"Hustler"}, {"Intruder"}, {"Primo"}, {"Cargobob"}, {"Tampa"}, {"Sunrise"},
{"Merit"}, {"Utility Van"}, {"Nevada"}, {"Yosemite"}, {"Windsor"}, {"Monster (A)"},
{"Monster (B)"}, {"Uranus"}, {"Jester"}, {"Sultan"}, {"Stratum"}, {"Elegy"},
{"Raindance"}, {"RC Tiger"}, {"Flash"}, {"Tahoma"}, {"Savanna"}, {"Bandito"},
{"Freight"}, {"Brown Streak"}, {"Kart"}, {"Mower"}, {"Dune"}, {"Sweeper"},
{"Broadway"}, {"Tornado"}, {"AT-400"}, {"DFT-30"}, {"Huntley"}, {"Stafford"},
{"BF-400"}, {"Newsvan"}, {"Tug"}, {"Petrol Truck"}, {"Emperor"}, {"Wayfarer"},
{"Euros"}, {"Hotdog"}, {"Club"}, {"Freight Box"}, {"Article Trailer 3"}, {"Andromada"},
{"Dodo"}, {"RC Cam"}, {"Launch"}, {"Police (LSPD)"}, {"Police (SFPD)"}, {"Police (LVPD)"},
{"Ranger"}, {"Picador"}, {"S.W.A.T."}, {"Alpha"}, {"Phoenix"}, {"Glendale 2"},
{"Sadler 2"}, {"Baggage Box A"}, {"Baggage Box B"}, {"Stairs Trailer"}, {"Boxville 2"},
{"Farm Trailer"}, {"Utility Trailer"}
};
main()
{
for(new i, m; i < sizeof(VehicleModelName); i++)
{
m = GetVehicleModelFromName2(VehicleModelName[i]);
if(m != GetVehicleModelFromName(VehicleModelName[i]))
{
printf("[Ошибка] %s (ID %d | %d)", VehicleModelName
[i
], m
, GetVehicleModelFromName
(VehicleModelName
[i
])); }
}
printf("%d", GetVehicleModelFromName
("NRG-500")); }
stock GetVehicleModelFromName (const modelname[])
{
if ('0' <= modelname[0] <= '9') {
new model
= strval (modelname
); if (400 <= model <= 611)
return model;
}
hash = 0x811c9dc5,
i = 0;
while (i != len)
hash
= hash
* 0x01000193 * toupper(modelname
[i
++]); switch (hash) {
case 0xaa9e670e: return 400;
case 0x48d21a32: return 401;
case 0x0ebd03c0: return 402;
case 0x40a03ca1: return 403;
case 0x853e3eef: return 404;
case 0x7b7768b1: return 405;
case 0xad1566f6: return 406;
case 0x4577ce94: return 407;
case 0x47e9f403: return 408;
case 0x9eb12194: return 409;
case 0xd520d42b: return 410;
case 0xb7b9c69b: return 411;
case 0xb6a00af7: return 412;
case 0xb61d5491: return 413;
case 0x3dfac62a: return 414;
case 0x7c7c1761: return 415;
case 0x0e9f0bc5: return 416;
case 0x52bec465: return 417;
case 0x4cd67c23: return 418;
case 0x10e27b70: return 419;
case 0x2dd87431: return 420;
case 0xd212535f: return 421;
case 0xbd967cd6: return 422;
case 0x38850d7d: return 423;
case 0x1937d442: return 424;
case 0xc8e2a7df: return 425;
case 0x76044eb7: return 426;
case 0x4456efc1: return 427;
case 0x02e6d6fc: return 428;
case 0x7b9888f3: return 429;
case 0xeac37188: return 430;
case 0x4a4a49e5: return 431;
case 0x8a31ff09: return 432;
case 0x28490cb8: return 433;
case 0xbca7314d: return 434;
case 0xa464a069: return 435;
case 0xdd5384bc: return 436;
case 0x48d9ab71: return 437;
case 0x41e98457: return 438;
case 0x10ccd46d: return 439;
case 0xf8318edc: return 440;
case 0xca4e49aa: return 441;
case 0x26f4341b: return 442;
case 0xf47205df: return 443;
case 0xf88fe98d: return 444;
case 0x15891ca5: return 445;
case 0x11163d0c: return 446;
case 0x4ad9564a: return 447;
case 0xf4905965: return 448;
case 0x46b84865: return 449;
case 0xa464a06a: return 450;
case 0xaefff156: return 451;
case 0xa2e52fdf: return 452;
case 0xd3c8aa5a: return 453;
case 0x0041f5ce: return 454;
case 0x0b8e9335: return 455;
case 0xf4870598: return 456;
case 0xde6ad316: return 457;
case 0x03e4ca73: return 458;
case 0x49ebfd34: return 459;
case 0x7b47444f: return 460;
case 0x57691f99: return 461;
case 0x29d02a98: return 462;
case 0x782fecd4: return 463;
case 0x3eb8a214: return 464;
case 0xb641ed19: return 465;
case 0xb57abbc1: return 466;
case 0x5aed41dd: return 467;
case 0x16f0a71d: return 468;
case 0x9c3efc0f: return 469;
case 0xaa6d9f72: return 470;
case 0xecb7efe7: return 471;
case 0x36ce238c: return 472;
case 0x9a1ae78c: return 473;
case 0x219f72cf: return 474;
case 0xa3c8578a: return 475;
case 0xd239f6e4: return 476;
case 0xa8f2f226: return 477;
case 0x31845dfa: return 478;
case 0xf43a1af1: return 479;
case 0x8af82867: return 480;
case 0x424a3d46: return 481;
case 0xa7679208: return 482;
case 0x46ef4c97: return 483;
case 0xe8533915: return 484;
case 0xbfb9b3d1: return 485;
case 0x7e26fbbd: return 486;
case 0xe0e3224d: return 487;
case 0x5eefe90d: return 488;
case 0x84ee7984: return 489;
case 0x935fccc9: return 490;
case 0x1d4bb7ee: return 491;
case 0x2fdc4145: return 492;
case 0x36c038a0: return 493;
case 0x1713c38b: return 494;
case 0xc9d59cf2: return 495;
case 0x92626af1: return 496;
case 0xfd790f5d: return 497;
case 0xbb280574: return 498;
case 0x95c900f4: return 499;
case 0x332357cf: return 500;
case 0x81aece69: return 501;
case 0xfcee83d9: return 502;
case 0xffee8880: return 503;
case 0x6a55a6b0: return 504;
case 0xd6c0f1b6: return 505;
case 0x08b15607: return 506;
case 0xb3f36289: return 507;
case 0x97f2c0d3: return 508;
case 0xc7e7acb6: return 509;
case 0x24fd7b1f: return 510;
case 0x49fbd09b: return 511;
case 0xa27c4402: return 512;
case 0x6a3791a7: return 513;
case 0x839513e0: return 514;
case 0x737caa4b: return 515;
case 0x14dd24a8: return 516;
case 0x23da0a81: return 517;
case 0x5bc3e987: return 518;
case 0x436330b9: return 519;
case 0xe54d78d7: return 520;
case 0x1e5fe420: return 521;
case 0xbba5b096: return 522;
case 0x48c69e2e: return 523;
case 0xbd61f518: return 524;
case 0x0ee457f6: return 525;
case 0x8c81436c: return 526;
case 0x94465685: return 527;
case 0xc9fc379f: return 528;
case 0xbe05b898: return 529;
case 0xc052fd0a: return 530;
case 0x7505fe02: return 531;
case 0xde29dfa6: return 532;
case 0x4ff6de45: return 533;
case 0x5d681434: return 534;
case 0x3a8f6e89: return 535;
case 0xdd51d1b9: return 536;
case 0x1324f0c0: return 537;
case 0x9607d81f: return 538;
case 0xfccd5305: return 539;
case 0x5da79c32: return 540;
case 0x2d99ee4d: return 541;
case 0x6a2308d6: return 542;
case 0x93523e04: return 543;
case 0x0bbe1066: return 544;
case 0xf7a8238e: return 545;
case 0x39350504: return 546;
case 0x4f9aa22c: return 547;
case 0x3c014f04: return 548;
case 0x11f3e134: return 549;
case 0x4aa88126: return 550;
case 0x7ba5beec: return 551;
case 0x5ba64158: return 552;
case 0xf22a86a8: return 553;
case 0x7bcd021a: return 554;
case 0x31786ba1: return 555;
case 0x7231ebfb: return 556;
case 0x7131ea16: return 557;
case 0x72dcaff1: return 558;
case 0xa29b3fa6: return 559;
case 0x0781ea30: return 560;
case 0x41c4c04f: return 561;
case 0xa57a2703: return 562;
case 0x4b86adcc: return 563;
case 0x0a297361: return 564;
case 0x068791d5: return 565;
case 0x3a40b379: return 566;
case 0xd6e869bb: return 567;
case 0x50b80f72: return 568;
case 0x3fde6cba: return 569;
case 0x28b46bce: return 570;
case 0xc5f9d9db: return 571;
case 0x04bc1b61: return 572;
case 0x113801f3: return 573;
case 0x4aea0646: return 574;
case 0x289df8bc: return 575;
case 0x6a3bfa48: return 576;
case 0xf461e519: return 577;
case 0xe28dbeab: return 578;
case 0x38b7183c: return 579;
case 0xdec103ae: return 580;
case 0x2e8836be: return 581;
case 0xf544d67b: return 582;
case 0x061e524b: return 583;
case 0xb70d19c2: return 584;
case 0xcaea9ab7: return 585;
case 0x8e499490: return 586;
case 0xe172dc61: return 587;
case 0xcd5812c4: return 588;
case 0x34f9b9e5: return 589;
case 0xb63179f5: return 590;
case 0xa464a06b: return 591;
case 0x032e5a9e: return 592;
case 0xbb2a0285: return 593;
case 0x59511571: return 594;
case 0xa3bcae40: return 595;
case 0x43a8290d: return 596;
case 0x19fcd299: return 597;
case 0x74ec68aa: return 598;
case 0x441f7486: return 599;
case 0x8865004f: return 600;
case 0xc06b7436: return 601;
case 0x4073673b: return 602;
case 0xc2c7e666: return 603;
case 0x2a532ebb: return 604;
case 0xd2518a36: return 605;
case 0xe191b043: return 606;
case 0xe191b040: return 607;
case 0x0b9c6f7a: return 608;
case 0x38ebb6c6: return 609;
case 0x819a3fa4: return 610;
case 0xaa2568c2: return 611;
}
return INVALID_VEHICLE_ID;
}
stock GetVehicleModelFromName2(const model_name[])
{
if ('0' <= model_name[0] <= '9')
{
new model
= strval(model_name
); if(400 <= model <= 611)
{
return model;
}
}
static const sVehicleModelName[212][] =
{
{!"Landstalker"}, {!"Bravura"}, {!"Buffalo"}, {!"Linerunner"}, {!"Perennial"},
{!"Sentinel"}, {!"Dumper"}, {!"Fire Truck"}, {!"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"}, {!"Article Trailer 1"}, {!"Previon"},
{!"Coach"}, {!"Cabbie"}, {!"Stallion"}, {!"Rumpo"}, {!"RC Bandit"}, {!"Romero"},
{!"Packer"}, {!"Monster"}, {!"Admiral"}, {!"Squalo"}, {!"Seasparrow"}, {!"Pizzaboy"},
{!"Tram"}, {!"Article Trailer 2"}, {!"Turismo"}, {!"Speeder"}, {!"Reefer"},
{!"Tropic"}, {!"Flatbed"}, {!"Yankee"}, {!"Caddy"}, {!"Solair"}, {!"Berkleys RC Van"},
{!"Skimmer"}, {!"PCJ-600"}, {!"Faggio"}, {!"Freeway"}, {!"RC Baron"}, {!"RC Raider"},
{!"Glendale"}, {!"Oceanic"}, {!"Sanchez"}, {!"Sparrow"}, {!"Patriot"}, {!"Quadbike"},
{!"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 Racer"}, {!"Sandking"}, {!"Blista Compact"}, {!"Police Maverick"},
{!"Boxville"}, {!"Benson"}, {!"Mesa"}, {!"RC Goblin"}, {!"Hotring Racer (A)"},
{!"Hotring Racer (B)"}, {!"Bloodring Banger"}, {!"Rancher 2"},
{!"Super GT"}, {!"Elegant"}, {!"Journey"}, {!"Bike"}, {!"Mountain Bike"},
{!"Beagle"}, {!"Cropduster"}, {!"Stuntplane"}, {!"Tanker"}, {!"Roadtrain"},
{!"Nebula"}, {!"Majestic"}, {!"Buccaneer"}, {!"Shamal"}, {!"Hydra"}, {!"FCR-900"},
{!"NRG-500"}, {!"HPV1000"}, {!"Cement Truck"}, {!"Towtruck"}, {!"Fortune"}, {!"Cardona"},
{!"FBI Truck"}, {!"Willard"}, {!"Forklift"}, {!"Tractor"}, {!"Combine Harvester"},
{!"Feltzer"}, {!"Remington"}, {!"Slamvan"}, {!"Blade"}, {!"Freight"}, {!"Brown Streak"},
{!"Vortex"}, {!"Vincent"}, {!"Bullet"}, {!"Clover"}, {!"Sadler"}, {!"Fire Truck 2"},
{!"Hustler"}, {!"Intruder"}, {!"Primo"}, {!"Cargobob"}, {!"Tampa"}, {!"Sunrise"},
{!"Merit"}, {!"Utility Van"}, {!"Nevada"}, {!"Yosemite"}, {!"Windsor"}, {!"Monster (A)"},
{!"Monster (B)"}, {!"Uranus"}, {!"Jester"}, {!"Sultan"}, {!"Stratum"}, {!"Elegy"},
{!"Raindance"}, {!"RC Tiger"}, {!"Flash"}, {!"Tahoma"}, {!"Savanna"}, {!"Bandito"},
{!"Freight"}, {!"Brown Streak"}, {!"Kart"}, {!"Mower"}, {!"Dune"}, {!"Sweeper"},
{!"Broadway"}, {!"Tornado"}, {!"AT-400"}, {!"DFT-30"}, {!"Huntley"}, {!"Stafford"},
{!"BF-400"}, {!"Newsvan"}, {!"Tug"}, {!"Petrol Truck"}, {!"Emperor"}, {!"Wayfarer"},
{!"Euros"}, {!"Hotdog"}, {!"Club"}, {!"Freight Box"}, {!"Article Trailer 3"}, {!"Andromada"},
{!"Dodo"}, {!"RC Cam"}, {!"Launch"}, {!"Police (LSPD)"}, {!"Police (SFPD)"}, {!"Police (LVPD)"},
{!"Ranger"}, {!"Picador"}, {!"S.W.A.T."}, {!"Alpha"}, {!"Phoenix"}, {!"Glendale 2"},
{!"Sadler 2"}, {!"Baggage Box A"}, {!"Baggage Box B"}, {!"Stairs Trailer"}, {!"Boxville 2"},
{!"Farm Trailer"}, {!"Utility Trailer"}
};
for(new i = 0; i < sizeof(sVehicleModelName); i++)
{
if(strfind(sVehicleModelName
[i
], model_name
, true) != -1) return i+400;
}
return INVALID_VEHICLE_ID;
}