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 |
|||
| Line 7: | Line 7: | ||
==Example== | ==Example== | ||
< | <pre> | ||
function onPlayerCommand( player, cmd, text ) | function onPlayerCommand( player, cmd, text ) | ||
| Line 26: | Line 26: | ||
} | } | ||
</ | </pre> | ||
Revision as of 12:39, 11 April 2017
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)
{
}
}
}