AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bypass ADMIN_IMMUNITY ? (https://forums.alliedmods.net/showthread.php?t=10981)

dcyuri7 03-06-2005 13:09

Bypass ADMIN_IMMUNITY ?
 
I want my plugin to be able to execute commands on admins with immunity as well as regular players. Basically, I wrote a plugin that sets a specified players rendering, to the specified #Value. The problem is all the admins with immunity, such as myself, are not allowed to execute it on themselves, unless immunity is removed. Of course I wouldnt want to do that...

Now, I have looked through the include files and found that the only thing I could really do is to set the admins flags to exclude immunity, and then reset them before HANDLE[ED]-ing the plugin, therefore allowing the command executability on the immunified admin. I have three questions regarding this statement.

1.) If this is performed, will it take effect immediately, or is it upon round start that the flags are re-checked?
2.) Is there a way to reload the flags? (I know theres a command to reload the admins, and I'm guessing that includes their flags as well. Please confirm this.)
3.) Is there not a command or something of that sort included in AMX Mod X, that would take care of this alittle more quickly, easily, and proficiently?

Thanks in advance,
Barry

v3x 03-06-2005 13:10

You mean this?
http://amxmodx.org/funcwiki.php?go=func&id=596

dcyuri7 03-06-2005 13:14

ahhh, very nice indeed. Now, according to that, it would go something like this:

cmd_target(id,player,1)

But would that not "Obey Immunity" ?
Maybe the 1 should be a 0? (0 is not on the list of flags for the function.)

XunTric 03-06-2005 13:16

The 1 should be a 2.

dcyuri7 03-06-2005 13:17

I appreciate your quick & helpful responses. Thanks again,
yuri

v3x 03-06-2005 13:18

If you WANT to obey the immunity AND allow yourself..
Code:
cmd_target(id, player, 1 + 2)


All times are GMT -4. The time now is 14:13.

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