Squirrel/Server/Functions/Players/ClearWeapons

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This function removes the players weapons. == Arguments == * '''none''' - This function doesn't have any arguments. == Example == <code lang="squirrel"> function onPlayerComm...)
 
 
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|Player.ClearWeapons}}
 
This function removes the players weapons.
 
This function removes the players weapons.
  

Latest revision as of 10:31, 11 October 2010

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

This function removes the players weapons.

[edit] Arguments

  • none - This function doesn't have any arguments.

[edit] Example

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "disarm" )
  5. {
  6. pPlayer.ClearWeapons();
  7. }
  8. }
  9.  

This will disarm the player when they use /disarm.

[edit] Notes

The call onPlayerCommand was used in in this example. More info about it in the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox