stabilizePlayer
exports["RiP-Death"]:stabilizePlayer(playerId, targetId, cb)
This function stabilizes a dead player
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
playerId | Integer | No | Player server-id |
playerId | Integer | No | Target server-id |
cb | Function | Yes | Callback 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)