CityRP Documentation Repository

Enumerations

Shared enumerations and constants for CityRP.

Tables

SharedADVERT_COLORSSource ☍

Advert color options

SharedCOL_TEXT_ONSource ☍

Label colour for text drawn on a filled role colour, picked for contrast. Keyed by the Color object itself, so look up the base role colour once at style time: a cityrp.ui.Shade or ColorAlpha result is a new object and is not in here.

Classes

Type Unions

SharedColourSource ☍

Any CityRP colour constant, or a Color built on the spot.

Accepted values:

  • COL
  • Color
SharedWARRANTSource ☍

The kinds of warrant that can be held against a player.

Accepted values:

  • "bolo"
  • "search"
  • "arrest"

Fields

HUD Display Modes

SharedHUD_MODE_CHATONLYSource ☍

Only chat visible (for recording)

SharedHUD_MODE_FULLSource ☍

Full HUD visible

SharedHUD_MODE_HIDDENSource ☍

Everything hidden (current /hud behavior)

Networking Classes

SharedCLASS_ANGLESource ☍
SharedCLASS_BOOLSource ☍
SharedCLASS_BYTESource ☍
SharedCLASS_ENTITYSource ☍
SharedCLASS_FLOATSource ☍
SharedCLASS_LONGSource ☍
SharedCLASS_SHORTSource ☍
SharedCLASS_STRINGSource ☍

The CLASS_ networking constants are superseded by NETCLASS_ (see plugins/networking). Still read by existing callers, so not removed, but nothing new should be written against them.

SharedCLASS_VECTORSource ☍

Setmodel Restrictions

SharedMDL_ALLSource ☍
SharedMDL_MBRSource ☍
SharedMDL_MBRLVLSource ☍
SharedMDL_NONESource ☍
SharedMDL_REPSource ☍

Sound Levels

SharedSNDLVL_20dBSource ☍
SharedSNDLVL_25dBSource ☍
SharedSNDLVL_30dBSource ☍
SharedSNDLVL_35dBSource ☍
SharedSNDLVL_40dBSource ☍
SharedSNDLVL_45dBSource ☍
SharedSNDLVL_50dBSource ☍
SharedSNDLVL_55dBSource ☍
SharedSNDLVL_60dBSource ☍
SharedSNDLVL_65dBSource ☍
SharedSNDLVL_70dBSource ☍
SharedSNDLVL_75dBSource ☍
SharedSNDLVL_80dBSource ☍
SharedSNDLVL_85dBSource ☍
SharedSNDLVL_90dBSource ☍
SharedSNDLVL_95dBSource ☍
SharedSNDLVL_100dBSource ☍
SharedSNDLVL_105dBSource ☍
SharedSNDLVL_110dBSource ☍
SharedSNDLVL_115dBSource ☍
SharedSNDLVL_120dBSource ☍
SharedSNDLVL_125dBSource ☍
SharedSNDLVL_130dBSource ☍
SharedSNDLVL_135dBSource ☍
SharedSNDLVL_140dBSource ☍
SharedSNDLVL_145dBSource ☍
SharedSNDLVL_150dBSource ☍
SharedSNDLVL_155dBSource ☍
SharedSNDLVL_180dBSource ☍
SharedSNDLVL_GLOBALSource ☍
SharedSNDLVL_GUNFIRESource ☍
SharedSNDLVL_HORNSource ☍
SharedSNDLVL_IDLESource ☍
SharedSNDLVL_NONESource ☍
SharedSNDLVL_NORMSource ☍
SharedSNDLVL_ROCKETSource ☍
SharedSNDLVL_STATICSource ☍
SharedSNDLVL_TALKINGSource ☍

Colours

COL_* · 108 values Source ☍

Every colour the gamemode ships as a constant, for the HUD, the chatbox and derma alike. Cache these and pass them around rather than building a fresh Color() per frame.

Generic

SharedCOL_WHITESource ☍
SharedCOL_BLACKSource ☍
SharedCOL_REDSource ☍
SharedCOL_REDMUTEDSource ☍
SharedCOL_GREENSource ☍
SharedCOL_BLUESource ☍
SharedCOL_GREYSource ☍
SharedCOL_DGREYSource ☍
SharedCOL_INVISSource ☍

Limelight UI Guidelines

SharedCOL_UI_GREYSource ☍

0.9 * 255 = 230

SharedCOL_UI_GREENSource ☍
SharedCOL_UI_REDSource ☍
SharedCOL_UI_DARKREDSource ☍
SharedCOL_UI_PALEREDSource ☍
SharedCOL_UI_ORANGESource ☍
SharedCOL_UI_AMBERSource ☍
SharedCOL_UI_PALEBLUESource ☍

Limelight Brand

SharedCOL_BRANDSource ☍
SharedCOL_STEELSource ☍
SharedCOL_STORMSource ☍
SharedCOL_STEEL_WHITESource ☍

Accept and Reject

SharedCOL_REJECTSource ☍
SharedCOL_ACCEPTSource ☍

UI Roles

SharedCOL_INFOSource ☍

The five semantic roles from docs/ui-style.md. COL_BRAND is the fifth. Aliases, so a role and the constant behind it stay the same Color object.

SharedCOL_SUCCESSSource ☍
SharedCOL_WARNINGSource ☍
SharedCOL_DANGERSource ☍

UI Panels

SharedCOL_PANEL_BGSource ☍
SharedCOL_PANEL_TITLEBARSource ☍
SharedCOL_PANEL_BODYSource ☍
SharedCOL_PANEL_CARDSource ☍
SharedCOL_PANEL_ROW_ALTSource ☍
SharedCOL_PANEL_HEADERSource ☍
SharedCOL_PANEL_INPUTSource ☍
SharedCOL_PANEL_BUTTONSource ☍
SharedCOL_PANEL_SELECTEDSource ☍

UI Text

SharedCOL_TEXTSource ☍
SharedCOL_TEXT_MUTEDSource ☍

HUD

SharedCOL_HUD_CHIPSource ☍

COL_UI_GREY at 0.8, for chips that carry text

SharedCOL_HUD_OUTLINESource ☍

Chat

SharedCOL_BASESource ☍
SharedCOL_NAMESource ☍
SharedCOL_ADVERTSource ☍
SharedCOL_OOCSource ☍
SharedCOL_LOOCSource ☍
SharedCOL_TWEETSource ☍
SharedCOL_BROADCASTSource ☍
SharedCOL_BROADCAST_SUBSource ☍
SharedCOL_POLBROADSource ☍
SharedCOL_POLBROAD_SUBSource ☍
SharedCOL_SWATBROADSource ☍
SharedCOL_SWATBROAD_SUBSource ☍
SharedCOL_FIREBROADSource ☍
SharedCOL_FIREBROAD_SUBSource ☍
SharedCOL_TAXISource ☍
SharedCOL_TAXIBROADSource ☍
SharedCOL_TAXIBROAD_SUBSource ☍
SharedCOL_REQUESTSource ☍
SharedCOL_RADIOSource ☍
SharedCOL_ADMINSource ☍
SharedCOL_STAFFCHATSource ☍
SharedCOL_PMSource ☍
SharedCOL_CLANSource ☍
SharedCOL_PRADIOSource ☍
SharedCOL_LIFEALERTSource ☍
SharedCOL_HELPSource ☍
SharedCOL_NOTIFYSource ☍
SharedCOL_JOINLEAVESource ☍

Player HUD

SharedCOL_MASKEDSource ☍
SharedCOL_SLEEPEFFECTSource ☍
SharedCOL_INJUREDSource ☍
SharedCOL_INJURED_MEDSource ☍
SharedCOL_INJURED_SERSource ☍
SharedCOL_INJURED_MORTSource ☍
SharedCOL_INJURED_ARRSource ☍
SharedCOL_STABILISEDSource ☍
SharedCOL_HOSTAGESource ☍

Vehicle HUD

SharedCOL_VEHNAMESource ☍
SharedCOL_VEHLOCKTEXTSource ☍

Misc HUD

SharedCOL_BREACHTEXTSource ☍
SharedCOL_MONEYSource ☍
SharedCOL_ITEMTEXTSource ☍
SharedCOL_NOTEHEADSource ☍
SharedCOL_CONTRANAMESource ☍
SharedCOL_GUIDESource ☍
SharedCOL_GUIDE_NEGATIVESource ☍
SharedCOL_STORMZYSource ☍
SharedCOL_TYRONESource ☍

Other

SharedCOL_GMRESTARTSource ☍

UV Light Tints

SharedCOL_UVLIGHT_OFFSource ☍

UV light heat warning tints. Vectors (0-1 range), not Color objects - these feed $selfillumtint on the bulb's overridden material rather than a full-brightness render colour.

SharedCOL_UVLIGHT_COOLSource ☍
SharedCOL_UVLIGHT_HOTSource ☍

Rank

SharedCOL_RANK_OWNERSource ☍
SharedCOL_RANK_SASource ☍
SharedCOL_RANK_ADMINSource ☍
SharedCOL_RANK_DEVSource ☍
SharedCOL_RANK_MODSource ☍
SharedCOL_RANK_CONTRIBSource ☍
SharedCOL_RANK_VETSource ☍
SharedCOL_RANK_OTHERSource ☍
SharedCOL_RANK_COREMANAGERSource ☍
SharedCOL_RANK_CORESource ☍
SharedCOL_RANK_BUSINESSSource ☍
SharedCOL_RANK_SECURITYSource ☍

Shares COL_RANK_OTHER; its own blue, Color(84, 154, 249), is on hold.

SharedCOL_RANK_ASSISTANTSource ☍
SharedCOL_RANK_PREMIUMSource ☍
SharedCOL_RANK_DEFAULTSource ☍
SharedCOL_RANK_TRIALMODSource ☍

CONTENT_ALIGN

9 values Source ☍

Content Alignment

SharedCONTENT_ALIGN_TOP_LEFTSource ☍

Panel:SetContentAlignment positions, named. The engine reads them off the numpad: 7 8 9 across the top, 4 5 6 across the middle, 1 2 3 across the bottom.

SharedCONTENT_ALIGN_TOP_CENTERSource ☍
SharedCONTENT_ALIGN_TOP_RIGHTSource ☍
SharedCONTENT_ALIGN_CENTER_LEFTSource ☍
SharedCONTENT_ALIGN_CENTERSource ☍
SharedCONTENT_ALIGN_CENTER_RIGHTSource ☍
SharedCONTENT_ALIGN_BOTTOM_LEFTSource ☍
SharedCONTENT_ALIGN_BOTTOM_CENTERSource ☍
SharedCONTENT_ALIGN_BOTTOM_RIGHTSource ☍

Fonts

FONT_* · 2 values Source ☍

The named fonts registered by the gamemode.

SharedFONT_TARGETID_HEADSource ☍

The name of the header font for the Target HUD (however, this is typically the same as the body font).

SharedFONT_TARGETIDSource ☍

The name of the body font for the Target HUD.

PASS

5 values Source ☍

Passes

SharedPASS_GREYSource ☍

A player's pass tier. String-backed to match cityrp.configuration["Passes"]'s own keys exactly -- these constants are names for the same literals that table (and every other pass-keyed table) already uses, not a new/different representation, so nothing keyed by the raw string needs rekeying just because call sites move onto these constants.

SharedPASS_GREENSource ☍
SharedPASS_BLUESource ☍
SharedPASS_ORANGESource ☍
SharedPASS_REDSource ☍