Scripting/Client/Functions/GetVehicleModel
(v0.3-r2+) Same as on the server: the vehicle model or the weapon id (0-12) from a name, -1 if unknown. Case and punctuation are ignored.
Syntax
GetVehicleModel(name)GetWeaponID(name)Arguments
- string name
Returns
integer
Example
function onScriptLoad()
{
local result = GetVehicleModel( "Example" );
MessagePlayer( "GetVehicleModel returned: " + result, player );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Utility
Categories: Client functions | Utility