Squirrel/Server/Functions/Weapons/GetWeaponIDFromName

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m
 
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|GetWeaponIDFromName}}
 
This function returns the ID of the weapon from its name.
 
This function returns the ID of the weapon from its name.
  

Latest revision as of 11:15, 11 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function returns the ID of the weapon from its name.

[edit] Syntax

  1. int GetWeaponIDFromName( string weaponName )

[edit] Arguments

  • weaponName - The name of the weapon

[edit] Example

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "wepid" ) GetWeaponIDFromName( text );
  5. }
  6.  

[edit] Notes

This function is used to get the weapon ID of the given text.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox