CityRP Documentation Repository

ITEM.Ammo

The ammo item base. Gives a set amount of one ammo type on use.

Registration ID
base_ammo
Inherits
ITEM → ITEM.Ammo

Functions

SharedITEM:onDestroy(ply)Source ☍

onDestroy hook/override for this item base.

Parameters

SharedITEM:onDrop(ply, pos)Source ☍

onDrop hook/override for this item base.

Parameters

SharedITEM:onGive(ply, pos)Source ☍

onGive hook/override for this item base.

Parameters

SharedITEM:onUse(ply)Source ☍

onUse hook/override for this item base.

Parameters

SharedITEM:SetAmmo(ammoType, ammoValue) → ITEM.AmmoSource ☍

Set the type and value of ammo used. Calling this also sets the category.

Parameters

  • ammoTypestringAmmo Class to give.
  • ammoValuenumberAmount of ammo to give.

Returns

  1. ITEM.Ammo

Fields

SharedITEM.ammoSource ☍
SharedITEM.ammovalueSource ☍