Module core.plugins.passivemode.sv_init
Passive Mode
Module Overview
Functions
| cityrp.passivemode.activate() | Activate passivemode, overwrite functions and refund contraband. |
| cityrp.passivemode.deactivate(calling_ply) | Deactivate passivemode, overwrite functions and refund contraband. |
| cityrp.passivemode.hasAccess(ply, access) | Overwritten hasAccess which disallows weapons. |
| cityrp.passivemode.itemuse(ply, item) | Overwritten itemuse which disallows contraband. |
| cityrp.passivemode.itemdrop(ply, item, dropAmount, position) | Overwritten itemdrop which disallows contraband. |
| cityrp.passivemode.stripweapon(ply, class, wType, wName) | Check if a specific weapon is to be stripped from a player, and strip it if so. |
| cityrp.passivemode.strip() | Strips all weapons from all players, resets weapon mods and clears ragdoll weapons. |
| cityrp.passivemode.contra() | Refunds all contraband and pots for all players. |
Tables
| cityrp.passivemode | Table containing all data for passivemode. |
| cityrp.passivemode.functions | Table which contains the old functions, replaced when passivemode is activated. |
Fields
| cityrp.passivemode.active | States if passive mode has been activated already. |
- cityrp.passivemode.activate()
- Activate passivemode, overwrite functions and refund contraband.
- cityrp.passivemode.deactivate(calling_ply)
-
Deactivate passivemode, overwrite functions and refund contraband.
Parameters:
- calling_ply Optional param used to callback if it fails.
- cityrp.passivemode.hasAccess(ply, access)
-
Overwritten hasAccess which disallows weapons.
Parameters:
- ply The player to check access for.
- access The access to check against.
Returns:
-
False if access is weapons. Otherwise regular hasAccess return.
- cityrp.passivemode.itemuse(ply, item)
-
Overwritten itemuse which disallows contraband.
Parameters:
- ply The player using the item.
- item The item being used.
Returns:
-
False if item is weed or contraband. Otherwise regular itemuse return.
- cityrp.passivemode.itemdrop(ply, item, dropAmount, position)
-
Overwritten itemdrop which disallows contraband.
Parameters:
- ply The player using the item.
- item The item being used.
- dropAmount The number of items being dropped.
- position The position at which the items were being dropped.
Returns:
-
False if item is weed or contraband. Otherwise regular itemdrop return.
- cityrp.passivemode.stripweapon(ply, class, wType, wName)
-
Check if a specific weapon is to be stripped from a player, and strip it if so.
Parameters:
- ply The player being stripped.
- class The class of the weapon being stripped.
- wType The weapon type of the weapon being stripped.
- wName The name of the weapon bineg stripped.
- cityrp.passivemode.strip()
- Strips all weapons from all players, resets weapon mods and clears ragdoll weapons.
- cityrp.passivemode.contra()
- Refunds all contraband and pots for all players.