Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: jnewcombe on March 08, 2008, 01:26:07 PM

Title: banning tools for certain userclasses
Post by: jnewcombe on March 08, 2008, 01:26:07 PM
Hi


im after banning and adding tools for certain userclasses is it possible

im after adding a new class that can use advance dup but normal users cannot

can you explain how i do this please

Jon
Title: Re: banning tools for certain userclasses
Post by: Chironex on March 08, 2008, 02:39:03 PM
toolallow, tooldeny, tooluserallow, tooluserdeny
Title: Re: banning tools for certain userclasses
Post by: jnewcombe on March 08, 2008, 04:31:32 PM
thanks will try editing groups.txt to include theese commands
Title: Re: banning tools for certain userclasses
Post by: MrPresident on March 08, 2008, 07:44:46 PM
currently there is no permanent way to allow or deny tools by group.

You CAN do it with ULX though.. but it requires modifying the tool's init.lua file with

Code: [Select]
if !ply:query("toolname") then
ULib.tsay(ply, "You are not allowed to use this tool", true)
return false
end

ply could be anything that the tool uses for the player entity.. usually ply, pl, or p

you would need to put this under the left click and the right click functions.

also.. then you'd need to add "toolname" to the group's allows in groups.txt
Title: Re: banning tools for certain userclasses
Post by: JamminR on March 08, 2008, 07:52:44 PM
Jon, Can't use groups.txt to store those. Groups.txt would only deny or allow use of those commands, not actually tools with them.
You would need to use them in your server.ini (or any other cfg/maps/mapname.ini if you wanted only certain maps to deny/allow tools)

We currently don't have a group tool deny. We do have plans for it though due to recent demand.
http://ulyssesmod.net/bugs/view.php?id=159
Title: Re: banning tools for certain userclasses
Post by: jnewcombe on March 14, 2008, 10:42:39 AM
thanks for the helpful info again , looking forward to when you add this in the next version so i can put my advanced duplicator back on my server , we have too many noobs spamming stuff off it , so we want to set its use only to a trusted user class


thanks

Jon
Title: Re: banning tools for certain userclasses
Post by: MrPresident on March 14, 2008, 12:18:42 PM
What is the name of the groups you want to be allowed to use it? I will write the code you need to modify your advanced dupe and tell you where to change it. I just need the names of the groups ALLOWED to use it. (Ex. superadmin, admin, operator, member, etc)
Title: Re: banning tools for certain userclasses
Post by: JamminR on March 14, 2008, 05:09:00 PM
Zakap, I don't (and never if possible)recommend changing actual tool code, if that is what you had in mind for him.

I'm pretty sure Adv Dupe has a common 'toolmode' name (but don't know off hand what it is)
Look into gamemode.CanTool (http://garrysmod.com/wiki/?title=Gamemode.CanTool)

Shouldn't be too difficult to write up a small plugin for Ulib.
Title: Re: banning tools for certain userclasses
Post by: MrPresident on March 14, 2008, 07:31:41 PM
hmm.. I'll have to look into the cantool hook, because I have quite a few tools that I have modified on my server that query users for 'flags' and I have to redo the code every time I update them ;)

This will make my life easier too >.<
Title: Re: banning tools for certain userclasses
Post by: JamminR on March 14, 2008, 08:08:13 PM
Heh. Yeah, I was thinking that you'd mentioned that when I was posting the response.
At time we discussed your modifications, I'd forgotten about that hook.

Lua is our friend.
Always easier to add chrome rims when possible to make a wheel shiny than it is to re-invent it, every time.
Title: Re: banning tools for certain userclasses
Post by: MrPresident on March 15, 2008, 02:24:21 AM
lol at your metaphor Jam... but. I get the point =) I looked into it, pretty easy and a heck of a LOT cleaner than my current way.
Title: Re: banning tools for certain userclasses
Post by: Chironex on March 15, 2008, 08:21:38 AM
Jam Jam
Here Comes The Man
Hot ****

(**** in't allowed word :/)

(sorry for spam)

Edit by Megiddo: There's a reason for that. Don't swear here please.