Zum Hauptinhalt springen

Client Functions

Functions available on the client 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 mirrored MSK.Player table, MSK.OnPlayer and client player helpers
InventoryMSK.HasItem on the client
EntitiesClosest and nearby peds, objects, vehicles and players, death detection
VehicleVehicle queries, seats, plates, doors
Vehicle PropertiesRead and apply colors, mods and damage, also from the server
CoordsShow / copy coordinates and admin commands
PointsPoints with enter, exit and per-frame callbacks, closest and nearby points
RequestStream models, anims, textures, audio banks, weapon assets, raycasts
WorldSpawn point checks, ped mugshots, closest players
NotifyNotifications with icons, positions and in-place updates, help text, HUD text, subtitles, spinners
ScaleformFreemode messages, popups, breaking news, MSK.Scaleform.New for any movie
ZonesSphere, box and poly zones, plus the in-game Zone Creator
KeybindKey bindings players can change, with press and release handlers
ControlsDisable game controls without your own loop
DUIWeb pages rendered into game textures
MarkerMarkers stored once and drawn with one call
AnimPlay, stop and wait for animations and scenarios
Ace PermissionClient-side ace checks
CommandsMSK.RegisterCommand with ace support
UIInput dialog, Numpad, Progressbar and circle, TextUI, Context Menu, Menu, Alert, Radial Menu, Skillcheck, player Settings and Clipboard

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