> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Weapon Stolen

> Triggered after a player steals something from the actions menu, only if you use the default player search/rob, it won't work if you replaced it

Triggered after a player steals a weapon from the actions menu.

<Note>
  This only works if you use the default player search/rob action — it won't fire if you replaced it with a custom module.
</Note>

<CodeGroup>
  ```lua Event theme={null}
  RegisterNetEvent("jobs_creator:actions:weaponStolen", function(playerId, targetId, weaponName)
  end)
  ```

  ```lua Example theme={null}
  -- This example for ESX will "delete" the stolen weapons (maybe useful for cops)
  RegisterNetEvent("jobs_creator:actions:weaponStolen", function(playerId, targetId, weaponName)
      local xPlayer = ESX.GetPlayerFromId(playerId)
      xPlayer.removeWeapon(weaponName)
  end)
  ```
</CodeGroup>

### Parameters

| Name         | Data Type | Description                                      |
| ------------ | --------- | ------------------------------------------------ |
| `playerId`   | integer   | The server ID of the player who stole the weapon |
| `targetId`   | integer   | The server ID of the victim who lost the weapon  |
| `weaponName` | string    | Weapon name                                      |


## Related topics

- [Search/Steal Action](/jobs-creator/server/search-steal-action/index.md)
- [Prevent Police Weapons from Being Stolen](/jaksam-inventory/guides/block-police-weapon-rob.md)
- [Account stolen](/jobs-creator/server/search-steal-action/account-stolen.md)
- [Item Stolen](/jobs-creator/server/search-steal-action/item-stolen.md)
- [Weapon Attachments](/jaksam-inventory/guides/weapon-attachments.md)
