Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <cstdio>
- #include <cstring>
- #include <cmath>
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
- /* SA:MP GDK Includes: */
- #include <sampgdk/a_players.hpp>
- #include <sampgdk/a_samp.hpp>
- #include <sampgdk/a_objects.hpp>
- #include <sampgdk/a_vehicles.hpp>
- #include <sampgdk/core.hpp>
- #include <sampgdk/plugin.h>
- /* Namespace: */
- using namespace std;
- char VehNames[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", "/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", "/NRG", "/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", "/Monstera", "/Monsterb", "/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", "/Trailer2", "/Emperor", "/Wayfarer", "/Euros", "/Hotdog", "/Club",
- "/Trailer3", "/Trailer4", "/Andromeda", "/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 Trailer2", "/Stair Trailer", "/Boxville",
- "/Farm Plow", "/Utility Trailer"
- };
- int GetVehicleModelIDFromName(char *vname) {
- int i = 0;
- while(i < 212) {
- if(strstr(vname, VehNames[i])) {
- return i + 400;
- }
- i++;
- }
- return -1;
- }
- void main() {
- char * Vehicle = {
- (char *)VehNames[1][1]
- };
- GetVehicleModelIDFromName(Vehicle);
- printf("%s", Vehicle);
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement