Scripting/Squirrel/Functions/GetWeaponName

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will get the weapon name from a given ID.

Syntax

GetWeaponName( id )

Arguments

  • int id - The ID of the weapon

Return value

  • string name - The name of the weapon

Example

function onPlayerWeaponChange( player, oldWep, newWep )
{
	if(oldWep != newWep)
	{
		ClientMessage("You changed your Weapon to : "+GetWeaponName(newWep),player,255,255,255);	
	}
	return 1;
}

Notes

Call onPlayerWeaponChange were used in this example. More info about them in the corresponding pages.

Related Functions