Skip to main content

Player::removeAllWeapons

Removes all weapons from the player

Syntax​

player.removeAllWeapons();

Examples​

Uses /removeweapons to remove all weapons from a player. Use /weapons to give yourself weapons to test this out.

Server-Side

mp.events.addCommand('weapons', (player) => {
player.giveWeapon(mp.joaat('weapon_pumpshotgun'), 100);
player.giveWeapon(mp.joaat('weapon_microsmg'), 1000);
});

mp.events.addCommand('removeweapons', (player) => {
player.removeAllWeapons();
player.outputChatBox(`You have taken off all your weapons.`);
});