Player
MSK.Player
Parameters
clientId - number - Player Index - equal to PlayerId()
serverId - number - Player Server Id
ped - number - Player Index - equal to PlayerPedId()
coords - vector3 - Player Coords - equal to GetEntityCoords(PlayerPedId())
heading - float - Player Heading - equal to GetEntityHeading(PlayerPedId())
vehicle - number - A vehicle handle
seat - number - Seat, the player is in - equal to GetVehiclePedIsIn(PlayerPedId(), false)
weapon - number - Hash of Players current weapon - equal to GetCurrentPedWeapon(PlayerPedId(), true)
local clientId = MSK.Player.clientId
local serverId = MSK.Player.serverId
local playerPed = MSK.Player.ped
local playerCoords = MSK.Player.coords
local playerHeading = MSK.Player.heading
local vehicle = MSK.Player.vehicle
local seat = MSK.Player.seat
local currentWeapon = MSK.Player.weapon
-- Notification
MSK.Player.Notify(header, message, type, duration)Other Players
You can get information about other players on clientside
Parameters
playerId - number - Players server id
key - string - The key that you want the value from
Returns
value - any - The new value of the key
Description See MSK.Player above for parameter "key"
Event Handler
Returns
key - string - The key that changed
value - any - The new value of the changed key
oldValue - any - The old value of the changed key
Description See MSK.Player above for parameter "key"
Set own values
You can set you own values by using MSK.Player as a function. You can also set them as replicated.
Parameters
key - string - The key that you want to set
value - any - The value that you want to set for the key
replicated - boolean - whether replicated or not
MSK.GetClosestPlayer
Parameters
coords - vector3 - Coords - Optional, default: playerCoords
Returns
player - number - Player Index - equal to PlayerId()
distance - float - The Distance to this Player
MSK.GetClosestPlayers
Parameters
coords - vector3 - Coords
maxDistance - float - Max distance to check for players - Max Distance is 200.0
Last updated