GetVehicleModelName: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetVehicleModelName(vehicle)}} {{FuncParameters}} {{FuncParam|vehicle|__EDIT_ME__}} {{FuncReturnV..."
 
Kuzkay (talk | contribs)
No edit summary
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Returns the name of the vehicle model by its ID}}


{{FuncSyntax|GetVehicleModelName(vehicle)}}
{{FuncSyntax|GetVehicleModelName(vehicle)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|vehicle|__EDIT_ME__}}
{{FuncParam|vehicle|Vehicle you want to get the model name of}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|The name of the vehicle model}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
function getVehName(player, vehicle, seat)
  AddPlayerChat(player, "You've entered a " .. GetVehicleModelName(veh))
end
AddEvent('OnPlayerEnterVehicle', getVehName)
 
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
__EDIT_ME__

Revision as of 20:23, 13 November 2019

GetVehicleModelName

Type: Function
Context: Server
Introduced: v1.0

Description

Returns the name of the vehicle model by its ID

Syntax

GetVehicleModelName(vehicle)

Parameters

  • vehicle
    Vehicle you want to get the model name of

Return Value

  • The name of the vehicle model

Example

function getVehName(player, vehicle, seat)
   AddPlayerChat(player, "You've entered a " .. GetVehicleModelName(veh))
end
AddEvent('OnPlayerEnterVehicle', getVehName)

See also

__EDIT_ME__