Ulysses
General => Developers Corner => Topic started by: billy90210 on September 17, 2019, 04:33:08 PM
-
Hello, I'm looking to make a command that would automatically add a user to my vip group when they execute !vip . I understand people don't do things here for you. But, I'm not sure how to get started. Any help is appreciated.
-
I'm pretty sure that at least 2 or 3 conversations of these 2 pages of search results (https://forums.ulyssesmod.net/index.php?action=search2;params=eJwtzMsKgCAQheFXiTZtC3of0XHIwhwZLxH48I3h7j_f4mhbdQC0bWlrm5vhXtsumRw9CuiOHjMKdirmQsiKgn-HEGcpRo__zyBlTxa2mKALagYnu55xOphK_AC2JS6X) may help get you started
-
http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.addUser
reverse engineer any of our commands to find out how to make a chat command for !vip then the above is info on how to add a user to a group with code.
ULib.ucl.addUser( id, allows, denies, group, from_CAMI )
for example: ULib.ucl.addUser( pl:SteamID(), _, _, "VIP", false)
of course this example assumes your player object is pl and your group is "VIP" you'd have to adjust accordingly.
-
This is what I had came up with from looking at the conversations Jamminr told me
local CATEGORY_NAME = "SS Commands"
function ulx.vip()
RunConsoleCommand("ulx", "adduser", target_ply:Nick(), premium)
end
local vip = ulx.command (SS Commands, "ulx vip", ulx.vip, "!vip", true )
Will this work?