Scripting/Squirrel/Functions/Player.RemoveWeapon: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
==Usage== | ==Usage== | ||
Removes a weapon from the player's inventory. | Removes a weapon from the player's inventory. Returns void. | ||
==Syntax== | ==Syntax== | ||
<code> player.RemoveWeapon(WEAPON_ID)</code> | <code> player.RemoveWeapon(int WEAPON_ID)</code> | ||
==Example== | ==Example== | ||
Revision as of 11:03, 18 November 2017
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 <200 ; i++)
{
player.RemoveWeapon(i);
}
}
catch(e)
{
}
}
}