You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2021. It is now read-only.
In RP, if you have to cuff a policeman, he shouldn't stay a cop. like a whitelisted cop that is playing as a civilian can be cuffed. Because of right now we cannot cuff another whitelisted policeman.
The text was updated successfully, but these errors were encountered:
t-valette
changed the title
In RP, if you have to cuff a policeman, he shouldn't stay a cop.
add a config for allow cuffing or not cops
Jun 8, 2017
t-valette
changed the title
add a config for allow cuffing or not cops
add a config for allow cuffing or not others cops
Jun 8, 2017
This is quite simple, i have done it myself on my servers. Remove the check for IsCop in the getArrested function and add the other requests to the IsCop request in citizen.createthread of your client.lua
This is my current police:getArrested
I removed IsCop and left it as (config.useCopWhitelist == true)
RegisterNetEvent('police:getArrested')
AddEventHandler('police:getArrested', function()
if((config.useCopWhitelist == true) or config.useCopWhitelist == false) then
handCuffed = not handCuffed
if(handCuffed) then
TriggerEvent("police:notify", "CHAR_ANDREAS", 1, txt[config.lang]["title_notification"], false, txt[config.lang]["now_cuffed"])
isHandCuffed = true -- jail addon
else
TriggerEvent("police:notify", "CHAR_ANDREAS", 1, txt[config.lang]["title_notification"], false, txt[config.lang]["now_uncuffed"])
isHandCuffed = false -- jail addon
drag = false
end
end
end)
if (isInService == false) then
if (handCuffed == true) then
RequestAnimDict('mp_arresting')
while not HasAnimDictLoaded('mp_arresting') do
Citizen.Wait(0)
end
local myPed = PlayerPedId(-1)
local animation = 'idle'
local flags = 16
TaskPlayAnim(myPed, 'mp_arresting', animation, 8.0, -8, -1, flags, 0, 0, 0, 0)
end
--Piece of code from Drag command (by Frazzle, Valk, Michael_Sanelli, NYKILLA1127 : https://forum.fivem.net/t/release-drag-command/22174)
if drag then
local ped = GetPlayerPed(GetPlayerFromServerId(officerDrag))
local myped = GetPlayerPed(-1)
AttachEntityToEntity(myped, ped, 4103, 11816, 0.68, 0.00, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true)
else
DetachEntity(GetPlayerPed(-1), true, false)
end
end
In RP, if you have to cuff a policeman, he shouldn't stay a cop. like a whitelisted cop that is playing as a civilian can be cuffed. Because of right now we cannot cuff another whitelisted policeman.
The text was updated successfully, but these errors were encountered: