Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Avoid on March 22, 2014, 06:09:21 PM

Title: restrict amount of targeted users
Post by: Avoid on March 22, 2014, 06:09:21 PM
Hello there,

I'd like to know if it is possible to restrict the slap command for instance, so only one user can be targeted at a time?
 I want it so moderators cannot use "!slap *".

Thanks in advance,
Avoid
Title: Re: restrict amount of targeted users
Post by: Stickly Man! on March 24, 2014, 11:23:34 AM
Unfortunately I don't believe this can be done with stock ULX. There are three things you could try:

 - Modify the ulx slap command to only allow one target player, but that would affect admins and superadmins as well.
 - Make a duplicate of the ulx slap command with a slightly different name, then modify that to only allow one target. Give your moderators access to the duplicate command instead of the regular ulx slap.
 - Modify the ulx slap command to make it only slap one target from the input if the calling player is in a specific group. This one will do what you want without a separate command, but the groups will have to be hard-coded in the script, and it's a little more involved.
Title: Re: restrict amount of targeted users
Post by: ojbristow on March 24, 2014, 12:23:41 PM
Would you not just change the can target for that one command for moderators? So in the box when you click the command in XGUI have the can target !%rankname - then for the next rank up you would remove the restriction?

Owen
Title: Re: restrict amount of targeted users
Post by: Bytewave on March 24, 2014, 03:13:59 PM
Would you not just change the can target for that one command for moderators? So in the box when you click the command in XGUI have the can target !%rankname - then for the next rank up you would remove the restriction?

Owen
What he means is he wants to be able to set a number of users that can be targeted at one time, regardless of can_target. So, if !slap * was performed, there would be an error message if > x players were online, x being the restriction on allowed targets per command.
In metaphor form, he wants to be able to give his usergroups a gun, but only give them a certain amount of bullets per magazine (sorry if not G).
Title: Re: restrict amount of targeted users
Post by: ojbristow on March 24, 2014, 04:25:05 PM
Ah, well, I should probably stop trying to help people :P

My only suggestion then would be to only give them commands to people you trust.

Owen
Title: Re: restrict amount of targeted users
Post by: JamminR on March 24, 2014, 07:46:17 PM
would be to only give them commands to people you trust.

We've been preaching to the choir about this for years.
Unfortunately, it seems the congregation wants everyone to be superadmins or similar.  :/
Title: Re: restrict amount of targeted users
Post by: Avoid on March 25, 2014, 09:45:51 AM
Hello,
Thanks for all those answers!

I do trust my moderators, as I do not give out permissions to people who I do not trust.
I just wanted to know if this is possible or not!
So I guess I will try to edit the command itself.

Thanks a bunch,
Avoid