Thread: JailMod++
View Single Post
Author Message
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 02-07-2008 , 17:48   JailMod++
Reply With Quote #1

This is a Source port of my AMXX plugin JailMod++. It allows to put people in a jail on the map by stripping all weapons from them and teleporting them to a set of previously stored coordinates.

For each map, there can be up to five jails. The jail coordinates are configured using an admin menu, allowing to add or edit jails quite easily.


Commands:
  • jail <player>
    Puts a player in jail.
  • unjail <player>
    Sets a player free.
  • jail_reload
    Reloads the jail database (neccessary if you changed jails via the admin menu.)
CVars:
  • jail_strip <0|1>
    If 0, Weapons are not stripped from players when they are put in jail (that way, you can re-use jails in surf maps, for example)
  • jail_fill <0|1>
    Changes the way jails are chosen, when a player is to be jailed.
    If 0, a random jail is picked.
    If 1, the first jail which has room left will be used.
  • jail_tkpunish <0|1>
    If 1, team killers will be jailed automatically.
Requirements:
This plugin uses a database to store the jail coordinates in, so you need to have a named database config "jailmod" or "default" for this to work. The table will be created automatically.

Attached, you will find a MySQL and SQLite database containing sample Jail coordinates for CS:Source.


I'm currently testing on various mods. It was developed with CS:Source, but there isn't any mod-specific code in there as far as I can tell, so it should work on any mod.

Changes:
1.1: Bugfix - forgot to call GetClientOfUserId in events, that's why console got spammed with "Array index out of bounds" and TK punish didn't work...



Have fun,
Gee
Attached Files
File Type: sp Get Plugin or Get Source (jailmod.sp - 3322 views - 18.0 KB)
File Type: zip jailmod.sq3.zip (1.1 KB, 1538 views)
File Type: zip jailmod_my.sql.zip (840 Bytes, 1236 views)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble

Last edited by MistaGee; 02-15-2008 at 12:31.
MistaGee is offline
Send a message via ICQ to MistaGee