AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Blocking targeting function for certain ppl (https://forums.alliedmods.net/showthread.php?t=254902)

klashfire 01-07-2015 21:56

Blocking targeting function for certain ppl
 
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.

fysiks 01-07-2015 21:57

Re: Blocking targeting function for certain ppl
 
What is a "targeting function"?

klashfire 01-07-2015 22:07

Re: Blocking targeting function for certain ppl
 
Quote:

Originally Posted by fysiks (Post 2246274)
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.

fysiks 01-07-2015 22:37

Re: Blocking targeting function for certain ppl
 
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.

Mitchell 01-08-2015 01:30

Re: Blocking targeting function for certain ppl
 
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.

ddhoward 01-08-2015 01:55

Re: Blocking targeting function for certain ppl
 
Quote:

Originally Posted by fysiks (Post 2246280)
you need to attach the .sma for that plugin.

Sourcemod does not use SMA files. :3


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.

Mitchell 01-08-2015 12:21

Re: Blocking targeting function for certain ppl
 
Quote:

Originally Posted by ddhoward (Post 2246308)
Sourcemod does not use SMA files. :3


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.

ddhoward 01-08-2015 16:34

Re: Blocking targeting function for certain ppl
 
Quote:

Originally Posted by Mitchell (Post 2246496)
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

klashfire 01-09-2015 12:43

Re: Blocking targeting function for certain ppl
 
Quote:

Originally Posted by ddhoward (Post 2246568)
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 01-09-2015 12:45

Re: Blocking targeting function for certain ppl
 
Quote:

Originally Posted by ddhoward (Post 2246568)
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.


All times are GMT -4. The time now is 01:00.

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