need help with array
#1

Hello I need some help with this certain code below it give me an error well compiling
Код:
#define MAX_VEHICLES_IDS 612

//later

new carname[64][MAX_VEHICLES_IDS] =
{400,"Landstalker"},
{401,"Bravura"},
{402,"Buffalo"},
{403,"Linerunner"},
{404,"Perenniel"},
{405,"Sentinel"},
{406,"Dumper"},
{407,"Firetruck"},
{408,"Trashmaster"},
{409,"Stretch"},
{410,"Manana"},
{411,"Infernus"},
{412,"Voodoo"},
{413,"Pony"},
{414,"Mule"},
{415,"Cheetah"},
{416,"Ambulance"},
{417,"Leviathan"},
{418,"Moonbeam"},
{419,"Esperanto"},
{420,"Taxi"},
{421,"Washington"},
{422,"Bobcat"},
{423,"Mr Whoopee"},
{424,"BF Injection"},
{425,"Hunter"},
{426,"Premier"},
{427,"Enforcer"},
{428,"Securicar"},
{429,"Banshee"},
{430,"Predator"},
{431,"Bus"},
{432,"Rhino"},
{433,"Barracks"},
{434,"Hotknife"},
{435,"Article Trailer"},
{436,"Previon"},
{437,"Coach"},
{438,"Cabbie"},
{439,"Stallion"},
{440,"Rumpo"},
{441,"RC Bandit"},
{442,"Romero"},
{443,"Packer"},
{444,"Monster"},
{445,"Admiral"},
{446,"Squallo"},
{447,"Seasparrow"},
{448,"Pizzaboy"},
{449,"Tram"},
{450,"Article Trailer 2"},
{451,"Turismo"},
{452,"Speeder"},
{453,"Reefer"},
{454,"Tropic"},
{455,"Flatbed"},
{456,"Yankee"},
{457,"Caddy"},
{458,"Solair"},
{459,"Topfun Van (Berkley's RC)"},
{460,"Skimmer"},
{461,"PCJ-600"},
{462,"Faggio"},
{463,"Freeway"},
{464,"RC Baron"},
{465,"RC Raider"},
{466,"Glendale"},
{467,"Oceanic"},
{468,"Sanchez"},
{469,"Sparrow"},
{470,"Patriot"},
{471,"Quad"},
{472,"Coastguard"},
{473,"Dinghy"},
{474,"Hermes"},
{475,"Sabre"},
{476,"Rustler"},
{477,"ZR-350"},
{478,"Walton"},
{479,"Regina"},
{480,"Comet"},
{481,"BMX"},
{482,"Burrito"},
{483,"Camper"},
{484,"Marquis"},
{485,"Baggage"},
{486,"Dozer"},
{487,"Maverick"},
{488,"SAN News Maverick"},
{489,"Rancher"},
{490,"FBI Rancher"},
{491,"Virgo"},
{492,"Greenwood"},
{493,"Jetmax"},
{494,"Hotring Racer"},
{495,"Sandking"},
{496,"Blista Compact"},
{497,"Police Maverick"},
{498,"Boxville"},
{499,"Benson"},
{500,"Mesa"},
{501,"RC Goblin"},
{502,"Hotring Racer"},
{503,"Hotring Racer"},
{504,"Bloodring Banger"},
{505,"Rancher"},
{506,"Super GT"},
{507,"Elegant"},
{508,"Journey"},
{509,"Bike"},
{510,"Mountain Bike"},
{511,"Beagle"},
{512,"Cropduster"},
{513,"Stuntplane"},
{514,"Tanker"},
{515,"Roadtrain"},
{516,"Nebula"},
{517,"Majestic"},
{518,"Buccaneer"},
{519,"Shamal"},
{520,"Hydra"},
{521,"FCR-900"},
{522,"NRG-500"},
{523,"HPV1000"},
{524,"Cement Truck"},
{525,"Towtruck"},
{526,"Fortune"},
{527,"Cadrona"},
{528,"FBI Truck"},
{529,"Willard"},
{530,"Forklift"},
{531,"Tractor"},
{532,"Combine Harvester"},
{533,"Feltzer"},
{534,"Remington"},
{535,"Slamvan"},
{536,"Blade"},
{537,"Freight (Train)"},
{538,"Brownstreak (Train)"},
{539,"Vortex"},
{540,"Vincent"},
{541,"Bullet"},
{542,"Clover"},
{543,"Sadler"},
{544,"Firetruck LA"},
{545,"Hustler"},
{546,"Intruder"},
{547,"Primo"},
{548,"Cargobob"},
{549,"Tampa"},
{550,"Sunrise"},
{551,"Merit"},
{552,"Utility Van"},
{553,"Nevada"},
{554,"Yosemite"},
{555,"Windsor"},
{556,"Monster A"},
{557,"Monster B"},
{558,"Uranus"},
{559,"Jester"},
{560,"Sultan"},
{561,"Stratum"},
{562,"Elegy"},
{563,"Raindance"},
{564,"RC Tiger"},
{565,"Flash"},
{566,"Tahoma"},
{567,"Savanna"},
{568,"Bandito"},
{569,"Freight Flat Trailer (Train)"},
{570,"Streak Trailer (Train)"},
{571,"Kart"},
{572,"Mower"},
{573,"Dune"},
{574,"Sweeper"},
{575,"Broadway"},
{576,"Tornado"},
{577,"AT400"},
{578,"DFT-30"},
{579,"Huntley"},
{580,"Stafford"},
{581,"BF-400"},
{582,"Newsvan"},
{583,"Tug"},
{584,"Petrol Trailer"},
{585,"Emperor"},
{586,"Wayfarer"},
{587,"Euros"},
{588,"Hotdog"},
{589,"Club"},
{590,"Freight Box Trailer (Train)"},
{591,"Article Trailer 3"},
{592,"Andromada"},
{593,"Dodo"},
{594,"RC Cam"},
{595,"Launch"},
{596,"Police Car (LSPD)"},
{597,"Police Car (SFPD)"},
{598,"Police Car (LVPD)"},
{599,"Police Ranger"},
{600,"Picador"},
{601,"S.W.A.T."},
{602,"Alpha"},
{603,"Phoenix"},
{604,"Glendale Shit"},
{605,"Sadler Shit"},
{606,"Baggage Trailer A"},
{607,"Baggage Trailer B"},
{608,"Tug Stairs Trailer"},
{609,"Boxville"},
{610,"Farm Trailer"},
{611,"Utility Trailer"};
Reply
#2

pawn Код:
#define MAX_VEHICLES_IDS 612

new VehicleNames[212][MAX_VEHICLES_IDS] = {
   "Landstalker",  "Bravura",  "Buffalo", "Linerunner", "Perennial", "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", "Pizza Scooter", "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 Truck",  "Nevada", "Yosemite", "Windsor",  "Monster",
   "Monster","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RCTiger",
   "Flash","Tahoma","Savanna", "Bandito", "Freight", "Trailer", "Kart", "Mower",
   "Dune", "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",
   "Cruiser", "Cruiser","Cruiser","Police Ranger",
   "Picador",   "S.W.A.T. Van",  "Alpha",   "Phoenix",   "Glendale",   "Sadler",
   "Luggage Trailer","Luggage Trailer","Stair Trailer", "Boxville", "Farm Plow",
   "Utility Trailer"
};
Reply
#3

You're not helping by not giving the warning you're getting.
I'm not getting any errors.

The issue could very well be related to the first array size not being high enough though. Try switching it up like this:
pawn Код:
new carname[MAX_VEHICLES_IDS][64]
Reply
#4

Quote:
Originally Posted by Revo
Посмотреть сообщение
You're not helping by not giving the warning you're getting.
I'm not getting any errors.

The issue could very well be related to the first array size not being high enough though. Try switching it up like this:
pawn Код:
new carname[MAX_VEHICLES_IDS][64]
all right here is the error

Код:
C:\Users\joshua\Desktop\sampserver\pawno\jbcars.pwn(48) : error 020: invalid symbol name ""
C:\Users\joshua\Desktop\sampserver\pawno\jbcars.pwn(732) : warning 203: symbol is never used: ""
C:\Users\joshua\Desktop\sampserver\pawno\jbcars.pwn(732) : warning 203: symbol is never used: "carname"
Reply
#5

pawn Код:
new carname[][][] = {
{400,"Landstalker"},
{401,"Bravura"},
{402,"Buffalo"},
{403,"Linerunner"},
{404,"Perenniel"},
{405,"Sentinel"},
{406,"Dumper"},
{407,"Firetruck"},
{408,"Trashmaster"},
{409,"Stretch"},
{410,"Manana"},
{411,"Infernus"},
{412,"Voodoo"},
{413,"Pony"},
{414,"Mule"},
{415,"Cheetah"},
{416,"Ambulance"},
{417,"Leviathan"},
{418,"Moonbeam"},
{419,"Esperanto"},
{420,"Taxi"},
{421,"Washington"},
{422,"Bobcat"},
{423,"Mr Whoopee"},
{424,"BF Injection"},
{425,"Hunter"},
{426,"Premier"},
{427,"Enforcer"},
{428,"Securicar"},
{429,"Banshee"},
{430,"Predator"},
{431,"Bus"},
{432,"Rhino"},
{433,"Barracks"},
{434,"Hotknife"},
{435,"Article Trailer"},
{436,"Previon"},
{437,"Coach"},
{438,"Cabbie"},
{439,"Stallion"},
{440,"Rumpo"},
{441,"RC Bandit"},
{442,"Romero"},
{443,"Packer"},
{444,"Monster"},
{445,"Admiral"},
{446,"Squallo"},
{447,"Seasparrow"},
{448,"Pizzaboy"},
{449,"Tram"},
{450,"Article Trailer 2"},
{451,"Turismo"},
{452,"Speeder"},
{453,"Reefer"},
{454,"Tropic"},
{455,"Flatbed"},
{456,"Yankee"},
{457,"Caddy"},
{458,"Solair"},
{459,"Topfun Van (Berkley's RC)"},
{460,"Skimmer"},
{461,"PCJ-600"},
{462,"Faggio"},
{463,"Freeway"},
{464,"RC Baron"},
{465,"RC Raider"},
{466,"Glendale"},
{467,"Oceanic"},
{468,"Sanchez"},
{469,"Sparrow"},
{470,"Patriot"},
{471,"Quad"},
{472,"Coastguard"},
{473,"Dinghy"},
{474,"Hermes"},
{475,"Sabre"},
{476,"Rustler"},
{477,"ZR-350"},
{478,"Walton"},
{479,"Regina"},
{480,"Comet"},
{481,"BMX"},
{482,"Burrito"},
{483,"Camper"},
{484,"Marquis"},
{485,"Baggage"},
{486,"Dozer"},
{487,"Maverick"},
{488,"SAN News Maverick"},
{489,"Rancher"},
{490,"FBI Rancher"},
{491,"Virgo"},
{492,"Greenwood"},
{493,"Jetmax"},
{494,"Hotring Racer"},
{495,"Sandking"},
{496,"Blista Compact"},
{497,"Police Maverick"},
{498,"Boxville"},
{499,"Benson"},
{500,"Mesa"},
{501,"RC Goblin"},
{502,"Hotring Racer"},
{503,"Hotring Racer"},
{504,"Bloodring Banger"},
{505,"Rancher"},
{506,"Super GT"},
{507,"Elegant"},
{508,"Journey"},
{509,"Bike"},
{510,"Mountain Bike"},
{511,"Beagle"},
{512,"Cropduster"},
{513,"Stuntplane"},
{514,"Tanker"},
{515,"Roadtrain"},
{516,"Nebula"},
{517,"Majestic"},
{518,"Buccaneer"},
{519,"Shamal"},
{520,"Hydra"},
{521,"FCR-900"},
{522,"NRG-500"},
{523,"HPV1000"},
{524,"Cement Truck"},
{525,"Towtruck"},
{526,"Fortune"},
{527,"Cadrona"},
{528,"FBI Truck"},
{529,"Willard"},
{530,"Forklift"},
{531,"Tractor"},
{532,"Combine Harvester"},
{533,"Feltzer"},
{534,"Remington"},
{535,"Slamvan"},
{536,"Blade"},
{537,"Freight (Train)"},
{538,"Brownstreak (Train)"},
{539,"Vortex"},
{540,"Vincent"},
{541,"Bullet"},
{542,"Clover"},
{543,"Sadler"},
{544,"Firetruck LA"},
{545,"Hustler"},
{546,"Intruder"},
{547,"Primo"},
{548,"Cargobob"},
{549,"Tampa"},
{550,"Sunrise"},
{551,"Merit"},
{552,"Utility Van"},
{553,"Nevada"},
{554,"Yosemite"},
{555,"Windsor"},
{556,"Monster A"},
{557,"Monster B"},
{558,"Uranus"},
{559,"Jester"},
{560,"Sultan"},
{561,"Stratum"},
{562,"Elegy"},
{563,"Raindance"},
{564,"RC Tiger"},
{565,"Flash"},
{566,"Tahoma"},
{567,"Savanna"},
{568,"Bandito"},
{569,"Freight Flat Trailer (Train)"},
{570,"Streak Trailer (Train)"},
{571,"Kart"},
{572,"Mower"},
{573,"Dune"},
{574,"Sweeper"},
{575,"Broadway"},
{576,"Tornado"},
{577,"AT400"},
{578,"DFT-30"},
{579,"Huntley"},
{580,"Stafford"},
{581,"BF-400"},
{582,"Newsvan"},
{583,"Tug"},
{584,"Petrol Trailer"},
{585,"Emperor"},
{586,"Wayfarer"},
{587,"Euros"},
{588,"Hotdog"},
{589,"Club"},
{590,"Freight Box Trailer (Train)"},
{591,"Article Trailer 3"},
{592,"Andromada"},
{593,"Dodo"},
{594,"RC Cam"},
{595,"Launch"},
{596,"Police Car (LSPD)"},
{597,"Police Car (SFPD)"},
{598,"Police Car (LVPD)"},
{599,"Police Ranger"},
{600,"Picador"},
{601,"S.W.A.T."},
{602,"Alpha"},
{603,"Phoenix"},
{604,"Glendale Shit"},
{605,"Sadler Shit"},
{606,"Baggage Trailer A"},
{607,"Baggage Trailer B"},
{608,"Tug Stairs Trailer"},
{609,"Boxville"},
{610,"Farm Trailer"},
{611,"Utility Trailer"}
};
Reply
#6

Quote:
Originally Posted by Jony_Cruze
Посмотреть сообщение
pawn Код:
#define MAX_VEHICLES_IDS 612

new VehicleNames[212][MAX_VEHICLES_IDS] = {
   "Landstalker",  "Bravura",  "Buffalo", "Linerunner", "Perennial", "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", "Pizza Scooter", "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 Truck",  "Nevada", "Yosemite", "Windsor",  "Monster",
   "Monster","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RCTiger",
   "Flash","Tahoma","Savanna", "Bandito", "Freight", "Trailer", "Kart", "Mower",
   "Dune", "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",
   "Cruiser", "Cruiser","Cruiser","Police Ranger",
   "Picador",   "S.W.A.T. Van",  "Alpha",   "Phoenix",   "Glendale",   "Sadler",
   "Luggage Trailer","Luggage Trailer","Stair Trailer", "Boxville", "Farm Plow",
   "Utility Trailer"
};
this work greate accept I don't think it will be in the order I like. Let me explain myself
ok This will start at 0 and end at 211 i want it to start at 400 and end at 611
Reply
#7

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
new carname[][][] = {
{400,"Landstalker"},
{401,"Bravura"},
{402,"Buffalo"},
{403,"Linerunner"},
{404,"Perenniel"},
{405,"Sentinel"},
{406,"Dumper"},
{407,"Firetruck"},
{408,"Trashmaster"},
{409,"Stretch"},
{410,"Manana"},
{411,"Infernus"},
{412,"Voodoo"},
{413,"Pony"},
{414,"Mule"},
{415,"Cheetah"},
{416,"Ambulance"},
{417,"Leviathan"},
{418,"Moonbeam"},
{419,"Esperanto"},
{420,"Taxi"},
{421,"Washington"},
{422,"Bobcat"},
{423,"Mr Whoopee"},
{424,"BF Injection"},
{425,"Hunter"},
{426,"Premier"},
{427,"Enforcer"},
{428,"Securicar"},
{429,"Banshee"},
{430,"Predator"},
{431,"Bus"},
{432,"Rhino"},
{433,"Barracks"},
{434,"Hotknife"},
{435,"Article Trailer"},
{436,"Previon"},
{437,"Coach"},
{438,"Cabbie"},
{439,"Stallion"},
{440,"Rumpo"},
{441,"RC Bandit"},
{442,"Romero"},
{443,"Packer"},
{444,"Monster"},
{445,"Admiral"},
{446,"Squallo"},
{447,"Seasparrow"},
{448,"Pizzaboy"},
{449,"Tram"},
{450,"Article Trailer 2"},
{451,"Turismo"},
{452,"Speeder"},
{453,"Reefer"},
{454,"Tropic"},
{455,"Flatbed"},
{456,"Yankee"},
{457,"Caddy"},
{458,"Solair"},
{459,"Topfun Van (Berkley's RC)"},
{460,"Skimmer"},
{461,"PCJ-600"},
{462,"Faggio"},
{463,"Freeway"},
{464,"RC Baron"},
{465,"RC Raider"},
{466,"Glendale"},
{467,"Oceanic"},
{468,"Sanchez"},
{469,"Sparrow"},
{470,"Patriot"},
{471,"Quad"},
{472,"Coastguard"},
{473,"Dinghy"},
{474,"Hermes"},
{475,"Sabre"},
{476,"Rustler"},
{477,"ZR-350"},
{478,"Walton"},
{479,"Regina"},
{480,"Comet"},
{481,"BMX"},
{482,"Burrito"},
{483,"Camper"},
{484,"Marquis"},
{485,"Baggage"},
{486,"Dozer"},
{487,"Maverick"},
{488,"SAN News Maverick"},
{489,"Rancher"},
{490,"FBI Rancher"},
{491,"Virgo"},
{492,"Greenwood"},
{493,"Jetmax"},
{494,"Hotring Racer"},
{495,"Sandking"},
{496,"Blista Compact"},
{497,"Police Maverick"},
{498,"Boxville"},
{499,"Benson"},
{500,"Mesa"},
{501,"RC Goblin"},
{502,"Hotring Racer"},
{503,"Hotring Racer"},
{504,"Bloodring Banger"},
{505,"Rancher"},
{506,"Super GT"},
{507,"Elegant"},
{508,"Journey"},
{509,"Bike"},
{510,"Mountain Bike"},
{511,"Beagle"},
{512,"Cropduster"},
{513,"Stuntplane"},
{514,"Tanker"},
{515,"Roadtrain"},
{516,"Nebula"},
{517,"Majestic"},
{518,"Buccaneer"},
{519,"Shamal"},
{520,"Hydra"},
{521,"FCR-900"},
{522,"NRG-500"},
{523,"HPV1000"},
{524,"Cement Truck"},
{525,"Towtruck"},
{526,"Fortune"},
{527,"Cadrona"},
{528,"FBI Truck"},
{529,"Willard"},
{530,"Forklift"},
{531,"Tractor"},
{532,"Combine Harvester"},
{533,"Feltzer"},
{534,"Remington"},
{535,"Slamvan"},
{536,"Blade"},
{537,"Freight (Train)"},
{538,"Brownstreak (Train)"},
{539,"Vortex"},
{540,"Vincent"},
{541,"Bullet"},
{542,"Clover"},
{543,"Sadler"},
{544,"Firetruck LA"},
{545,"Hustler"},
{546,"Intruder"},
{547,"Primo"},
{548,"Cargobob"},
{549,"Tampa"},
{550,"Sunrise"},
{551,"Merit"},
{552,"Utility Van"},
{553,"Nevada"},
{554,"Yosemite"},
{555,"Windsor"},
{556,"Monster A"},
{557,"Monster B"},
{558,"Uranus"},
{559,"Jester"},
{560,"Sultan"},
{561,"Stratum"},
{562,"Elegy"},
{563,"Raindance"},
{564,"RC Tiger"},
{565,"Flash"},
{566,"Tahoma"},
{567,"Savanna"},
{568,"Bandito"},
{569,"Freight Flat Trailer (Train)"},
{570,"Streak Trailer (Train)"},
{571,"Kart"},
{572,"Mower"},
{573,"Dune"},
{574,"Sweeper"},
{575,"Broadway"},
{576,"Tornado"},
{577,"AT400"},
{578,"DFT-30"},
{579,"Huntley"},
{580,"Stafford"},
{581,"BF-400"},
{582,"Newsvan"},
{583,"Tug"},
{584,"Petrol Trailer"},
{585,"Emperor"},
{586,"Wayfarer"},
{587,"Euros"},
{588,"Hotdog"},
{589,"Club"},
{590,"Freight Box Trailer (Train)"},
{591,"Article Trailer 3"},
{592,"Andromada"},
{593,"Dodo"},
{594,"RC Cam"},
{595,"Launch"},
{596,"Police Car (LSPD)"},
{597,"Police Car (SFPD)"},
{598,"Police Car (LVPD)"},
{599,"Police Ranger"},
{600,"Picador"},
{601,"S.W.A.T."},
{602,"Alpha"},
{603,"Phoenix"},
{604,"Glendale Shit"},
{605,"Sadler Shit"},
{606,"Baggage Trailer A"},
{607,"Baggage Trailer B"},
{608,"Tug Stairs Trailer"},
{609,"Boxville"},
{610,"Farm Trailer"},
{611,"Utility Trailer"}
};
Thanks That worked sortof
Reply
#8

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
new carname[][][] = {
{400,"Landstalker"},
{401,"Bravura"},
{402,"Buffalo"},
{403,"Linerunner"},
{404,"Perenniel"},
{405,"Sentinel"},
{406,"Dumper"},
{407,"Firetruck"},
{408,"Trashmaster"},
{409,"Stretch"},
{410,"Manana"},
{411,"Infernus"},
{412,"Voodoo"},
{413,"Pony"},
{414,"Mule"},
{415,"Cheetah"},
{416,"Ambulance"},
{417,"Leviathan"},
{418,"Moonbeam"},
{419,"Esperanto"},
{420,"Taxi"},
{421,"Washington"},
{422,"Bobcat"},
{423,"Mr Whoopee"},
{424,"BF Injection"},
{425,"Hunter"},
{426,"Premier"},
{427,"Enforcer"},
{428,"Securicar"},
{429,"Banshee"},
{430,"Predator"},
{431,"Bus"},
{432,"Rhino"},
{433,"Barracks"},
{434,"Hotknife"},
{435,"Article Trailer"},
{436,"Previon"},
{437,"Coach"},
{438,"Cabbie"},
{439,"Stallion"},
{440,"Rumpo"},
{441,"RC Bandit"},
{442,"Romero"},
{443,"Packer"},
{444,"Monster"},
{445,"Admiral"},
{446,"Squallo"},
{447,"Seasparrow"},
{448,"Pizzaboy"},
{449,"Tram"},
{450,"Article Trailer 2"},
{451,"Turismo"},
{452,"Speeder"},
{453,"Reefer"},
{454,"Tropic"},
{455,"Flatbed"},
{456,"Yankee"},
{457,"Caddy"},
{458,"Solair"},
{459,"Topfun Van (Berkley's RC)"},
{460,"Skimmer"},
{461,"PCJ-600"},
{462,"Faggio"},
{463,"Freeway"},
{464,"RC Baron"},
{465,"RC Raider"},
{466,"Glendale"},
{467,"Oceanic"},
{468,"Sanchez"},
{469,"Sparrow"},
{470,"Patriot"},
{471,"Quad"},
{472,"Coastguard"},
{473,"Dinghy"},
{474,"Hermes"},
{475,"Sabre"},
{476,"Rustler"},
{477,"ZR-350"},
{478,"Walton"},
{479,"Regina"},
{480,"Comet"},
{481,"BMX"},
{482,"Burrito"},
{483,"Camper"},
{484,"Marquis"},
{485,"Baggage"},
{486,"Dozer"},
{487,"Maverick"},
{488,"SAN News Maverick"},
{489,"Rancher"},
{490,"FBI Rancher"},
{491,"Virgo"},
{492,"Greenwood"},
{493,"Jetmax"},
{494,"Hotring Racer"},
{495,"Sandking"},
{496,"Blista Compact"},
{497,"Police Maverick"},
{498,"Boxville"},
{499,"Benson"},
{500,"Mesa"},
{501,"RC Goblin"},
{502,"Hotring Racer"},
{503,"Hotring Racer"},
{504,"Bloodring Banger"},
{505,"Rancher"},
{506,"Super GT"},
{507,"Elegant"},
{508,"Journey"},
{509,"Bike"},
{510,"Mountain Bike"},
{511,"Beagle"},
{512,"Cropduster"},
{513,"Stuntplane"},
{514,"Tanker"},
{515,"Roadtrain"},
{516,"Nebula"},
{517,"Majestic"},
{518,"Buccaneer"},
{519,"Shamal"},
{520,"Hydra"},
{521,"FCR-900"},
{522,"NRG-500"},
{523,"HPV1000"},
{524,"Cement Truck"},
{525,"Towtruck"},
{526,"Fortune"},
{527,"Cadrona"},
{528,"FBI Truck"},
{529,"Willard"},
{530,"Forklift"},
{531,"Tractor"},
{532,"Combine Harvester"},
{533,"Feltzer"},
{534,"Remington"},
{535,"Slamvan"},
{536,"Blade"},
{537,"Freight (Train)"},
{538,"Brownstreak (Train)"},
{539,"Vortex"},
{540,"Vincent"},
{541,"Bullet"},
{542,"Clover"},
{543,"Sadler"},
{544,"Firetruck LA"},
{545,"Hustler"},
{546,"Intruder"},
{547,"Primo"},
{548,"Cargobob"},
{549,"Tampa"},
{550,"Sunrise"},
{551,"Merit"},
{552,"Utility Van"},
{553,"Nevada"},
{554,"Yosemite"},
{555,"Windsor"},
{556,"Monster A"},
{557,"Monster B"},
{558,"Uranus"},
{559,"Jester"},
{560,"Sultan"},
{561,"Stratum"},
{562,"Elegy"},
{563,"Raindance"},
{564,"RC Tiger"},
{565,"Flash"},
{566,"Tahoma"},
{567,"Savanna"},
{568,"Bandito"},
{569,"Freight Flat Trailer (Train)"},
{570,"Streak Trailer (Train)"},
{571,"Kart"},
{572,"Mower"},
{573,"Dune"},
{574,"Sweeper"},
{575,"Broadway"},
{576,"Tornado"},
{577,"AT400"},
{578,"DFT-30"},
{579,"Huntley"},
{580,"Stafford"},
{581,"BF-400"},
{582,"Newsvan"},
{583,"Tug"},
{584,"Petrol Trailer"},
{585,"Emperor"},
{586,"Wayfarer"},
{587,"Euros"},
{588,"Hotdog"},
{589,"Club"},
{590,"Freight Box Trailer (Train)"},
{591,"Article Trailer 3"},
{592,"Andromada"},
{593,"Dodo"},
{594,"RC Cam"},
{595,"Launch"},
{596,"Police Car (LSPD)"},
{597,"Police Car (SFPD)"},
{598,"Police Car (LVPD)"},
{599,"Police Ranger"},
{600,"Picador"},
{601,"S.W.A.T."},
{602,"Alpha"},
{603,"Phoenix"},
{604,"Glendale Shit"},
{605,"Sadler Shit"},
{606,"Baggage Trailer A"},
{607,"Baggage Trailer B"},
{608,"Tug Stairs Trailer"},
{609,"Boxville"},
{610,"Farm Trailer"},
{611,"Utility Trailer"}
};
I have another question how do you read the array
Reply
#9

Your doing this completely wrong do this....

(Note: You can probably do without the model ids but I put them in anyways)

Код:
#define MAX_VEHICLE_NAME 30
enum VehicleInfo {
   v_ModelID,
   v_ModelName[MAX_VEHICLE_NAME]
}

stock const carname[212][VehicleInfo] = {
{400,"Landstalker"},
{401,"Bravura"},
{402,"Buffalo"},
{403,"Linerunner"},
{404,"Perenniel"},
{405,"Sentinel"},
{406,"Dumper"},
{407,"Firetruck"},
{408,"Trashmaster"},
{409,"Stretch"},
{410,"Manana"},
{411,"Infernus"},
{412,"Voodoo"},
{413,"Pony"},
{414,"Mule"},
{415,"Cheetah"},
{416,"Ambulance"},
{417,"Leviathan"},
{418,"Moonbeam"},
{419,"Esperanto"},
{420,"Taxi"},
{421,"Washington"},
{422,"Bobcat"},
{423,"Mr Whoopee"},
{424,"BF Injection"},
{425,"Hunter"},
{426,"Premier"},
{427,"Enforcer"},
{428,"Securicar"},
{429,"Banshee"},
{430,"Predator"},
{431,"Bus"},
{432,"Rhino"},
{433,"Barracks"},
{434,"Hotknife"},
{435,"Article Trailer"},
{436,"Previon"},
{437,"Coach"},
{438,"Cabbie"},
{439,"Stallion"},
{440,"Rumpo"},
{441,"RC Bandit"},
{442,"Romero"},
{443,"Packer"},
{444,"Monster"},
{445,"Admiral"},
{446,"Squallo"},
{447,"Seasparrow"},
{448,"Pizzaboy"},
{449,"Tram"},
{450,"Article Trailer 2"},
{451,"Turismo"},
{452,"Speeder"},
{453,"Reefer"},
{454,"Tropic"},
{455,"Flatbed"},
{456,"Yankee"},
{457,"Caddy"},
{458,"Solair"},
{459,"Topfun Van (Berkley's RC)"},
{460,"Skimmer"},
{461,"PCJ-600"},
{462,"Faggio"},
{463,"Freeway"},
{464,"RC Baron"},
{465,"RC Raider"},
{466,"Glendale"},
{467,"Oceanic"},
{468,"Sanchez"},
{469,"Sparrow"},
{470,"Patriot"},
{471,"Quad"},
{472,"Coastguard"},
{473,"Dinghy"},
{474,"Hermes"},
{475,"Sabre"},
{476,"Rustler"},
{477,"ZR-350"},
{478,"Walton"},
{479,"Regina"},
{480,"Comet"},
{481,"BMX"},
{482,"Burrito"},
{483,"Camper"},
{484,"Marquis"},
{485,"Baggage"},
{486,"Dozer"},
{487,"Maverick"},
{488,"SAN News Maverick"},
{489,"Rancher"},
{490,"FBI Rancher"},
{491,"Virgo"},
{492,"Greenwood"},
{493,"Jetmax"},
{494,"Hotring Racer"},
{495,"Sandking"},
{496,"Blista Compact"},
{497,"Police Maverick"},
{498,"Boxville"},
{499,"Benson"},
{500,"Mesa"},
{501,"RC Goblin"},
{502,"Hotring Racer"},
{503,"Hotring Racer"},
{504,"Bloodring Banger"},
{505,"Rancher"},
{506,"Super GT"},
{507,"Elegant"},
{508,"Journey"},
{509,"Bike"},
{510,"Mountain Bike"},
{511,"Beagle"},
{512,"Cropduster"},
{513,"Stuntplane"},
{514,"Tanker"},
{515,"Roadtrain"},
{516,"Nebula"},
{517,"Majestic"},
{518,"Buccaneer"},
{519,"Shamal"},
{520,"Hydra"},
{521,"FCR-900"},
{522,"NRG-500"},
{523,"HPV1000"},
{524,"Cement Truck"},
{525,"Towtruck"},
{526,"Fortune"},
{527,"Cadrona"},
{528,"FBI Truck"},
{529,"Willard"},
{530,"Forklift"},
{531,"Tractor"},
{532,"Combine Harvester"},
{533,"Feltzer"},
{534,"Remington"},
{535,"Slamvan"},
{536,"Blade"},
{537,"Freight (Train)"},
{538,"Brownstreak (Train)"},
{539,"Vortex"},
{540,"Vincent"},
{541,"Bullet"},
{542,"Clover"},
{543,"Sadler"},
{544,"Firetruck LA"},
{545,"Hustler"},
{546,"Intruder"},
{547,"Primo"},
{548,"Cargobob"},
{549,"Tampa"},
{550,"Sunrise"},
{551,"Merit"},
{552,"Utility Van"},
{553,"Nevada"},
{554,"Yosemite"},
{555,"Windsor"},
{556,"Monster A"},
{557,"Monster B"},
{558,"Uranus"},
{559,"Jester"},
{560,"Sultan"},
{561,"Stratum"},
{562,"Elegy"},
{563,"Raindance"},
{564,"RC Tiger"},
{565,"Flash"},
{566,"Tahoma"},
{567,"Savanna"},
{568,"Bandito"},
{569,"Freight Flat Trailer (Train)"},
{570,"Streak Trailer (Train)"},
{571,"Kart"},
{572,"Mower"},
{573,"Dune"},
{574,"Sweeper"},
{575,"Broadway"},
{576,"Tornado"},
{577,"AT400"},
{578,"DFT-30"},
{579,"Huntley"},
{580,"Stafford"},
{581,"BF-400"},
{582,"Newsvan"},
{583,"Tug"},
{584,"Petrol Trailer"},
{585,"Emperor"},
{586,"Wayfarer"},
{587,"Euros"},
{588,"Hotdog"},
{589,"Club"},
{590,"Freight Box Trailer (Train)"},
{591,"Article Trailer 3"},
{592,"Andromada"},
{593,"Dodo"},
{594,"RC Cam"},
{595,"Launch"},
{596,"Police Car (LSPD)"},
{597,"Police Car (SFPD)"},
{598,"Police Car (LVPD)"},
{599,"Police Ranger"},
{600,"Picador"},
{601,"S.W.A.T."},
{602,"Alpha"},
{603,"Phoenix"},
{604,"Glendale Shit"},
{605,"Sadler Shit"},
{606,"Baggage Trailer A"},
{607,"Baggage Trailer B"},
{608,"Tug Stairs Trailer"},
{609,"Boxville"},
{610,"Farm Trailer"},
{611,"Utility Trailer"}
};

stock GetVehicleName(modelid) { return carname[modelid - 400][v_ModelName]; }
Reply
#10

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Your doing this completely wrong do this....

(Note: You can probably do without the model ids but I put them in anyways)

Код:
#define MAX_VEHICLE_NAME 30
enum VehicleInfo {
   v_ModelID,
   v_ModelName[MAX_VEHICLE_NAME]
}

stock const carname[212][VehicleInfo] = {
{400,"Landstalker"},
{401,"Bravura"},
{402,"Buffalo"},
{403,"Linerunner"},
{404,"Perenniel"},
{405,"Sentinel"},
{406,"Dumper"},
{407,"Firetruck"},
{408,"Trashmaster"},
{409,"Stretch"},
{410,"Manana"},
{411,"Infernus"},
{412,"Voodoo"},
{413,"Pony"},
{414,"Mule"},
{415,"Cheetah"},
{416,"Ambulance"},
{417,"Leviathan"},
{418,"Moonbeam"},
{419,"Esperanto"},
{420,"Taxi"},
{421,"Washington"},
{422,"Bobcat"},
{423,"Mr Whoopee"},
{424,"BF Injection"},
{425,"Hunter"},
{426,"Premier"},
{427,"Enforcer"},
{428,"Securicar"},
{429,"Banshee"},
{430,"Predator"},
{431,"Bus"},
{432,"Rhino"},
{433,"Barracks"},
{434,"Hotknife"},
{435,"Article Trailer"},
{436,"Previon"},
{437,"Coach"},
{438,"Cabbie"},
{439,"Stallion"},
{440,"Rumpo"},
{441,"RC Bandit"},
{442,"Romero"},
{443,"Packer"},
{444,"Monster"},
{445,"Admiral"},
{446,"Squallo"},
{447,"Seasparrow"},
{448,"Pizzaboy"},
{449,"Tram"},
{450,"Article Trailer 2"},
{451,"Turismo"},
{452,"Speeder"},
{453,"Reefer"},
{454,"Tropic"},
{455,"Flatbed"},
{456,"Yankee"},
{457,"Caddy"},
{458,"Solair"},
{459,"Topfun Van (Berkley's RC)"},
{460,"Skimmer"},
{461,"PCJ-600"},
{462,"Faggio"},
{463,"Freeway"},
{464,"RC Baron"},
{465,"RC Raider"},
{466,"Glendale"},
{467,"Oceanic"},
{468,"Sanchez"},
{469,"Sparrow"},
{470,"Patriot"},
{471,"Quad"},
{472,"Coastguard"},
{473,"Dinghy"},
{474,"Hermes"},
{475,"Sabre"},
{476,"Rustler"},
{477,"ZR-350"},
{478,"Walton"},
{479,"Regina"},
{480,"Comet"},
{481,"BMX"},
{482,"Burrito"},
{483,"Camper"},
{484,"Marquis"},
{485,"Baggage"},
{486,"Dozer"},
{487,"Maverick"},
{488,"SAN News Maverick"},
{489,"Rancher"},
{490,"FBI Rancher"},
{491,"Virgo"},
{492,"Greenwood"},
{493,"Jetmax"},
{494,"Hotring Racer"},
{495,"Sandking"},
{496,"Blista Compact"},
{497,"Police Maverick"},
{498,"Boxville"},
{499,"Benson"},
{500,"Mesa"},
{501,"RC Goblin"},
{502,"Hotring Racer"},
{503,"Hotring Racer"},
{504,"Bloodring Banger"},
{505,"Rancher"},
{506,"Super GT"},
{507,"Elegant"},
{508,"Journey"},
{509,"Bike"},
{510,"Mountain Bike"},
{511,"Beagle"},
{512,"Cropduster"},
{513,"Stuntplane"},
{514,"Tanker"},
{515,"Roadtrain"},
{516,"Nebula"},
{517,"Majestic"},
{518,"Buccaneer"},
{519,"Shamal"},
{520,"Hydra"},
{521,"FCR-900"},
{522,"NRG-500"},
{523,"HPV1000"},
{524,"Cement Truck"},
{525,"Towtruck"},
{526,"Fortune"},
{527,"Cadrona"},
{528,"FBI Truck"},
{529,"Willard"},
{530,"Forklift"},
{531,"Tractor"},
{532,"Combine Harvester"},
{533,"Feltzer"},
{534,"Remington"},
{535,"Slamvan"},
{536,"Blade"},
{537,"Freight (Train)"},
{538,"Brownstreak (Train)"},
{539,"Vortex"},
{540,"Vincent"},
{541,"Bullet"},
{542,"Clover"},
{543,"Sadler"},
{544,"Firetruck LA"},
{545,"Hustler"},
{546,"Intruder"},
{547,"Primo"},
{548,"Cargobob"},
{549,"Tampa"},
{550,"Sunrise"},
{551,"Merit"},
{552,"Utility Van"},
{553,"Nevada"},
{554,"Yosemite"},
{555,"Windsor"},
{556,"Monster A"},
{557,"Monster B"},
{558,"Uranus"},
{559,"Jester"},
{560,"Sultan"},
{561,"Stratum"},
{562,"Elegy"},
{563,"Raindance"},
{564,"RC Tiger"},
{565,"Flash"},
{566,"Tahoma"},
{567,"Savanna"},
{568,"Bandito"},
{569,"Freight Flat Trailer (Train)"},
{570,"Streak Trailer (Train)"},
{571,"Kart"},
{572,"Mower"},
{573,"Dune"},
{574,"Sweeper"},
{575,"Broadway"},
{576,"Tornado"},
{577,"AT400"},
{578,"DFT-30"},
{579,"Huntley"},
{580,"Stafford"},
{581,"BF-400"},
{582,"Newsvan"},
{583,"Tug"},
{584,"Petrol Trailer"},
{585,"Emperor"},
{586,"Wayfarer"},
{587,"Euros"},
{588,"Hotdog"},
{589,"Club"},
{590,"Freight Box Trailer (Train)"},
{591,"Article Trailer 3"},
{592,"Andromada"},
{593,"Dodo"},
{594,"RC Cam"},
{595,"Launch"},
{596,"Police Car (LSPD)"},
{597,"Police Car (SFPD)"},
{598,"Police Car (LVPD)"},
{599,"Police Ranger"},
{600,"Picador"},
{601,"S.W.A.T."},
{602,"Alpha"},
{603,"Phoenix"},
{604,"Glendale Shit"},
{605,"Sadler Shit"},
{606,"Baggage Trailer A"},
{607,"Baggage Trailer B"},
{608,"Tug Stairs Trailer"},
{609,"Boxville"},
{610,"Farm Trailer"},
{611,"Utility Trailer"}
};

stock GetVehicleName(modelid) { return carname[modelid - 400][v_ModelName]; }
how would you use this in an array statement.
example
carname[460] ;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)