updatePlayer
exports["RiP-Death"]:updatePlayer(playerId, isDead, isStabilized, playerLocation)
This function updates a dead players data
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
playerId | Integer | No | Player server-id |
isDead | Boolean | No | Player death state |
isStabilized | Boolean | No | Player stabilized |
playerLocation | Vector | No | Player 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)