Files

> > CS2D > Lua Scripts > Handcuffs - For Jail
Files overviewCS2D overviewLua Scripts overview

English Handcuffs - For Jail >

16 comments3 kb, 699 Downloads

old Handcuffs - For Jail

Talented Doge
User Off Offline

Introduction
I assume you have played in one of the most famous jail servers - Fws Jail. That server has an awesome script that allows putting handcuffs on enemies; Also there was file cs2d HandCuff/Chain System. . As requested by my friend, I wrote my own version and decided to put it here.

Features
• Handcuffs
• Free handcuffs for Counter-Terrorists on spawn (configurable)
• Breaking free of handcuffs

Installation
1. Download the file
2. Extract the files into CS2D directory.
3. Change settings if needed.
4. Start your server and enjoy applying handcuffs to your friends and foes.

See it in action!


Known Issues
None at the moment.

Update >


License
This content is published under WTFPL 3.0.
edited 16×, last 17.08.18 07:12:07 pm
Approved by GeoB99

Download Download

3 kb, 699 Downloads

Comments

16 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Talented Doge
User Off Offline

Yes. I fixed it. I was veri dumb, sorry for the inconvenience. I uploaded the latest version of the script. Hopefully there are no bugs anymore.
edited 1×, last 17.08.18 07:13:48 pm

old

Cure Pikachu
User Off Offline

I looked at it and you know what? I fixed it.

old bug

saddy gamer
User Off Offline

Ok so I used these script and found a bug in

1) Sometimes the player is not cuffed (script not works)

2) When we uncuff the player the cuff image is still there it doesn't removed

NOTE :- ABOVE OBSERVATIONS ARE TAKEN UNDER BOTS.

I think that you will fix this...BTW nice script

old

Talented Doge
User Off Offline

Quote
There's so many bugs, But it doesn't matter for me, Because i already have the original cuffs script, took it from jail's hoster.

You don't need to comment here just saying you don't need it.

old

Marco X
User Off Offline

There's so many bugs, But it doesn't matter for me, Because i already have the original cuffs script, took it from jail's hoster.

old

Talented Doge
User Off Offline

@user zazz:
Try the updated version.

As for bug one, I tried to make everyone being cuffed switch to knife every second...

old

zazz
User Off Offline

@user Talented Doge:
Bug 1: Try using Q to return to your knife once you're cuffed.. or maybe it has no effect on bots.
Bug2: When i killed a cuffed player
Bug3: When i quitted the server
--

I tried cuffing 2 bots and i could only cuff 1, is it a bug or maybe because i have 2 "addhook hit" on my map script?
I like it!
edited 1×, last 10.08.18 10:25:40 pm

old

Talented Doge
User Off Offline

I've fixed the discovered bug. Thanks for reporting.

@user 2Gen: There are now. They have a handcuff script.

old

2Gen
User Off Offline

Funny script. I have not played on Jail servers for years. Previously, there was no special scripts.

@user Talented Doge:
CT leaving:
1
2
3
4
LUA ERROR: sys/lua/autorun/handcuffs.lua:94: bad argument #1 to 'freeimage' (number expected, got nil)
 -> [C]: in function 'freeimage'
  -> sys/lua/autorun/handcuffs.lua:94: in function <sys/lua/autorun/handcuffs.lua:92>
  -> in Lua hook 'leave', params: 1, 4
CT kills handcuffed T
1
2
3
LUA ERROR: sys/lua/autorun/handcuffs.lua:64: table index is nil
 -> sys/lua/autorun/handcuffs.lua:64: in function <sys/lua/autorun/handcuffs.lua:59>
  -> in Lua hook 'die', params: 2, 1, 1, 603, 153, 0

P.S. Nice license
I like it!

old

Rainoth
Moderator Off Offline

@user Talented Doge: For #2, you forgot to define die hook params or you thought you didn't need all of them but you left the 'v' var anyway. Which is nil.
For #3, I think it's very obvious since you can see the "Server Shutdown" right above the error in his comment. It's because you init the var as nil at the beginning but that doesn't mean the player will necessarily be cuffed, in other words, his table value is going to remain nil and not get an image id. Yet you'll call the freeimage function on it regardless whenever the player leaves.

This is why you always add
if img ~= nil then
and
freeimage(img) img = nil
everywhere when you work with CS2D images.

old

Talented Doge
User Off Offline

Bug 1: I tried to make selecting other weapons as difficult as possible. Perhaps I should add return 1 for cuffed players...

Bug 2 & Bug 3: When does these occur?

old

zazz
User Off Offline

Fuck yes! You don't know how much i waited for this, I fucking love you dude, thank you for making this thank you, thank you, thank you, i'll use it in my jail

EDIT:
I found a bug; Somehow when you cuff a player, in this case i cuffed a bot, he switched to his knife while cuffed and killed me.

EDITx2:
1
2
3
LUA ERROR: maps/zAzz_Jail v1.9.lua:220: table index is nil
-> maps/zAzz_Jail v1.9.lua:220: in function <maps/zAzz_Jail v1.9.lua:215>
-> in Lua hook 'die', params: 2, 50, 0

EDIT x3
1
2
3
4
5
6
Server Shutdown

LUA ERROR: maps/zAzz_Jail v1.9.lua:248: bad argument #1 to 'freeimage' (number expected, got nil)
-> [C]: in function 'freeimage'
-> maps/zAzz_Jail v1.9.lua:248: in function <maps/zAzz_Jail v1.9.lua:246>
-> in Lua hook 'leave', params: 1, 4
I like it!
edited 5×, last 10.08.18 03:53:00 am

old

KingShadow
User Off Offline

Good work
I like it!

old

minos
User Off Offline

Thanks it's good

old

The_Admiral
User Off Offline

I can, break deez cuffs!
I like it!

old

memredi
User Off Offline

looks cool
I like it!
To the start Previous 1 Next To the start