Raised This Month: $51 Target: $400
 12% 

JailMod++


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   twistedeuphoria (82)
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 08-16-2005 , 08:04   JailMod++
Reply With Quote #1

I've grabbed the Idea of MyStIcSsJgOkU4 @ http://forums.alliedmods.net/showthread.php?t=16031 and wrote my own version of this script (from scratch) which has a bit more functionality than the original one.

There's the following CVars:
Code:
amx_jail_time
This is the default time ppl are sent to jail if none is given.
amx_jail_allow
Guess what..? :P this cvar is set automatically to 1|0 according to whether a jail was found for this map or not but can be changed of course.
amx_jail_returnweapons
Sets if ppl who are released from jail are returned their weapons.
amx_jail_godmode
this defines if the inmates are provided with godmode to not be able to get killed by other inmates / ppl who can shoot from the outside into the jail (like, on cs_militia).
Then there's a couple of commands:
Code:
amx_jail <name> [<-1|0|time>] [<jail #>]
Puts ppl into jail. If time is not specified or -1, the default value from the cvar is used. if time equals 0, the victim will be put into jail until round end.

amx_unjail <name> - use to get ppl out of jail
amx_readjail - use to read the coordinates file once again
amx_viewjail [jail #] - use to see who is in that jail / in all jails
amx_listjail - use to get a list of all jail coordinates
amx_jailmenu - use to get a menu with further options allowing you to config the whole script and save the config.
In the menu, you can delete jail coordinates, add new ones, and toggle noclip mode to reach the positions you want as jail &quot;spawnpoints&quot;.
In the Menu, you will be shown all the coordinates that have yet been set. Pressing the corresponding key deletes a set of coordinates, pressing key 6 will add the ones you are currently located at. Pressing 7 toggles noclip. Key 8 is for reading the config once again (which makes all your changes null and void), 9 writes the current data to the config file (saving your settings 4ever) and key 0 closes the menu, disabling noclip if enabled.

The default admin level is ADMIN_SLAY but can be changed by changing a #define in the sma. This one adminlevel is used for ALL commands.

This script is only tested on CS but should work on other mods as well.

Requirements:
- Amxx (how come )
- fun module for godmode & noclip

THX to:
MyStIcSsJgOkU4 for the basic idea
f117bomb & T(+)rget for amx_atac 5.2.3 from where I leadned how to strip weapons

Parts of the Idea, Coding & Testing by MistaGee

Enjoy!
Greetz MGee
Attached Files
File Type: txt jailmod.txt (2.7 KB, 4848 views)
File Type: txt jailmod_jails.txt (283 Bytes, 4250 views)
File Type: sma Get Plugin or Get Source (jailmod.sma - 8882 views - 21.6 KB)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble

Last edited by MistaGee; 11-15-2007 at 10:37.
MistaGee is offline
Send a message via ICQ to MistaGee
Blitz
Senior Member
Join Date: Jul 2005
Location: Google
Old 08-16-2005 , 13:14  
Reply With Quote #2

Nice, this one is well written.
Good job.
__________________
[img]http://img268.**************/img268/7071/blitz4ek.jpg[/img]

In the beginning, God created the search button.
Blitz is offline
Oulalabobo
Junior Member
Join Date: Aug 2005
Old 08-16-2005 , 15:16  
Reply With Quote #3

Don't seem works for dod or i forgot something :/

Quote:
AMXX] Failed to open dictionary file: dod/addons/amxmodx/data/lang/jailmod.txt
[AMXX] Invalid event (name "SendAudio") (plugin "jailmod.amxx")
[AMXX] Run time error 10 (native)
[AMXX] Debug is not enabled (plugin "dod/addons/amxmodx/plugins/jailmod.amxx")
Oulalabobo is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 08-17-2005 , 07:22  
Reply With Quote #4

Quote:
Originally Posted by Oulalabobo
AMXX] Failed to open dictionary file: dod/addons/amxmodx/data/lang/jailmod.txt
This means the needed dictionary file was not found. Did you DL it and put it into the right directory?

Quote:
Originally Posted by Oulalabobo
[AMXX] Invalid event (name "SendAudio") (plugin "jailmod.amxx")
This is a problem...
I used this event to determine round end, as cstrike seends the sounds "(Counter) Terrorists win". How is that round end notified in dod? If anyone knows that, change the sma to recognize round end correctly and everything should work then, I'd do it if I knew how


Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 08-17-2005 , 08:53  
Reply With Quote #5

Damn dude nice job, I wish I could say i did this lol
Do you think you could also tell me how I would add the functionality for checking what map it is, and then reading from the file for the correct coordinates like yours does. It would be great if I could add this into mine for my server :-D
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 08-17-2005 , 10:54  
Reply With Quote #6

Quote:
Originally Posted by mysticssjgoku4
Damn dude nice job, I wish I could say i did this
thx man

Quote:
Originally Posted by mysticssjgoku4
Do you think you could also tell me how I would add the functionality for checking what map it is, and then reading from the file for the correct coordinates like yours does. It would be great if I could add this into mine for my server
well, you could simply use mine...

if you have a closer look at the functions readjail() and writejail(), you'll see how I did that... just read the config file line by line, search for a map name and if you found the right one, parse the coordinates which are located in the following lines.

you basically have to keep all the functions dynamic so the jail the users are sent to can vary, that's it. you hardcoded the origins in your script and used different functions for the jails, that is what I avoided.


Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-29-2005 , 03:01  
Reply With Quote #7

How is this plugin diffrent from all the other jailmod plugins?
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 09-02-2005 , 10:39  
Reply With Quote #8

Quote:
Originally Posted by EKS
How is this plugin diffrent from all the other jailmod plugins?
sry but I don't know since I yet didn't know there are any :p

I think the one plus of mine is the config file for the origins...


Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
darkcloud9sgl
Member
Join Date: Dec 2004
Old 09-04-2005 , 10:43  
Reply With Quote #9

well written and fun to do to people sometimes
darkcloud9sgl is offline
The Free Man00
Junior Member
Join Date: Nov 2005
Old 01-07-2007 , 14:54   Re: JailMod++
Reply With Quote #10

Three things, One in TS when you hit any button on the menu it will just exit out Two also in ts it doesnt detect any jails and I forgot three ...
__________________
It takes an idiot to do cool things thats why its cool.
The Free Man00 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode