English Handcuffs - For Jail icon

16 comments
09.08.18 10:06:06 pm
like 5 like it!
3 kb, 621 Downloads
Talented Doge
User
Offline Off
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. (9). 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.
image
edited 16×, last 17.08.18 07:12:07 pm
ok This file has been reviewed and approved by GeoB99 (15.09.18 09:43:36 pm)

Comments

16 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
17.08.18 07:00:33 pm
Up
Talented Doge
User
Offline Off
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
17.08.18 06:42:47 pm
Up
Cure Pikachu
User
Offline Off
I looked at it and you know what? I fixed it.
17.08.18 05:49:27 pm
Up
saddy gamer
User
Offline Off
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
12.08.18 11:59:41 am
Up
Talented Doge
User
Offline Off
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.
12.08.18 11:10:11 am
Up
Marco X
User
Offline Off
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.
11.08.18 07:53:37 am
Up
Talented Doge
User
Offline Off
@user zAzz:
Try the updated version.

As for bug one, I tried to make everyone being cuffed switch to knife every second...
10.08.18 10:10:39 pm
like I like it!
Up
zAzz
User
Offline Off
@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?
edited 1×, last 10.08.18 10:25:40 pm
10.08.18 08:27:45 am
Up
Talented Doge
User
Offline Off
I've fixed the discovered bug. Thanks for reporting.

@user 2Gen: There are now. They have a handcuff script.
10.08.18 08:25:02 am
like I like it!
Up
2Gen
User
Offline Off
Funny script. I have not played on Jail servers for years. Previously, there was no special scripts.

@user Talented Doge:
CT leaving:
Code:
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
Code:
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
10.08.18 08:05:02 am
Up
Rainoth
Moderator
Offline Off
@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.
10.08.18 07:06:51 am
Up
Talented Doge
User
Offline Off
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?
10.08.18 03:09:41 am
like I like it!
Up
zAzz
User
Offline Off
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:
Code:
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
Code:
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
edited 5×, last 10.08.18 03:53:00 am
10.08.18 02:45:15 am
like I like it!
Up
KingShadow
User
Offline Off
Good work
10.08.18 02:20:08 am
Up
minos
User
Offline Off
Thanks it's good
09.08.18 10:38:28 pm
like I like it!
Up
The_Admiral
User
Offline Off
I can, break deez cuffs!
09.08.18 10:32:50 pm
like I like it!
Up
memredi
User
Offline Off
looks cool
To the start Previous 1 Next To the start