[release] [vrp] new arrest animation

Hello everyone today i will present you the vrp version of this resource [Release] [ESX] Advanced Arrest Animation. It’s not my personal resource i just converted it to vRP.

Enjoy!

Download link:https://github.com/reymihai/vrp_arrest
Video:https://streamable.com/6lmwu

6 Likes

nice release!

1 Like

Error occurred

1 Like

Nice bruh

2 Likes

what error?

I want to get rid of the handcuffed animation

2019년 10월 18일 (금) 오전 3:19, Mita via FiveM thiscamefrom@fivem.net님이 작성:

Good Job, thanks for converting my script to vrp as many people asked for it :+1:

2 Likes

Oh you mean like I did awhile ago…

this script work on vrp 2 ?

i didn t see it but the codes aren’t simmilar anyway

no it doesn’t it’s only for dunko vrp

thanks for sharing it for esx without that i wouldn’t post it <3

5 gang vip de ce?

How can i put it in a hotkey and only can be used for the police? Thanks

This is how i have done it, but for this to work, you would need pNotify :wink:

vRP → Client → Police.lua:

RegisterNetEvent("cuff")
AddEventHandler("cuff", function()
	if not tvRP.isInComa() and not tvRP.isHandcuffed() then
		if IsPedInAnyVehicle(PlayerPedId(), true) then
			TriggerEvent("pNotify:SendNotification",{text = "",type = "error",timeout = (5000),layout = "centerLeft",queue = "global",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})
		else
			TriggerServerEvent('handcuff:cuffHim')
		end
	end
end)

vRP → Modules → Police.lua:

RegisterServerEvent('handcuff:checkjob')
AddEventHandler('handcuff:checkjob', function()
	local source = source
    local user_id = vRP.getUserId(source)

    if vRP.hasPermission(user_id,"police.handcuff") then
		TriggerClientEvent('cuff', source)
    end
end)

RegisterServerEvent('handcuff:cuffHim')
AddEventHandler('handcuff:cuffHim', function()
	local source = source
	local user_id = vRP.getUserId({source})
	
	vRPclient.getNearestPlayer(source,{1.5},function(cplayer)
		if cplayer ~= nil then
			vRPclient.toggleHandcuff(cplayer,{})
			vRPclient.isHandcuffed(cplayer,{}, function(handcuffed)
				if handcuffed then
					TriggerClientEvent("pNotify:SendNotification", source,{text = {""}, type = "info", queue = "global", timeout = 3000, layout = "centerLeft",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}
				else
					TriggerClientEvent("pNotify:SendNotification", source,{text = {""}, type = "info", queue = "global", timeout = 3000, layout = "centerLeft",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}
				end
			end)
		else
			TriggerClientEvent("pNotify:SendNotification", source,{text = {lang.common.no_player_near()}, type = "error", queue = "global", timeout = 4000, layout = "centerLeft",animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}})
		end
	end)
end)
1 Like

thanks, and the hotkey how can i add it for police?

It is for the police, vRP :smile:

As you can see in the path i’m directing you, then i’m directing you to police.lua, which is obv. is for the police :joy:

you dont understand me, how can i add a button to do this xDD :joy::joy:

I already showed everyone how to do this on another thread 2 months ago:

your tutorial is a little bit bugged. The police didnt realize the animation, and then the handcuffed cant move. Do you know how to fix that? thanks