Raised This Month: $ Target: $400
 0% 

Access issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 02-09-2010 , 16:23   Access issue
Reply With Quote #1

I have a small access issue to a menu, I am using this:

PHP Code:
#define ACCESS_LEVEL ADMIN_BAN 
PHP Code:
    register_clcmd"say /managetop15","Top15WebMenu"ACCESS_LEVEL
I thought that only admins with the b flag can open the menu but everyone can do it, what is wrong here?
KadiR is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-09-2010 , 16:31   Re: Access issue
Reply With Quote #2

You have to block the usage in Top15WebMenu
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-09-2010 , 18:51   Re: Access issue
Reply With Quote #3

if(!cmd_access()) return PLUGIN_HANDLED
__________________
fysiks is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 02-09-2010 , 18:58   Re: Access issue
Reply With Quote #4

PHP Code:
if ( access(idADMIN_BAN) )
    {
        
//Whatever happends if he/she got   access
    

__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2010 , 18:58   Re: Access issue
Reply With Quote #5

Quote:
Originally Posted by NiQu View Post
PHP Code:
if ( access(idADMIN_BAN) )
    {
        
//Whatever happends if he/she got   access
    

You shouldn't use that for commands.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 02-09-2010 , 18:58   Re: Access issue
Reply With Quote #6

Why not? i use it in ultimate vip.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2010 , 19:02   Re: Access issue
Reply With Quote #7

Code:
public plugin_init( ) {     register_concmd( "kill_all", "CmdKillAll", ADMIN_BAN ); } // bad public CmdKillAll( iPlayer ) {     if( !access( iPlayer, ADMIN_BAN ) )     {         return PLUGIN_HANDLED;     }         // kill all         return PLUGIN_HANDLED; } // bad public CmdKillAll( iPlayer ) {     if( !( get_user_flags( iPlayer ) & ADMIN_BAN ) )     {         return PLUGIN_HANDLED;     }         // kill all         return PLUGIN_HANDLED; } // good public CmdKillAll( iPlayer, iLevel, iCID ) {     if( !cmd_access( iPlayer, iLevel, iCID, 1 ) )     {         return PLUGIN_HANDLED;     }         // kill all         return PLUGIN_HANDLED; }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 07:27.


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