GetVehicleModelFromName: Difference between revisions
Jump to navigation
Jump to search
m (→Example: This example is server-sided because of the "thePlayer" variable in the function brackets) |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 7: | Line 7: | ||
int getVehicleModelFromName ( string name ) | int getVehicleModelFromName ( string name ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP|This function is a static function underneath the Vehicle class.|[[Vehicle]].getModelFromName}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''name:''' A [[string]] containing the name of the vehicle. | *'''name:''' A [[string]] containing the name of the vehicle. | ||
{{All Vehicle Types}} | |||
===Returns=== | ===Returns=== |
Latest revision as of 19:53, 26 May 2017
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 [+]
ServerSee Also
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates