setVehicleAdjustableProperty | Multi Theft Auto: Wiki Skip to content

setVehicleAdjustableProperty

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function is used for adjusting the movable parts of a model, for example hydra jets or dump truck tray. This function only works on vehicles with adjustable properties.

Syntax

setVehicleAdjustableProperty ( )

Code Examples

client

This clientside function allows the user to set the vehicle adjustable property of a vehicle that the user is in by typing a command:

function adjustProperty ( command, adjustValue )
--First check if our player is in a vehicle (otherwise there is nothing to adjust)
if isPedInVehicle (getLocalPlayer()) then
--Next check if there is a property to adjust on this vehicle that our player is in
if getVehicleAdjustableProperty(getPedOccupiedVehicle(getLocalPlayer())) then
--Set the vehicle property to the argument that was given with the command (adjustValue)
setVehicleAdjustableProperty (getPedOccupiedVehicle(getLocalPlayer()), adjustValue )
else
outputChatBox("You are in a vehicle that has no adjustable property!")
end
else
outputChatBox("You are not in a vehicle!")
end
end
addCommandHandler ( "adjust", adjustProperty )

See Also

Vehicle Functions