Description
Here is my TK Protect scriptpack for DoD Source
Unlike the mani built in version this allows admins to be immune from tk revenge.
[b]Other Features[/b]
[list]
Can protect on Team Attacks/Wounds as well as TK's
You can choose to slap or blind if TW protection is On
Configurable slap damages and blind amounts/times for TW's
You can set how many TW's counts as a TK
You can choose to reduce TK's after so many valid enemy kills
You can choose to reduce TW's after so many valid enemy kills
Player menus can be restricted to show less options for players with few tk's (see below)
Auto Manage function where the script decides the punishment based on the players TK amount.
You can choose to kick or ban once your set amount of TK's has been breached.
Players can say !tk to see their current TK amount
You can choose whether the whole server sees this or just them
Messages relating to the revenge option chosen can also be just shown to the player involved rather than whole server.
A players TK amount can be saved so they get previous violations taken into account when re-joining your server.
[/list]
This is an extract from the server.cfg showing the user configurable cvars
[quote="server.cfg"]
es_setinfo SAS_TkProtect 2 //[b] 0 - Off, 1 - Protect on Kill, 2 Protect on Kill and Wound[/b]
es_setinfo tw_punish 2 // [b]1 - Slap on TW, 2 - Blind on TW[/b]
es_setinfo slap_dmg 0 // [b]Amount of damage to give for a team wound if tw_punish is set to 1[/b]
es_setinfo blind_level 240 // [b]Level to blind TW player to if tw_punish is set to 2[/b]
es_setinfo blind_time 3 // [b]Time in secs to blind TW player for if tw_punish is set to 2[/b]
es_setinfo slap_to 20 // [b]Amount to slap by if slap is chosen on tk menu[/b]
es_setinfo slap_tks 3 // [b]Amount of tk's before slap damage x2 becomes an option[/b]
es_setinfo slay_tks 5 // [b]Amount of tk's before slay becomes an option[/b]
es_setinfo max_tks 7 // [b]Amount of tk's before a kick/ban[/b]
es_setinfo tk_punish 0 // [b]0 - Kick, 1 - Ban (time set by tk_bantime)[/b]
es_setinfo tk_bantime 5 // [b]Time to ban for in minutes if tk_punish is set to 1 (0 = permanent ban)[/b]
es_xsetinfo tk_say 0 // [b]Players can say !tk to see their current count 0 - show just to player, 1 - show to server[/b]
es_xsetinfo tk_reduce 10 // [b]Players tk count will be reduced by 1 after this many enemy kills[/b]
es_xsetinfo tw_reduce 8 //[b] Players tw count will be reset after this many enemy kills[/b]
es_xsetinfo max_tws 10 // [b]This many team wounds/attacks counts as a TK[/b]
es_setinfo tk_auto 0 //[b] Turns on Auto Manage of TK's[/b]
es_setinfo slap_auto 2 // [b]After this many TK's player will be slapped to slap_to damage if tk_auto is 1[/b]
es_setinfo slap2_auto 4 // [b]After this many TK's player will be slapped to slap_to damage x 2 if tk_auto is 1[/b]
es_setinfo slay_auto 5 // [b]After this many TK's player will be slayed if tk_auto is 1[/b]
es_setinfo tk_save 0 // [b]1 - Save players tk's to database 0 - Reset tk amount on map change[/b]
es_setinfo pubmsg 1 // [b]0 - Show messages to player only, 1 - Show to all[/b]
es_keygroupdelete admin_ids // [b]You can comment out this line if you use SAS_ReserveSlots[/b]
es_keygroupload admin_ids // [b]You can comment out this line if you use SAS_ReserveSlots[/b]
[/quote]
If you choose to let the killed player decide the punishment (tk_auto 0) then when they are TK'd they will see a menu listing their options, using the settings above, if the player that TK'd them has less than 3 TK's the options will only be [i] Forgive [/i] and [i] Slap by 20[/i], if they have more than 3 but less than 5 then the killed player will now have the option to slap them for 40 Health as well (double what ever you set for "slap_to". If the killer has between 5 and 7, slay now becomes an option and after 7 the script takes over and kicks or bans them (in this example, kicked)
To install and use the admin immunity function properly, you need to create an admins list in the following format:
[code]
"admin_ids"
{
"STEAM_0:0:123456"
{
"Admin" "1"
}
"STEAM_0:0:654321"
{
"Admin" "1"
}
}
[/code]
save this in your events folder (not the scriptpack folder) as es_admin_ids_db.txt
[b] NOTE - If you use my reserve slots scriptpack you will already have this and can skip this step[/b]
Then copy the whole SAS_TkProtect folder to your events folder.
Now edit your autoexec.cfg and add the line
[quote="autoexec.cfg"]
eventscripts_register SAS_TkProtect
[/quote]
...then restart server
[i]Note: You need to disable any tk options you had set in your mani_server.cfg[/i]
Big thanks to Dunno and the regulars of [SAS] Clan Public Server 3 and 4 for helping in the beta testing