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...)

Revision as of 02:43, 26 May 2010

This function removes the players weapons.

Arguments

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

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.

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox