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

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 }

Quote:
Originally Posted by jimaway View Post
this is a small script that will block commands


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
Quote:
Originally Posted by fysiks View Post
The player won't be able to play the game with this.
???
__________________


Last edited by omer; 09-08-2012 at 11:31.
omer is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-08-2012 , 13:33   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #12

Quote:
Originally Posted by omer View Post
???
As Alka says, you have to filter the commands and block only exactly the commands you are interested in.
__________________
fysiks is offline
omer
Senior Member
Join Date: Nov 2011
Old 09-08-2012 , 14:03   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #13

Thanks Everyone who helped problem solved!
__________________

omer is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 09-10-2012 , 18:21   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #14

Quote:
Originally Posted by fysiks View Post
The player won't be able to play the game with this.
Quote:
Originally Posted by jimaway View Post
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
I guess I always mess things up...

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

I think this will do it.....
Code:
#include <amxmodx> public client_command(id) {        static iFlags = get_user_flags(id)         if( iFlags & ADMIN_LEVEL_E )     {         new szCommand[50]         read_argv(0, szCommand, charsmax(szCommand))         if(containi(szCommand, "amx_") && is_user_alive(id))             return PLUGIN_HANDLED     }         return PLUGIN_CONTINUE }
This would be good?
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 09-11-2012 at 07:46.
pokemonmaster is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-10-2012 , 19:27   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #15

Quote:
Originally Posted by pokemonmaster View Post
I guess I always mess things up...


I think this will do it.....
Code:
#include <amxmodx> public client_command(id) {        static iFlags = get_user_flags(id)         if( iFlags & ADMIN_LEVEL_E )     {         new szCommand[50]         read_argv(0, szCommand, charsmax(szCommand))         if(equali(szCommand, "amx_") && is_user_alive(id))             return PLUGIN_HANDLED     }         return PLUGIN_CONTINUE }
This would be good?
No. There are no commands that are just "amx_". You need to specify a length to check if you want to do it this way. Also, why do they have to be alive? Life status was not in the request.
__________________
fysiks is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 09-11-2012 , 07:51   Re: How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #16

Quote:
Originally Posted by fysiks View Post
No. There are no commands that are just "amx_". You need to specify a length to check if you want to do it this way.
fixed...
Quote:
Originally Posted by fysiks View Post
Also, why do they have to be alive? Life status was not in the request.
Quote:
Originally Posted by omer
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...

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 09-11-2012 at 07:51.
pokemonmaster is offline
omer
Senior Member
Join Date: Nov 2011
Old 09-11-2012 , 22:34   Re: [Solved] How To block all admins commands if player have ADMIN_LEVEL_E
Reply With Quote #17

Thank You very much For your Time...
__________________

omer 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 01:30.


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