
Weapons in the scripting API are identified by their numeric weapons.tbl row ID. Use the table below when granting a weapon, changing ammunition, equipping a weapon, or checking which weapon a player currently holds.
Weapon inventory changes are authoritative server operations. The server sends the requested change to the owning client, while normal M2O player synchronization makes the equipped weapon visible to other players.
Call Player.giveWeapon(weaponId, ammo, equip) from a server resource:
Core.Events.on("playerConnect", (player) => {
const weaponId = 10; // MP40
const reserveAmmo = 120;
player.giveWeapon(weaponId, reserveAmmo, true);
});
The first argument is an ID from this page, the second is the initial reserve ammunition, and the final boolean controls whether the granted weapon is equipped immediately. An ammunition value of zero or less uses the default load of 100 rounds. Unknown weapon IDs are ignored.
Use player.giveAmmo(weaponId, amount) to adjust reserve ammunition later, or player.removeWeapon(weaponId) to remove the weapon from the player's inventory.
Some IDs represent incomplete or unsafe game content. Pay attention to the notes beside grenades, the MG42, and the missing sniper model before exposing them in a game mode.






Does not explode.







Animation is buggy; do not use.


Does not explode.

The game model is missing.

