Scripting/Squirrel/Functions/Player.RemoveWeapon

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Usage

Removes a weapon from the player's inventory. Returns void.

Syntax

player.RemoveWeapon(int WEAPON_ID)

Example

function onPlayerCommand(player, cmd, text) {
  if (cmd == "remweps") {
    try {
      for (local i = 0; i < 9; ++i) {
        player.RemoveWeapon(i);
      }
    }
    catch(e) {
    }
  }
}