Module core.plugins.generic.sv_init

Called when a player attempts to holster a weapon.

Module Overview

Functions

PLUGIN.playerCanUseItem(ply, item, silent) Called when a player attempts to use an item.
PLUGIN.PlayerCanEarnContraband(ply) Called when a player earns money from contraband.

Tables

PLUGIN.PassiveDamageWeapons Passive tools that can deal damage but are primarily used for non-combat activities.
PLUGIN.GovernmentAllowedTools Non-combat tools that government members (non-law enforcement) can use.

Fields

victim Block damage from passive weapons when attacker lacks weapons access.

Functions

PLUGIN.playerCanUseItem(ply, item, silent)
Called when a player attempts to use an item.

Parameters:

  • ply Player Player using the item.
  • item string ID of the item.
  • silent bool If output should be surpressed.

Returns:

    boolean If the weapon can be used.
PLUGIN.PlayerCanEarnContraband(ply)
Called when a player earns money from contraband.

Parameters:

  • ply Player Player earning money.

Returns:

    boolean If the player can earn money.

Tables

PLUGIN.PassiveDamageWeapons
Passive tools that can deal damage but are primarily used for non-combat activities. These weapons should not deal damage to players when the attacker lacks "w" access.

Fields:

  • cityrp_pickaxe
  • cityrp_hardwood_pickaxe
  • cityrp_basic_axe
  • cityrp_modern_axe
  • cityrp_fireaxe
  • cityrp_keys
PLUGIN.GovernmentAllowedTools
Non-combat tools that government members (non-law enforcement) can use.

Fields:

  • cityrp_rod
  • weapon_rpw_binoculars
  • gmod_cinematic_camera
  • gmod_camera
  • cityrp_selfie

Fields

victim
Block damage from passive weapons when attacker lacks weapons access.
  • victim Entity Entity taking damage.