Raised This Month: $ Target: $400
 0% 

Request: Redirect plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 06-09-2009 , 04:21   Re: Request: Redirect plugin
Reply With Quote #1

Ok this is the code from the plugin

Code:
#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){
    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
}
Dose someone knows how to make it to redirect to severeal servers at oance or to redirect 1 player to 1 server the next player to the next server and the next to the next server and so on or to redirect randomly to a list of server?

Last edited by pizzavesel; 06-09-2009 at 04:23.
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
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 00:39.


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