Scripting/Server/Functions/GetVehicleName

Friendly names. GetWeaponName knows ids 0-9 and the death reasons 16, 18, 20, 21; others return "Unknown". GetDistrictName returns the Liberty City district at those coordinates.

Syntax

GetVehicleName(model)
GetWeaponName(id)
GetBodyPartName(id)
GetDistrictName(x, y)

Arguments

Returns

string

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "getvehiclename" )
	{
		local result = GetVehicleName( 95 );
		MessagePlayer( "GetVehicleName returned: " + result, player );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Maths and strings

Categories: Server functions | Maths and strings