postbase.sh_base_swep
(no description)
Functions
CanPlayerEquip(client, item)
View source »Called when the player tries to equip this item, implement in child base/item
Parameters
-
client
Player
-
item
Item
Returns
-
boolean
If the item can be equipped
CanPlayerUnEquip(client, item)
View source »Called when the player tries to un-equip this item, implement in child base/item
Parameters
-
client
Player
-
item
Item
Returns
-
boolean
If the item can be un-equipped
GetSwepClass()
View source »Gets this item's SWEP
OnPlayerDeath(item, client)
View source »Called when the player dies if DropOnDeath is enabled, implement in child base/item if custom death override is enabled
Parameters
-
item
Item
-
client
Player
OnPlayerEquip(client, item)
View source »Called when the player equips this item, implement in child base/item. Return the entity created if this makes some sort of SWEP, it'll then automatically set the entity to the item and vice versa.
Parameters
-
client
Player
-
item
Item
Returns
-
optional
OnPlayerUnEquip(client, item)
View source »Called when the player un-equips this item, implement in child base/item If an entity was passed when equipped, this won't automatically remove it from the player, you'll need to do that yourself. This is to let you save any important data and such before removing it.
Parameters
-
client
Player
-
item
Item
SetSwepClass(swepClass)
View source »Sets this item's SWEP (class name of SWEP) that is equpped
Parameters
-
swepClass
string
The class name of the SWEP to equip
Tables
base_swep
View source »Documentation for this section is incomplete and needs expanding.
Fields
-
self
fun(self:
): GetSwepClass string Gets class name of the SWEP this item equips
-
self
fun(self:
): GetSwepClass string Gets class name of the SWEP this item equips