Ulysses
General => Developers Corner => Topic started by: MiniCale on March 30, 2016, 01:32:56 PM
-
Hi Guys hopefully you can help me...
I am trying to make a 'warn' command that will !slaynr and !adduser to group Warning 1 so that my staff can easily punish and keep track of rule breakers on my server I was going to just try and mash the UserAdd command and Slaynr command together but I cant even get a user to go into a specific group before adding the slay part.
Any advice would be great.
This is all I have so far
(Gamemode is TTT)
---------------------
function ulx.warn( calling_ply, target_ply, group_name )
local userInfo = ULib.ucl.authed[ target_ply:UniqueID() ]
local id = ULib.ucl.getUserRegisteredID( target_ply )
if not id then id = target_ply:SteamID() end
ULib.ucl.addUser( id, userInfo.allow, userInfo.deny, Warning 1 )
ulx.fancyLogAdmin( calling_ply, "Warning 1 #T", target_ply, group_name )
end
local warn = ulx.command( CATEGORY_NAME, "ulx warn", ulx.warn )
warn:addParam{ type=ULib.cmds.PlayerArg }
adduser:defaultAccess( ULib.ACCESS_SUPERADMIN )
warn:help( "Slays the player next round and marks them as warned." )
--------------------
-
Unless you're not using groups for anything else, I highly recommend you don't make this command. Not only would it be easily abusable (insta-demote any staff member), but it would mess up any other permissions you have. What if you want to warn a VIP, or a Staff member?
If you want a way to easily distinguish between players who have been warned and players that have not been warned then I suggest you make your own system. For example have a file that you write the SteamIDs of warned players to, and then have a menu read from that file and display them.
-
The idea in this is so that we can keep track of people that are breaking rules easily and punish them all in one command.
I just want a command so that I can add a person to a specific group and slaynr them with the use of one command.
So that if someone has been warned we have a record of this so if they are on the server again rule breaking we have a record of this and can punish them accordingly.
I have several staff on my servers and at the moment I am having them post in a forum of who they have banned so we have a log of temp banned users and this takes a lot of time and drags them out of the game and its not very easy to check if people have been banned before.
After making a warn 1 and warn 2 command I want to use the same idea for a temp ban command where it adds them to a temp ban group.
-
It doesn't slay, but check out my warning addon. It's pretty neat and it's free.
http://forums.ulyssesmod.net/index.php?topic=7125.0
-
Oh, I just assumed he was using AWarn and wanted something different :P
Yeah, if all you need is a way to keep track of warned users than AWarn is probably the best solution out there.
-
That looks good enough for now, Thanks guys I will give this a shot when I next update the server.