CityRP Documentation Repository

ITEM.WeaponMod

The weapon modification item base.

Registration ID
base_weaponmod
Inherits
ITEM → ITEM.WeaponMod

Functions

SharedITEM:canGive(ply, amt, to) → booleanSource ☍

canGive hook/override for this item base.

Parameters

Returns

  1. boolean
SharedITEM:canUse(ply) → booleanSource ☍

canUse hook/override for this item base.

Parameters

Returns

  1. boolean
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, amt, to)Source ☍

onGive hook/override for this item base.

Parameters

SharedITEM:onUse(ply) → booleanSource ☍

onUse hook/override for this item base.

Parameters

Returns

  1. boolean
SharedITEM:postUse(ply, old, new) → booleanSource ☍

postUse hook/override for this item base.

Parameters

  • plyPlayer
  • oldstring?
  • newstring?

Returns

  1. boolean
SharedITEM:preUse(ply, old) → booleanSource ☍

preUse hook/override for this item base.

Parameters

Returns

  1. boolean

Fields

SharedITEM.SetAttachmentsSource ☍

Sets the attachments that this item gives.