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
- int model
- int id
- float x
- float y
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.
Related pages
Section: Maths and strings
Categories: Server functions | Maths and strings