Raised This Month: $ Target: $400
 0% 

simple fix


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ultralord
Senior Member
Join Date: Oct 2008
Old 05-26-2010 , 12:13   simple fix
Reply With Quote #1

i want to fix simple redirect.. i dont want to redirect the admins only users i tried

Code:
/* AMXX Mod Script
*
* Simple Redirection Plugin for AMXX
* Orginal Code by Sonic ([email protected])
* Modified and Made for AMXX by BigBaller
*
*  Place following cvars in server.cfg
*
*  amx_rd_maxplayers <x>             // - begin redirection when more the x ppl connected ( 0 = redirect all players )
*  amx_rd_server <ip>                // - redirect to this server
*  amx_rd_serverport <port>          // - redirect server port
*  amx_rd_serverpw <password>        // - password for the amx_rd_server (if needed)
*
*
*  To Disable this plugin set amx_rd_maxppl to 33 or remove from plugins.ini
*/

#include <amxmodx>

public plugin_init() {
    register_plugin("Simple Redirect","1.0","BigBaller")
    register_cvar("amx_rd_maxplayers","0")

    register_cvar("amx_rd_server","")
    register_cvar("amx_rd_serverport","")
    register_cvar("amx_rd_serverpw","")
}

public client_connect(id){
if (get_user_flags(id) & ADMIN_RESERVATION)
        return PLUGIN_CONTINUE
    new rd_maxplayers = get_cvar_num("amx_rd_maxplayers")
    new rd_serverport = get_cvar_num("amx_rd_serverport")
    new rd_server[64], rd_serverpw[32]
    get_cvar_string("amx_rd_server",rd_server,63)
    get_cvar_string("amx_rd_serverpw",rd_serverpw,31)
    if ( get_playersnum() >= rd_maxplayers) {
        if ( !equal(rd_serverpw,"") )
            client_cmd(id,"echo ^"[AMXX] Simple Redirection - Set Password to %s^";password %s",rd_serverpw,rd_serverpw)
        client_cmd(id,"echo ^"[AMXX] Simple Redirection -  Redirecting to %s:%d^";Connect %s:%d",rd_server,rd_serverport,rd_server,rd_serverport)
    }
    return PLUGIN_CONTINUE
}
can someone tell me how i can fix it?

i tried

if (get_user_flags(id) == ADMIN_RESERVATION)

if !(get_user_flags(id) & ADMIN_RESERVATION)
Ultralord is offline
 


Thread Tools
Display Modes

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 05:16.


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