Skip to main content

updatePlayer

exports["RiP-Death"]:updatePlayer(playerId, isDead, isStabilized, playerLocation) 

This function updates a dead players data

Arguments

NameTypeOptionalExplenation
playerIdIntegerNoPlayer server-id
isDeadBooleanNoPlayer death state
isStabilizedBooleanNoPlayer stabilized
playerLocationVectorNoPlayer location (x,y,z)

Example

local xPlayer = ESX.GetPlayerFromId(source)

exports["RiP-Death"]:updatePlayer(xPlayer.source, true, false, vector3(0.0, 0.0, 0.0)) -- set player dead but not stabilized

Set player dead and also stabilized:

exports["RiP-Death"]:updatePlayer(xPlayer.source, true, true, vector3(18.7, 99.0, 62.9)) 

Set player not dead (no coords required):

exports["RiP-Death"]:updatePlayer(xPlayer.source, false, false)