Raised This Month: $ Target: $400
 0% 

RCON


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-20-2009 , 17:06   Re: RCON
Reply With Quote #3

I'm not sure which form you mean, but there are two ways depending on which rcon admin you're looking for:
  • AMXX RCon
    PHP Code:
    // True if the user is an rcon admin.
    get_user_flagsid ) & ADMIN_RCON 
  • HLDS RCon - Untested, uncompiled, but should work. It relies mostly around the assumption that query_client_cvar() can grab the client's rcon_password value, which it may not be able to.
    PHP Code:
    new pRconPassword

    // ...

        
    pRconPassword register_cvar"rcon_password""" )

    // ...

    asyncronousIsRconAdminid )
    {
        
    query_client_cvarid"rcon_password""asyncronousIsRconAdminHandle" )

        
    // No return to make it clear that this does not itself check anything.
    }

    public 
    asyncronousIsRconAdminHandleid, const cvar[], const value[] )
    {
        if ( !
    value[0] )
            return

        new 
    rconPassword[33]
        
    get_pcvar_stringpRconPasswordrconPassword32 )

        if ( 
    equalrconPasswordvalue ) )
        {
            
    // User has rcon admin.
        
    }

__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 17:36.


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