cityrp.hints
Clientside Hints System.
- Clientcityrp.hints:Cycle(class) → string?Source ☍
-
Gets the current hint text to display for a cycling group, based on elapsed time.
Parameters
- classstringThe cycling group identifier.
Returns
- string?The current hint text, or nil if the group has no hints registered.
- Clientcityrp.hints:Get(key) → boolean?Source ☍
-
Gets whether a hint is currently enabled.
Parameters
- keystringThe hint identifier.
Returns
- boolean?Whether the hint is enabled, or nil if the hint has never been set.
- Clientcityrp.hints.Name(key) → stringSource ☍
-
Gets the cookie name used to persist a hint's enabled state.
Parameters
- keystringThe hint identifier.
Returns
- stringThe cookie name for the hint.
- Clientcityrp.hints:Register(key, name, desc)Source ☍
-
Registers a hint so it can be toggled from the F1 hints menu.
Parameters
- keystringUnique hint identifier.
- namestring?Display name shown in the hints menu, derived from
keyif omitted. - descstring?Description shown under the hint's checkbox.
- Clientcityrp.hints:RegisterCycling(class, hint, _)Source ☍
-
Registers one or more hints to cycle through for a given class.
Parameters
- classstringThe cycling group identifier.
- hintstring|numberThe first hint to add, or the per-hint cycle time in seconds (in which case the actual hint text follows in
...). - stringAdditional hint strings to cycle through.
- Clientcityrp.hints:Set(key, enabled)Source ☍
-
Sets whether a hint is enabled and persists the choice to a cookie.
Parameters
- keystringThe hint identifier.
- enabledbooleanWhether the hint should be enabled.