freezePlayer
exports["RiP-Admin"]:freezePlayer(adminSource, cb, targetSource)
This function (un-)freezes a spesific player
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
adminSource | Integer | No | Executing player source |
cb | Function | No | Callback function |
targetSource | Integer | No | Target player source |
Returned Value
If the action was completed, the function returns true
. Otherwise it returns false
Example
local xPlayer = ESX.GetPlayerFromId(1)
local yPlayer = ESX.GetPlayerFromId(2)
local callback = exports["RiP-Admin"]:freezePlayer(xPlayer.source, function(callback)
if callback then
print("player 1 toggled player 2's freeze state")
end
end, yPlayer.source)