Clothes, synchronized scenes, view of a player (LS:MP)
Three things the LS:MP server does by itself, wrapped by RLX:
lua
-- Clothes set by the SERVER for every player (uniform, prison clothes), not saved.
-- Tables by component work too: { [component] = { drawable, texture } }, prop -1 = none.
RLX.SetOutfit(source, { components = { [11] = { 55, 0 }, [4] = { 25, 0 }, [8] = { 58, 0 } }, props = { [0] = { 46, 0 } } })
RLX.ResetOutfit(source) -- the character's own clothes again
-- A synchronized scene: several players (or entities) play their animation
-- together, aligned, the same on every screen (cuffing, handshake, CPR...).
local scene = RLX.PlaySyncScene({
heading = 90.0, durationMs = 3600, -- coords: those of the first participant by default
participants = {
{ source = suspect, dict = "mp_arrest_paired", clip = "crook_p2_back_left" },
{ source = officer, dict = "mp_arrest_paired", clip = "cop_p2_back_left" },
},
})
RLX.StopSyncScene(scene)
-- An image of what a player's game shows (a camera rendered in a frame they
-- do not see; no interface on it): data URL for a page, a Discord webhook...
local image, err = RLX.CapturePlayerView(source, { width = 960, height = 540, quality = 70 })SetOutfituses the LS:MP server setters (lsmp.setPedComponentVariation,setPedPropIndex): the clothes are on the ped for everyone, even if the player's game misses an event.- Participants of a scene:
source(a player) ornetId,dict,clip,blendIn,blendOut,flags,offset; 1 to 8, within 50 m.rlx_policecuffs with one. CapturePlayerViewtakes a few frames plus the upload: call it from a thread.rlx_adminuses it (See their game, permissionrlx.admin.screen).- Also:
RLX.GetLocale()on the server (Config.Locale).