GetVehicleLicensePlate: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server & Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetVehicleLicensePlate(vehicle)}} {{FuncParameters}} {{FuncParam|vehicle|The vehicle iden..." |
FlyingFork (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server & Client|1.0}} | {{Info|Function|Server & Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Gets the vehicle license plate text.}} | ||
{{FuncSyntax|GetVehicleLicensePlate(vehicle)}} | {{FuncSyntax|GetVehicleLicensePlate(vehicle)}} | ||
Line 8: | Line 8: | ||
{{FuncParam|vehicle|The vehicle identifier.}} | {{FuncParam|vehicle|The vehicle identifier.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns the license plate text as a string.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
AddCommand("getlicenseplate", function(playerid) | |||
local vehicle = GetPlayerOccupiedVehicle(playerid) | |||
if vehicle == 0 then | |||
return AddPlayerChat(playerid, "You must be in a vehicle!") | |||
end | |||
local plate = GetVehicleLicensePlate(vehicle) | |||
return AddPlayerChat(playerid, "The license plate of this vehicle is: " .. plate) | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{VehicleFunctions}} |
Latest revision as of 15:10, 27 May 2021
Description
Gets the vehicle license plate text.
Syntax
GetVehicleLicensePlate(vehicle)
Parameters
- vehicle
The vehicle identifier.
Return Value
- Returns the license plate text as a string.
Example
AddCommand("getlicenseplate", function(playerid)
local vehicle = GetPlayerOccupiedVehicle(playerid)
if vehicle == 0 then
return AddPlayerChat(playerid, "You must be in a vehicle!")
end
local plate = GetVehicleLicensePlate(vehicle)
return AddPlayerChat(playerid, "The license plate of this vehicle is: " .. plate)
end)
See also
- CreateVehicle
- DestroyVehicle
- IsValidVehicle
- GetVehicleCount
- GetAllVehicles
- GetVehicleModel
- GetVehicleModelName
- SetVehicleRespawnParams
- IsVehicleStreamedIn
- GetStreamedVehiclesForPlayer
- GetStreamedVehicles
- SetVehicleLocation
- GetVehicleLocation
- SetVehicleRotation
- GetVehicleRotation
- SetVehicleHeading
- GetVehicleHeading
- SetVehicleHealth
- GetVehicleHealth
- SetVehicleLicensePlate
- GetVehicleVelocity
- GetVehicleDriver
- GetVehiclePassenger
- GetVehicleNumberOfSeats
- SetVehicleColor
- GetVehicleColor
- SetVehicleLinearVelocity
- SetVehicleAngularVelocity
- GetVehicleGear
- SetVehicleHoodRatio
- GetVehicleHoodRatio
- SetVehicleTrunkRatio
- GetVehicleTrunkRatio
- StartVehicleEngine
- StopVehicleEngine
- GetVehicleEngineState
- SetVehicleLightEnabled
- GetVehicleLightState
- SetVehicleDamage
- GetVehicleDamage
- AttachVehicleNitro