Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --HandCuff start
- local handcuffconfig = {
- model = "prop_cs_cuffs_01",
- handcuffs = nil
- }
- --[[ HANDCUFF SCRIPT ]]--
- RegisterNetEvent("Handcuff")
- AddEventHandler("Handcuff", function()
- local lPed = GetClosestPlayer
- if DoesEntityExist(lPed) then
- if IsEntityPlayingAnim(lPed, "mp_arresting", "idle", 3) then
- --DetachEntity(handcuffconfig.handcuffs, 0, 0)
- --DeleteEntity(handcuffconfig.handcuffs)
- --handcuffconfig.handcuffs = nil
- ClearPedSecondaryTask(lPed)
- SetEnableHandcuffs(lPed, false)
- SetCurrentPedWeapon(lPed, GetHashKey("WEAPON_UNARMED"), true)
- else
- RequestAnimDict("mp_arresting")
- while not HasAnimDictLoaded("mp_arresting") do
- Citizen.Wait(100)
- end
- --RequestModel(GetHashKey(handcuffconfig.model))
- --while not HasModelLoaded(GetHashKey(handcuffconfig.model)) do
- --Citizen.Wait(100)
- --end
- --local plyCoords = GetEntityCoords(GetPlayerPed(PlayerId()), false)
- --handcuffconfig.handcuffs = CreateObject(GetHashKey(handcuffconfig.model), plyCoords.x, plyCoords.y, plyCoords.z, 1, 1, 1)
- --AttachEntityToEntity(handcuffconfig.handcuffs, GetPlayerPed(PlayerId()), GetPedBoneIndex(GetPlayerPed(PlayerId()), 60309), 0.0, 0.05, 0.0, 0.0, 0.0, 80.0, 1, 0, 0, 0, 0, 1)
- TaskPlayAnim(lPed, "mp_arresting", "idle", 8.0, -8, -1, 49, 0, 0, 0, 0)
- SetEnableHandcuffs(lPed, true)
- SetCurrentPedWeapon(lPed, GetHashKey("WEAPON_UNARMED"), true)
- end
- end
- end)
- --Handcuff end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement