Zum Hauptinhalt springen

Server Functions

Functions available on the server side. Import the core in your resource's fxmanifest.lua and call them through the global MSK table (or via exports.msk_core:*):

shared_script '@msk_core/import.lua'

Overview

PageDescription
PlayerThe unified player object, job and gang definitions, the mirrored table
InventoryMSK.HasItem, MSK.RegisterItem and the inventory bridge
EntitiesClosest entity/player helpers
VehicleServer-side vehicle queries and MSK.SpawnVehicle
Vehicle StoreThe owned-vehicle table of every framework behind one API
CoordsShow / copy coordinates for a player
WorldSpawn-point checks, closest players, MSK.AddWebhook
NotifySend notifications to a player by server id, or to everyone
ScaleformTrigger scaleforms on a player
Ace PermissionAce checks, AddAce / AddPrincipal
CommandsMSK.RegisterCommand with ace restriction
SocietyCompany and society account money
OfflineBank money by identifier, online or offline, and the character table
Ban SystemIdentifier/token bans and ban commands
CronSchedule recurring jobs by interval, clock time or cron expression
Disconnect LoggerLog player disconnects
Version CheckerMSK.Check version & dependency checks
LoggerSend logs to Grafana Loki, Datadog or Fivemanage
EventsSend one client event to many players or everyone in range
FilesList the files in a folder of a resource
txAdminShow txAdmin announcements, messages and restart warnings as MSK notifications
UIServer-side Input dialog, Numpad (code checked on the server), Progressbar, TextUI, Context Menu, Menu, Alert, Skillcheck

See also the Shared functions (callbacks, math, string, table, timeout, vector) which work on both sides.