Ulysses Stuff > Releases

Murder ULX commands

(1/4) > >>

Boxama:
I made a few ULX commands for use specifically with the Murder gamemode.
It includes several that I thought useful for my community's server:


* !slaynr target [rounds] - Sets the target to be slain at the beginning of the next round. Prevents them from becoming the Murderer if they have any slays, meaning that rounds will not be cut short. Rounds do not stack, you must specify the amount you want if you wish to add more - default is a single round. If the player leaves with active autoslays it will automatically ban them (if you allow the setting). You can apply cumulative bans, which decides whether or not the players ban time should be multiplied by the number of autoslays they are attempting to evade. You can also specify exactly how many minutes the ban should last for, other settings can be changed in the file.
* !unslaynr target - Removes all autoslays against the target.
* !givemagnum target - Gives the target the magnum (cannot be given to the Murderer).
* !respawn target - Pretty obvious; respawns the target. I've disabled respawning spectators for now to prevent gamemode errors.
* !mapnr map - Sets the map to be changed to the map you specify at the beginning of the next round. Does not trigger autoslays at the beginning of the round. Warns players about the map change both when the command is run and at the end of the round.
* !unmapnr - Removes the current map change, if there is one.
* !forcemurderer target - The equivalent to setting someone as the Murderer in the scoreboard, but in command form so you can allow admins to use it without them being a server admin.The commands should appear under the section named "Murder" in the xgui by default. You can change the name of the category in the config inside the file.

You can download the addon at my GitHub repository or from the attached zip file.
Installation is as simple as any other addon - drag and drop into the addons folder.

I hope some of you find this useful.

pants:
woah, dude, is there anyway I could get the slaynr that bans on leave working with TTT? that would be awesome.

Cobalt:

--- Quote from: pants on February 23, 2014, 12:10:18 PM ---woah, dude, is there anyway I could get the slaynr that bans on leave working with TTT? that would be awesome.

--- End quote ---
hook.Add( "PlayerDisconnected", "BanOnLeave", function( ply )
if ply:GetPData( "whatever the value is" ) then
--ban
end
end )

Boxama:

--- Quote from: pants on February 23, 2014, 12:10:18 PM ---woah, dude, is there anyway I could get the slaynr that bans on leave working with TTT? that would be awesome.

--- End quote ---

--- Code: --- if SERVER then
local banmins = 200
local culumativeban = true

hook.Add( "PlayerDisconnected", "BanThemSlayEvaders", function( ply )

local slays = tonumber( ply:GetPData( "slaynr_slays" ) ) or 0

if slays > 0 then
local reason, mins = "Attempting to evade "..slays.." autoslays.", ( culumativeban and slays*banmins or banmins )
ULib.kickban( ply, mins, reason )
ulx.fancyLogAdmin( nil, false, "Automatically banned #T for #i minutes (#s) ", ply, mins, reason )
end

end )
end

--- End code ---
Drop this at the bottom of addons/Trouble In Terrorist Town ULX Commands/lua/ulx/modules/sh/ttt_admin.lua
Assuming you're using Bender180's ULX TTT commands.

pants:
Sweet thanks, that worked almost perfect! console just randomly spurts out this error
[ERROR] addons/ulx/lua/ulx/modules/sh/ttt_admin.lua:14: '=' expected near 'local'
  1. unknown - addons/ulx/lua/ulx/modules/sh/ttt_admin.lua:0


Line 14&15
local CATEGORY_NAME  = "TTT Admin"
local gamemode_error = "The current gamemode is not trouble in terrorest town"

any ideas on why it'd do that?

Navigation

[0] Message Index

[#] Next page

Go to full version