Raised This Month: $51 Target: $400
 12% 

Blocking targeting function for certain ppl


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
klashfire
Member
Join Date: May 2014
Location: NY, USA
Old 01-07-2015 , 21:56   Blocking targeting function for certain ppl
Reply With Quote #1

is it possible to block, say, ppl with a certain flag from targeting people other than themselves? (can only use @me, but not @blu, [playername], etc.)

my theory:
1.using overrides, block the use of !aia or whatever it is.

2.using the webshortcuts plugin, make a pointer to it, making the command !dj187y29enx82u1 or some random mumble or letters and numbers.

3.Make a menu for that flag, using those mumbled, weird commands.

that is just a theory and I don't want to go through the trouble of doing that if there is an easier way or it just won't work.
__________________

klashfire is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-07-2015 , 21:57   Re: Blocking targeting function for certain ppl
Reply With Quote #2

What is a "targeting function"?
__________________
fysiks is offline
klashfire
Member
Join Date: May 2014
Location: NY, USA
Old 01-07-2015 , 22:07   Re: Blocking targeting function for certain ppl
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
What is a "targeting function"?
I explained what I meant, but let me say it clearer:

I want to block certain people from toggling commands on others. i.e. I want to allow a donor to use
Code:
!aia
, giving him infinite ammo, but not to allow him to type
Code:
!aia @blue 1
as in not to allow the donor from giving others commands that he can use.
__________________

klashfire is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-07-2015 , 22:37   Re: Blocking targeting function for certain ppl
Reply With Quote #4

You need to edit the plugin that gives you those functions. Post a request in the Suggestions/Requests forum and provide a link to the plugin. If a link is not available, you need to attach the .sma for that plugin.
__________________
fysiks is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-08-2015 , 01:30   Re: Blocking targeting function for certain ppl
Reply With Quote #5

This should be in sourcemod section, perhaps under requests..
ProcessTargetFilter should be changed to accept in immunity levels.
If it already does this then you should assign immunity levels to your admins and users.
Mitchell is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-08-2015 , 01:55   Re: Blocking targeting function for certain ppl
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
you need to attach the .sma for that plugin.
Sourcemod does not use SMA files.


It is not easy for a Sourcemod Multi-target filter to be restricted in such a manner. You would either have to:
  • Modify and recompile Sourcemod itself.

  • Modify the plugin that creates the multi-target filter. If you are dealing with a stock filter, you will need to modify and recompile Sourcemod itself.

  • Modify the plugin that creates the command, and have it check the arguments and command user for appropriate permissions as per your specifications.

  • My favorite, create a new plugin that monitors command usage through AddCommandListener, checks to see if a targeting filter is being used, then checks if the user has permission to use that filter. If he does, return Plugin_Continue. If not, return Plugin_Stop. The new plugin should be able to either listen to specific commands, and/or scan ALL commands for filters used. A config file should be used to specify what filters need what flags, and whether or not a filter is restricted only with a particular command, or with all commands. Such a plugin has been on my "list of plugins to eventually work on and/or create" for a few months now.
__________________

Last edited by ddhoward; 01-08-2015 at 02:11.
ddhoward is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-08-2015 , 12:21   Re: Blocking targeting function for certain ppl
Reply With Quote #7

Quote:
Originally Posted by ddhoward View Post
Sourcemod does not use SMA files.


It is not easy for a Sourcemod Multi-target filter to be restricted in such a manner. You would either have to:
  • Modify and recompile Sourcemod itself.

  • Modify the plugin that creates the multi-target filter. If you are dealing with a stock filter, you will need to modify and recompile Sourcemod itself.

  • Modify the plugin that creates the command, and have it check the arguments and command user for appropriate permissions as per your specifications.

  • My favorite, create a new plugin that monitors command usage through AddCommandListener, checks to see if a targeting filter is being used, then checks if the user has permission to use that filter. If he does, return Plugin_Continue. If not, return Plugin_Stop. The new plugin should be able to either listen to specific commands, and/or scan ALL commands for filters used. A config file should be used to specify what filters need what flags, and whether or not a filter is restricted only with a particular command, or with all commands. Such a plugin has been on my "list of plugins to eventually work on and/or create" for a few months now.
Another way is to use one of the plugins that already exist the alias commands or what ever, and make !ia to !aia, which wouldnt copy over the argument. Cheap way but just a suggestion.
Mitchell is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-08-2015 , 16:34   Re: Blocking targeting function for certain ppl
Reply With Quote #8

Quote:
Originally Posted by Mitchell View Post
Another way is to use one of the plugins that already exist the alias commands or what ever, and make !ia to !aia, which wouldnt copy over the argument. Cheap way but just a suggestion.
Assuming that the plugin doesn't provide any natives, the new command would have to run the old command through ServerCommand, which is about what this plugin does:

https://forums.alliedmods.net/showthread.php?t=232149
__________________
ddhoward is offline
klashfire
Member
Join Date: May 2014
Location: NY, USA
Old 01-09-2015 , 12:43   Re: Blocking targeting function for certain ppl
Reply With Quote #9

Quote:
Originally Posted by ddhoward View Post
Assuming that the plugin doesn't provide any natives, the new command would have to run the old command through ServerCommand, which is about what this plugin does:

https://forums.alliedmods.net/showthread.php?t=232149
I am still a tad confused:

would my method work?
can I use the plugin from https://forums.alliedmods.net/showthread.php?t=232149 and then make typing "!ooh" or whatever, be the same as typing "!aia @me 1" while still blocking the command !aia for players with a certain flag?

wouldn't the command !ooh redirect the command to !aia @me 1, thus blocking its use?
__________________

klashfire is offline
klashfire
Member
Join Date: May 2014
Location: NY, USA
Old 01-09-2015 , 12:45   Re: Blocking targeting function for certain ppl
Reply With Quote #10

Quote:
Originally Posted by ddhoward View Post
Assuming that the plugin doesn't provide any natives, the new command would have to run the old command through ServerCommand, which is about what this plugin does:

https://forums.alliedmods.net/showthread.php?t=232149
oh! nvm, just noticed that the plugin was under work with the request
"Is there a way to make it work with group filters? Like "@reds" or "@me"? This could be useful for me because I want to use this plugin for donators."

so it might be able to do what I want later on......I think, still a bit confused.
__________________

klashfire is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode