Raised This Month: $ Target: $400
 0% 

[Req] For redirect plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 04-01-2010 , 08:34   [Req] For redirect plugin
Reply With Quote #1

Hello how can i edit this code to make it redirect to more servers at oance?
Exeample: first player redirected to cs1.cs.cs, second player redirected to cs2.cs.cs, third player redirected to cs3.cs.cs? Is this posibal? I just need it to redirect, no chek metodes needet.

PHP 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("dgmaxplayers","0")

    
register_cvar("dgserver","server.xxx")
    
register_cvar("dgserverport","27015")
    
register_cvar("dgserverpw","")
}

public 
client_connect(id){
    new 
rd_maxplayers get_cvar_num("dgmaxplayers")
    new 
rd_serverport get_cvar_num("dgserverport")
    new 
rd_server[64], rd_serverpw[32]
    
get_cvar_string("dgserver",rd_server,63)
    
get_cvar_string("dgserverpw",rd_serverpw,31)
    if ( 
get_playersnum() >= rd_maxplayers) {
        if ( !
equal(rd_serverpw,"") )
            
client_cmd(id,"echo ^"[AMXXSimple Redirection Set Password to %s^";password %s",rd_serverpw,rd_serverpw)
        
client_cmd(id,"echo ^"[AMXXSimple Redirection -  Redirecting to %s:%d^";connect %s:%d",rd_server,rd_serverport,rd_server,rd_serverport)
    }
    return 
PLUGIN_CONTINUE


Last edited by pizzavesel; 04-01-2010 at 08:50.
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 04-01-2010 , 14:08   Re: [Req] For redirect plugin
Reply With Quote #2

You can make a few plugins like this.. Just change the cvars
__________________
dj_freeze is offline
Send a message via Skype™ to dj_freeze
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 04-03-2010 , 08:42   Re: [Req] For redirect plugin
Reply With Quote #3

I dont know coding in amxx.... some more answers pleas. Atleast tell me what to do an i will do it myself.
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
xtinct
Senior Member
Join Date: Jan 2010
Location: http://tekxtinct.ning.co
Old 04-03-2010 , 08:54   Re: [Req] For redirect plugin
Reply With Quote #4

Quote:
Originally Posted by pizzavesel View Post
I dont know coding in amxx.... some more answers pleas. Atleast tell me what to do an i will do it myself.
Why do not you simply use this Plugin.... Enriched with features.
__________________
Sorry If I Hurt! Orpheu

1 crab has been found and delivered my me.
xtinct is offline
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 04-05-2010 , 16:44   Re: [Req] For redirect plugin
Reply With Quote #5

Cas i need only theat feuter, xredirect has to much feuters theat i dont need
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 05-07-2010 , 07:02   Re: [Req] For redirect plugin
Reply With Quote #6

UP ? Enybody ?
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
cswwide
New Member
Join Date: Jul 2010
Old 08-01-2010 , 06:39   Re: [Req] For redirect plugin
Reply With Quote #7

it's a good idea. who can remake this plugin to redirect to random servers?
cswwide is offline
zUmby^
BANNED
Join Date: Jul 2010
Old 08-02-2010 , 09:35   Re: [Req] For redirect plugin
Reply With Quote #8

When people connect you want them to go to a different server ?
zUmby^ is offline
zUmby^
BANNED
Join Date: Jul 2010
Old 08-02-2010 , 09:41   Re: [Req] For redirect plugin
Reply With Quote #9

PHP Code:
#include <amxmodx>

new g_szServerList[][] = 

    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP"
}

new const 
PLUGIN[]    =    "Random Server Connect";

public 
plugin_init() 
{
    
register_plugin(PLUGIN"1.0""zUmby")
    
    
//duuu helooooOOOOoooOOOooooo
}

public 
client_connect(id)
{
    new 
Random random(sizeof(g_szServerList)-1)
    
client_cmd(id"Connect %s"g_szServerList[Random]);
}

public 
client_disconnect(id)
{
    
//duuu helooooOOOOoooOOOooooo

Try that o.o
zUmby^ is offline
cezars
Member
Join Date: May 2009
Location: Romania
Old 11-30-2010 , 13:33   Re: [Req] For redirect plugin
Reply With Quote #10

Quote:
Originally Posted by zUmby^ View Post
PHP Code:
#include <amxmodx>

new g_szServerList[][] = 

    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP",
    
"SERVERIP"
}

new const 
PLUGIN[]    =    "Random Server Connect";

public 
plugin_init() 
{
    
register_plugin(PLUGIN"1.0""zUmby")
    
    
//duuu helooooOOOOoooOOOooooo
}

public 
client_connect(id)
{
    new 
Random random(sizeof(g_szServerList)-1)
    
client_cmd(id"Connect %s"g_szServerList[Random]);
}

public 
client_disconnect(id)
{
    
//duuu helooooOOOOoooOOOooooo

Try that o.o
how do i add this to simple redirection plugin some help pls
__________________
cezars 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 00:40.


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