Koja Scripts

2.0 Features

Koja Multicharacter 2.0: arrival cutscene, scene per character, own car, seasons, sound and music, CK, trash, approval, name changes, admin panel, Tebex and Discord slots, party.

2.0 Features

Arrival cutscene

On a new character's first spawn at Config.Spawn.NewCharacterSpawn a plane passes over the airport, then the character walks into frame while a "Welcome to Los Santos" title shows between letterbox bars. SPACE or ENTER skips it. Resources can add their own cutscene with RegisterArrival and switch to it with Config.Arrival.Mode.

Scene per character

Each character stands at its own place in the selection: police at Mission Row, EMS at Pillbox, mechanics at Benny's, or wherever a resource returns from the sceneLocation hook (a house, a motel). Switching to a character at another place fades through black.

  • Auto framing snaps the character to the ground and turns it when a wall blocks the camera or the walk path.
  • Own car: the character's best owned vehicle (by class, then top speed) stands behind them with its tuning.

Seasons

Between from and to dates the scene switches to a season: winter brings snow, a Christmas tree and calm holiday music; Halloween brings night, fog, pumpkins and a dark track. Add your own in Config.Scene.Seasons.List.

Sound and music

UI sounds, cinematic scene sounds and a music track for the selection (one per season). Players mute sounds and music with two buttons in the top bar; the choice is saved on their PC.

Character statuses

StatusWhat the player sees
Dead (CK)Memorial card with date and reason. Cannot be played. Can be deleted when Config.CK.AllowDelete
In trashDeleting a character moves it to the trash for Config.Trash.Days days. Restore or delete it permanently from its card. It is purged after that
In reviewWith Config.Approval.Enabled a new character waits for staff before the first spawn. Staff get a notification and an optional webhook
DeniedShows the reason. Can only be deleted

Name change requests

From the character card a player asks for a new first and last name with a reason. Staff approve or deny it in the admin panel; the name changes in the framework right away, also while the character is online.

Admin panel

/charadmin opens a panel in game:

  • Search by player name, license, Discord, FiveM id, server id, character name or character id. An empty search lists online players.
  • Account view: identifiers, slots (custom limit or reset), every character with its status and an action menu (lock, CK, trash, restore, delete, approve, deny, name request, force relog, rename).
  • Staff notes per account or per character, and the full history of the account.
  • Queue tab with every pending approval and name request.

Slots from Tebex and Discord

  • kmcaddslots <target> <amount> runs from the console, so a Tebex package can add slots.
  • Config.Slots.DiscordRoles gives slots by Discord role (needs a bot token and guild id).

Party

Players create a party in the selection and share the code. When a party member is already in the world, the spawn list offers Next to that member.

For developers

Other resources can add rows to the character card (RegisterCardField), props or pets to the scene (RegisterSceneHook + buildScene), their own scene locations, cars and arrivals. See the Developer API.