Skip to main content

stabilizePlayer

exports["RiP-Death"]:stabilizePlayer(playerId, targetId, cb) 

This function stabilizes a dead player

Arguments

NameTypeOptionalExplenation
playerIdIntegerNoPlayer server-id
playerIdIntegerNoTarget server-id
cbFunctionYesCallback function

Returned Integer

There are different codes which will be returned in a different case.

  • 200: everything worked
  • 401: player has no license
  • 404: target is already stabilized
  • 500: weird error (for example if you use the export wrong)

Example

local xPlayer = ESX.GetPlayerFromId(source)
local yPlayer = ESX.GetPlayerFromId(target)

exports["RiP-Death"]:stabilizePlayer(xPlayer.source, yPlayer.source, function(callback)
if callback == 200 then
print("stabilized player")
else
print("error occurred: "..callback)
end
end)