Suty
Community Service

Commands

Commands

Admin

Command Description
/comserv <id> <count> [reason] Sentence a player to community service. count = number of tasks. reason = optional free-text logged + announced.
/endcoms <id> Release a player from community service immediately. Stripping weapons (if enabled) still happens.

Permissions depend on Config.Permissions — Discord roles, Discord IDs, or ACE groups.

Programmatic API (other resources)

Send a player to community service from another resource:

exports['suty-serviciocomunitario']:AssignService(playerSource, amount, reason, issuer)
Param Type Notes
playerSource number The target player's server source id
amount number Number of tasks to assign
reason string Free-text logged + announced (e.g. 'Caught spawning vehicles')
issuer string Who's doing the assigning — staff name, system name, etc. Surfaced in logs and the player notification

Used by:

  • hl-perfmon — to punish caught vehicle spawners
  • suty-chainsnatch — to punish detected exploiters
  • Your own scripts when you need a non-chat punishment hook

Companion helpers:

exports['suty-serviciocomunitario']:ReleaseFromCommunityService(playerSource)
exports['suty-serviciocomunitario']:IsInCommunityService(playerSource)    -- returns bool, remainingTasks

Player flow (involuntary)

  1. Player gets sentenced (/comserv or AssignService) → teleported to Config.ServiceLocation
  2. Routing-bucketed (alone — friends can't join)
  3. NUI panel shows total task count
  4. Walk to a task marker → ox_lib skill-check sequence → task completes
  5. Repeat until count reaches 0
  6. Released to Config.ReturnLocation, weapons stripped (if enabled)

Escape attempts

If the player walks more than Config.MaxDistance meters from Config.ServiceLocation, they get auto-teleported back AND Config.EscapePenalty tasks are added to their sentence.