AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved] How To block all admins commands if player have ADMIN_LEVEL_E (https://forums.alliedmods.net/showthread.php?t=195445)

omer 09-07-2012 17:01

[Solved] How To block all admins commands if player have ADMIN_LEVEL_E
 
How can I block all admins commands if player have ADMIN_LEVEL_E ???

pokemonmaster 09-07-2012 17:17

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
Quote:

Originally Posted by omer (Post 1793766)
How can I block all admins commands if player have ADMIN_LEVEL_E ???

Not sure of this:
Code:
public client_command(id) {       static iFlags = get_user_flags(id)         if( iFlags & ADMIN_LEVEL_E )         return PLUGIN_HANDLED         return PLUGIN_CONTINUE }

fysiks 09-07-2012 18:29

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
Quote:

Originally Posted by pokemonmaster (Post 1793782)
Not sure of this:
Code:
public client_command(id) {       static iFlags = get_user_flags(id)         if( iFlags & ADMIN_LEVEL_E )         return PLUGIN_HANDLED         return PLUGIN_CONTINUE }

The player won't be able to play the game with this.

Alka 09-07-2012 18:40

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
Check for user commands that start with "amx_" ( or make a list of all admin commands available on your server ) if you have all admins commands like that and then return HANDLED. And make sure to put your plugin first in the list, above all native amxx plugins.

jimaway 09-08-2012 08:18

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
i think it would be easier to make a list of game commands, since you wont need to update that list every time you add a plugin :D

omer 09-08-2012 09:49

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
OK
So I want to block command amx_addadmins if admin have access ADMIN_LEVEL_E so how can I do that?

dFF 09-08-2012 09:58

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
Why not change flag access for amx_addadmins in cmdaccess.ini ? Is not more simple ?

omer 09-08-2012 10:31

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
I want to disable for some seconds and not only one command...

omer 09-08-2012 10:40

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
Can anyone just gimme small script How can I block command.....
Any Idea? I want to block like this:
PHP Code:

if(is_user_alive)
{
       
block admins commands...
} else {
            
Unblock commands...



jimaway 09-08-2012 10:57

Re: How To block all admins commands if player have ADMIN_LEVEL_E
 
Quote:

Originally Posted by omer (Post 1794275)
Can anyone just gimme small script How can I block command.....
Any Idea? I want to block like this:
PHP Code:

if(is_user_alive)
{
       
block admins commands...
} else {
            
Unblock commands...



this is a small script that will block commands
Quote:

Originally Posted by pokemonmaster (Post 1793782)
Not sure of this:
Code:
public client_command(id) {       static iFlags = get_user_flags(id)         if( iFlags & ADMIN_LEVEL_E )         return PLUGIN_HANDLED         return PLUGIN_CONTINUE }

you just have to add checks if its a admin command you want to block, otherwise it will block game commands, making the player unable to move, shoot, etc in game


All times are GMT -4. The time now is 08:12.

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