[Release] Handcuff and Handsup scripts


#1

This will make the handcuffs and handsup scripts work together EX. Players can’t put their handsup while they are handcuffed.

Keys: X - Cuff the nearest player

TBA

Config
Ped restriction
Player identifier restriction

[Release] Simple cuff script OUTDATED
[Request] Hands Up script /hu
Drag Script/Cuff Script In One File
[Request] Cuff Nearest Player
Disable weapon when cuffed
Handcuff plugin [FIVEM]
Simple police or cuff command
[REQUEST] Hands Up Script w. Typing /hu
Hands up
[REQUEST] I need a Cuff|Revive/Respawn|admin(not es_admin2)|
Handcuffs with searching etc. Help please
Hands Up Script /hu Animation [FX SERVER]
[REQUEST] Handcuffs on button
Does anyone know the excitement of putting your hand on your head? Sorry for my english - Google translator
[Request] Looking for a cuff script and delete get guns when entering a medic helicopter
Cuffing Script
#2

Amazing, Alot of people have made this script but kept it to themselves and only their servers which pisses me off. Thank you so much.


#3

Hi zach im not stalking


#4

How can i make is use a keybind rather then a command?


#5
if IsControlJustPressed()

#6

hi, @grahamgarn are you willing to edit his script and make it so to press a command as well cuff people nearby that would be awesome :slight_smile:


#7

Commands have perms. Doing this you would have to start it client side with a control press. Then send it to the server side for a perm check and then back to the client to complete. Unless you want everyone cuffing everyone.


#8

I apologize for the late response as I am on vacation, but adding the ability with a key handler has its good and bad traits. The good trait is that its easier to access than a chat command, but the bad side is a lot of users don’t know how to add perms to those. I am gonna be working on a job system for essentialmode. It will hopefully have whitelisted jobs available, Job pay checks, restricted job commands, etc. There will also be a keybinded restricted cuff function for police. You will also be able to use commands if you please. It just all takes time.

Now if you want to try and change this script into something else have at it but one good way to use a keybinded cuff and to use rays to return the ped in front of you find their PlayerID then run the cuff function on that player. If you do not know what a ray is then I am sorry I can’t really explain here. but I know some scripts on here use it to find vehicles.

I am sorry for rambling on just trying to answer everything at midnight.


#9

Will the job system you are working on be for essentialmode 3.+ and couchDB?

@xander1998


#10

@xander1998 help out the ES 3.0 users. Not much available for them yet. There is already a job system for the SQL ES. I don’t use 3.0 but it’s not about me, it’s about the community. Many don’t have access to the older versions and I’m respecting Kane’s wishes by not distributing the SQL version.


#11

Will try to make it available for both MySQL and CouchDB but I haven’t decided what I would like to do yet with that. But will more then likely be available for both.


#12

197625] Error running system event handling function for resource cuff: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: sv_cuff.lua:15: attempt to call a nil value (method ‘Split’)
[ 197625] stack traceback:
[ 197625] sv_cuff.lua:15: in function ‘stringsplit’
[ 197625] sv_cuff.lua:3: in upvalue ‘handler’
[ 197625] citizen:/scripting/lua/scheduler.lua:124: in function citizen:/scripting/lua/scheduler.lua:123
[ 197625] stack traceback:
[ 197625] [C]: in function ‘error’
[ 197625] citizen:/scripting/lua/scheduler.lua:39: in field ‘CreateThreadNow’
[ 197625] citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92


#13

That stringsplit no longer works inside the sv_cuff.lua. If you want it to work again replace the current stringsplit in the server script with this one.

function stringsplit(inputstr, sep)
    if sep == nil then
        sep = "%s"
    end
    local t={} ; i=1
    for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
        t[i] = str
        i = i + 1
    end
    return t
end

#14

Thanks!

Also, is there any simple way to have it instead of being /cuff id to /cuff and just have it check to see if the player is within a certain vicinity?


#15

It is indeed possible but I am working on a K9 script right now so I wouldn’t do it today.


#16

Wow that sounds awesome!


#17

I get an error trying to cuff someone. Is anyone else getting this error?


#18

I posted a fix above.


#19

Yeah and that is the one I’m having a problem with :confused:

Edit: Nevermind I see what you posted


#20

I will probably just take the link doen and put it on my github so I can edit it easier.