SetVehiclePlateText: Difference between revisions
Jump to navigation
Jump to search
Line 23: | Line 23: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function PlateText(thePlayer,commandName,text) | function PlateText(thePlayer,commandName,text) | ||
Vehicle = getPedOccupiedVehicle(thePlayer) | local Vehicle = getPedOccupiedVehicle(thePlayer) | ||
if Vehicle then | if Vehicle then | ||
if text then | if text then |
Revision as of 02:52, 15 May 2013
This function can be used to change/set the numberplate text from a car.
Syntax
float setVehiclePlateText( element theVehicle, string numberplate )
Required Arguments
- theVehicle: The vehicle whose numberplate you want to change.
- numberplate: A string that will go on the number plate of the car (max 8 characters).
Returns
Returns true if the numberplate was changed successfully, or false if invalid arguments were passed
Requirements
This template will be deleted.
Example
function PlateText(thePlayer,commandName,text) local Vehicle = getPedOccupiedVehicle(thePlayer) if Vehicle then if text then setVehiclePlateText( Vehicle, tostring(text) ) else outputChatBox("You must enter a message.",thePlayer) end else outputChatBox("You must be a Vehicle.",thePlayer) end end addCommandHandler("setplate",PlateText)
See 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