CityRP Documentation Repository

core.plugins.maintenance.weapons.cityrp_maint_pliers.shared

Name: "shared.lua". Product: "CityRP 2 (Roleplay)". Description: Maintenance Pliers - Used for electric fault repairs.

Functions

SharedSWEP:CancelRepair()Source ☍

Clears any in-progress minigame/repair state without applying failure consequences.

SharedSWEP:CanRepairTarget() → boolean, Entity?Source ☍

Checks whether the entity under the owner's crosshair has an active electric fault in range.

Returns

  1. 1boolean
  2. 2Entity?The faulted entity, if any.
SharedSWEP:CompleteRepair()Source ☍

Finalizes a completed repair, fixing the electric fault server-side.

SharedSWEP:DrawHUD()Source ☍
SharedSWEP:FailRepair()Source ☍

Fails the repair server-side, so wandering out of range still applies the usual cooldown.

SharedSWEP:GetBoneOrientation(basetab, tab, ent, bone_override) → unknown|nil, unknown|nilSource ☍

Parameters

  • basetabany
  • tabany
  • entany
  • bone_overrideany

Returns

  1. 1unknown|nil
  2. 2unknown|nil
SharedSWEP:IsStoredTargetInRange(cancelMultiplier) → booleanSource ☍

Returns whether the stored repair target is still valid and in cancel range.

Parameters

  • cancelMultipliernumber?Distance multiplier over Fix Distance (default 1.5).

Returns

  1. boolean
SharedSWEP:ResetBonePositions(vm)Source ☍

Parameters

  • vmany
SharedSWEP:StartRepairTimer()Source ☍

Start the repair timer (called when minigame is complete)

SharedSWEP:UpdateBonePositions(vm)Source ☍

Parameters

  • vmany

Fields

SharedSWEP.RepairTargetSource ☍

The entity metatable, with CityRP's own additions to Garry's Mod's Entity.

SharedSWEP.RepairTimeSource ☍

Repair timer settings Time in seconds to complete repair

SharedSWEP.vRenderOrderSource ☍
SharedSWEP.wRenderOrderSource ☍