GetAllVehicles: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetAllVehicles()}} {{FuncParameters}} {{FuncNoParam}} {{FuncReturnValue|__EDIT_ME__}} == Example...")
 
No edit summary
 
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Get all the vehicle identifiers in a table.}}


{{FuncSyntax|GetAllVehicles()}}
{{FuncSyntax|GetAllVehicles()}}
Line 8: Line 8:
{{FuncNoParam}}
{{FuncNoParam}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns a table with valid vehicle identifiers.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang='Lua'>
for k, v in pairs(GetAllVehicles()) do
    SetVehicleColor(v, RGB(255, 0, 0)) -- Sets all the created vehicles' color to 255, 0, 0 (RGB) red.
end
</syntaxhighlight>


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

Latest revision as of 17:20, 16 January 2020