RegisterNetEvent('police:server:TiePlayer', function(playerId, isSoftcuff)
local src = source
local playerPed = GetPlayerPed(src)
local targetPed = GetPlayerPed(playerId)
local playerCoords = GetEntityCoords(playerPed)
local targetCoords = GetEntityCoords(targetPed)
if #(playerCoords - targetCoords) > 299999.5 then return DropPlayer(src, "尝试进行作弊行为") end
local Player = QBCore.Functions.GetPlayer(src)
local TiedPlayer = QBCore.Functions.GetPlayer(playerId)
if not Player or not TiedPlayer or (not Player.Functions.GetItemByName("ziptie")) then return end
if Player.Functions.RemoveItem('ziptie', 1) then
TriggerClientEvent("police:client:GetTied", TiedPlayer.PlayerData.source, Player.PlayerData.source, isSoftcuff)
end
end)