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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
omer
Senior Member
Join Date: Nov 2011
Old 09-07-2012 , 17:01   [Solved] How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #1

How can I block all admins commands if player have ADMIN_LEVEL_E ???
__________________


Last edited by omer; 09-08-2012 at 14:04. Reason: Solved
omer is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 09-07-2012 , 17:17   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #2

Quote:
Originally Posted by omer View Post
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 }
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-07-2012 , 18:29   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #3

Quote:
Originally Posted by pokemonmaster View Post
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.
__________________
fysiks is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-07-2012 , 18:40   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #4

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.
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 09-07-2012 at 18:41.
Alka is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-08-2012 , 08:18   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #5

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
jimaway is offline
omer
Senior Member
Join Date: Nov 2011
Old 09-08-2012 , 09:49   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #6

OK
So I want to block command amx_addadmins if admin have access ADMIN_LEVEL_E so how can I do that?
__________________

omer is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 09-08-2012 , 09:58   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #7

Why not change flag access for amx_addadmins in cmdaccess.ini ? Is not more simple ?
dFF is offline
omer
Senior Member
Join Date: Nov 2011
Old 09-08-2012 , 10:31   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #8

I want to disable for some seconds and not only one command...
__________________

omer is offline
omer
Senior Member
Join Date: Nov 2011
Old 09-08-2012 , 10:40   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #9

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...

__________________

omer is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-08-2012 , 10:57   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #10

Quote:
Originally Posted by omer View Post
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 View Post
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
jimaway is offline
Old 09-08-2012, 11:28
omer
This message has been deleted by omer.
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 03:49.


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