GetVehicleModelFromName

From Multi Theft Auto: Wiki

This function retrieves the model ID of a vehicle as an integer value from its name.

Syntax

int getVehicleModelFromName ( string name )             

OOP Syntax Help! I don't understand this!

Note: This function is a static function underneath the Vehicle class.
Method: Vehicle.getModelFromName(...)

Required Arguments

  • name: A string containing the name of the vehicle.
  • at-400
  • admiral
  • alpha
  • ambulance
  • andromada
  • bf injection
  • bf-400
  • bmx
  • baggage
  • baggage trailer (uncovered)
  • baggage trailer (covered)
  • bandito
  • banshee
  • barracks
  • beagle
  • benson
  • berkley's rc van
  • bike
  • blade
  • blista compact
  • bloodring banger
  • bobcat
  • box freight
  • boxville
  • boxville mission
  • bravura
  • broadway
  • buccaneer
  • buffalo
  • bullet
  • burrito
  • bus
  • cabbie
  • caddy
  • cadrona
  • camper
  • cargobob
  • cement truck
  • cheetah
  • clover
  • club
  • coach
  • coastguard
  • combine harvester
  • comet
  • cropduster
  • dft-30
  • dinghy
  • dodo
  • dozer
  • dumper
  • dune
  • elegant
  • elegy
  • emperor
  • enforcer
  • esperanto
  • euros
  • fbi rancher
  • fbi truck
  • fcr-900
  • faggio
  • farm trailer
  • feltzer
  • fire truck
  • fire truck ladder
  • flash
  • flatbed
  • forklift
  • fortune
  • freeway
  • freight
  • freight train flatbed
  • glendale
  • glendale damaged
  • greenwood
  • hpv1000
  • hermes
  • hotdog
  • hotknife
  • hotring racer
  • hotring racer 2
  • hotring racer 3
  • hunter
  • huntley
  • hustler
  • hydra
  • infernus
  • intruder
  • jester
  • jetmax
  • journey
  • kart
  • landstalker
  • launch
  • leviathan
  • linerunner
  • majestic
  • manana
  • marquis
  • maverick
  • merit
  • mesa
  • monster 1
  • monster 2
  • monster 3
  • moonbeam
  • mountain bike
  • mower
  • mr. whoopee
  • mule
  • nrg-500
  • nebula
  • nevada
  • news chopper
  • newsvan
  • oceanic
  • pcj-600
  • packer
  • patriot
  • perennial
  • phoenix
  • picador
  • pizzaboy
  • police ls
  • police lv
  • police maverick
  • police ranger
  • police sf
  • pony
  • predator
  • premier
  • previon
  • primo
  • quadbike
  • rc bandit
  • rc baron
  • rc cam
  • rc goblin
  • rc raider
  • rc tiger
  • raindance
  • rancher
  • rancher lure
  • reefer
  • regina
  • remington
  • rhino
  • roadtrain
  • romero
  • rumpo
  • rustler
  • s.w.a.t.
  • sabre
  • sadler
  • sadler damaged
  • sanchez
  • sandking
  • savanna
  • seasparrow
  • securicar
  • sentinel
  • shamal
  • skimmer
  • slamvan
  • solair
  • sparrow
  • speeder
  • squalo
  • stafford
  • stallion
  • stratum
  • streak
  • streak train trailer
  • street clean trailer
  • stretch
  • stuntplane
  • sultan
  • sunrise
  • super gt
  • sweeper
  • tahoma
  • tampa
  • tanker
  • taxi
  • tornado
  • towtruck
  • tractor
  • trailer (stairs)
  • trailer (tanker commando)
  • trailer 1
  • trailer 2
  • trailer 3
  • tram
  • trashmaster
  • tropic
  • tug
  • turismo
  • uranus
  • utility van
  • vincent
  • virgo
  • voodoo
  • vortex
  • walton
  • washington
  • wayfarer
  • willard
  • windsor
  • yankee
  • yosemite
  • zr-350

Returns

Returns an integer if the name exists, false otherwise. If you use this function on vehicles with shared names, such as "police", it will return the earliest occurrence of that vehicle's ID.

Example

Click to expand [+]
Server

See Also

FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.6 r7485 ONWARDS
FROM VERSION 1.6 r7485 ONWARDS