Element/Vehicle: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
A class representing a | A class representing a vehicle in the GTA world. Vehicles can be occupied and controlled by players. | ||
The element type of this class is '''"vehicle"'''. | The element type of this class is '''"vehicle"'''. | ||
Line 11: | Line 11: | ||
===Required Attributes=== | ===Required Attributes=== | ||
* '''model''': The [[Vehicle IDs|vehicle ID]] of the vehicle being created. | * '''model''': The [[Vehicle IDs|vehicle ID]] of the vehicle being created. | ||
* '''posX''': A | * '''posX''': A float representing the X position of the vehicle. | ||
* '''posY''': A | * '''posY''': A float representing the Y position of the vehicle. | ||
* '''posZ''': A | * '''posZ''': A float representing the Z position of the vehicle. | ||
===Optional Attributes=== | ===Optional Attributes=== | ||
* ''' | * '''rosX''': A float representing the X rotation of the vehicle. | ||
* ''' | * '''rosY''': A float representing the Y rotation of the vehicle. | ||
* ''' | * '''rosZ''': A float representing the Z rotation of the vehicle. | ||
* '''colors''': | * '''colors''': An integer indicating the vehicle's [[Template:Vehicle_colors|color(s)]] (seperated by commas). | ||
* '''upgrades''': An integer representing the vehicle's mod upgrade(s) (seperated by commas), defined in San Andreas\data\maps\veh_mods\veh_mods.ide | |||
* '''paintjob''': An integer indicating the vehicle's paint job (only works on certain vehicles). | |||
== | ==Related scripting functions== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Revision as of 02:24, 9 December 2006
A class representing a vehicle in the GTA world. Vehicles can be occupied and controlled by players.
The element type of this class is "vehicle".
XML syntax
<vehicle id="" model="" posX="" posY="" posZ="" rotX="" rotY="" rotZ="" colors="" upgrades="" paintjob=""/>
Required Attributes
- model: The vehicle ID of the vehicle being created.
- posX: A float representing the X position of the vehicle.
- posY: A float representing the Y position of the vehicle.
- posZ: A float representing the Z position of the vehicle.
Optional Attributes
- rosX: A float representing the X rotation of the vehicle.
- rosY: A float representing the Y rotation of the vehicle.
- rosZ: A float representing the Z rotation of the vehicle.
- colors: An integer indicating the vehicle's color(s) (seperated by commas).
- upgrades: An integer representing the vehicle's mod upgrade(s) (seperated by commas), defined in San Andreas\data\maps\veh_mods\veh_mods.ide
- paintjob: An integer indicating the vehicle's paint job (only works on certain vehicles).
Related scripting functions
- 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