CS_AliasToWeaponID Function

Gets a weaponID from a alias

CSWeaponID CS_AliasToWeaponID(const char[] alias)

Parameters

const char[] alias

Weapon alias to attempt to get an id for.

Return Value

Returns a weapon id or 0 if failed to find a match.

Notes

For best results use CS_GetTranslatedWeaponAlias on the weapon name before passing it.