Haha I will put that in now
I just tested it on my server and it works perfectly
And yes that’s a problem im currently unsure how to fix
when cuffed can you still get guns out etc? as when I fixed the original script it would allow the cuffed person to aim etc
I haven’t tested that but I assume as all I fixed was the walking around it would be the same. But I will look into a way of fixing that and change it if I ever do find a way (I’m still new to Lua)
this may be helpful for you
Great suggestion
Thanks! I’ll look into this
also would anyone know the reason why when the server gets over 20+ ID’s the script stops working giving error invalid player ID
Same thing happens here.
in sv_handcuffs.lua change:
– If this is not a valid player
if (playerID < 1 or playerID > 20) then
to (example)
– If this is not a valid player
if (playerID < 1 or playerID > 2000) then
thanks man, already figured it out but it works 100%
Where would i drop these folders??
In your FiveMServer\recources, just drag and drop in there, then add: - mxhandcuff to your citymp-server.yml, start the server and everything should be working fine!
It isnt working, i get an error when i type /cuff 1
Error running system event handling function for resource mxhandcuff: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: sv_handcuffs.lua:38: attempt to call a nil value (method ‘Split’)
stack traceback:
sv_handcuffs.lua:38: in function ‘stringsplit’
sv_handcuffs.lua:4: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:124: in function citizen:/scripting/lua/scheduler.lua:123
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:39: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92
Zanny: /cuff 1
Error running system event handling function for resource mxhandcuff: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: sv_handcuffs.lua:38: attempt to call a nil value (method ‘Split’)
stack traceback:
sv_handcuffs.lua:38: in function ‘stringsplit’
sv_handcuffs.lua:4: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:124: in function citizen:/scripting/lua/scheduler.lua:123
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:39: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92
Zanny: /cuff 2
Replace the splitstring function 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
this didn’t fix it for me
Well I currently don’t offer support anymore and this script hasn’t been updated since February, so I would have thought there would be a more updated cuff script about
there isn’t this is the only one