Scripting/Squirrel/Functions/Player.RemoveWeapon

From Vice City Multiplayer
Revision as of 12:35, 11 April 2017 by NicusorN5 (talk | contribs) (Created page with "==Usage== Removes a weapon from the player's inventory. ==Syntax== <code> player.RemoveWeapon(WEAPON_ID)</code> ==Example== <code>function onPlayerCommand( player, cmd, te...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

Usage

Removes a weapon from the player's inventory.

Syntax

player.RemoveWeapon(WEAPON_ID)

Example

function onPlayerCommand( player, cmd, text ) {

if (cmd == "remweps")
{
 try
 {
  for (local i = 0 ; i <200 ; i++)
  {
   player.RemoveWeapon(i);
  }
 }
 catch(e)
 {
 }
}

}