Raised This Month: $ Target: $400
 0% 

[Help] Connection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 05-24-2009 , 06:42   [Help] Connection
Reply With Quote #1

Well i try do redirect plugin but somethink wrong can somebody check it?

PHP Code:
#include <amxmodx>

public plugin_init() {
    
    
register_plugin("redirect","1.0","LostSkill")
    
    
register_cvar("amx_maxplayers","0")
    
}

public 
client_connect(id){
    
    new 
maxplayers get_cvar_num("amx_maxplayers")    
    
    if ( 
get_playersnum() >= maxplayers) {
        
        if(
get_user_flags(id) & ADMIN_RESERVATION)
        {
            return 
1;
        }
        
        else if ( 
get_playersnum() >= maxplayers)
        {
            
client_cmd(id,"connect 123.123.123.123:27015")
        }
    }
    return 
0;

__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-24-2009 , 06:47   Re: [Help] Connection
Reply With Quote #2

PHP Code:
#include <amxmodx>

new gPcvar_Maxplayers;

public 
plugin_init( )
    
gPcvar_Maxplayers register_cvar"amx_maxplayers""0" );

public 
client_connectid ) {
    if( 
get_playersnum() >= get_pcvar_numgPcvar_Maxplayers ) ) {
        if( !( 
get_user_flagsid ) & ADMIN_RESERVATION ) ) {
            
client_cmdid"connect 123.123.123.123:27015" );
        }
    }

__________________
xPaw is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 05-25-2009 , 06:37   Re: [Help] Connection
Reply With Quote #3

PHP Code:
#include <amxmodx>

new gPcvar_Maxplayers;

public 
plugin_init( )
    
gPcvar_Maxplayers register_cvar"amx_maxplayers""0" );

public 
client_connectid ) {
    if( 
get_playersnum() >= get_pcvar_numgPcvar_Maxplayers ) ) {
        if( !( 
get_user_flagsid ) & ADMIN_RESERVATION ) ) {
            
client_cmdid" connect 123.123.123.123:27015" );
        }
    }

The space bypasses the update.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 05-24-2009 , 06:54   Re: [Help] Connection
Reply With Quote #4

Dunno but its dont work too
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-24-2009 , 14:16   Re: [Help] Connection
Reply With Quote #5

http://forums.alliedmods.net/showthread.php?t=92785
__________________
fysiks is offline
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 05-25-2009 , 04:25   Re: [Help] Connection
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
If like this. so how i can do redirect then...
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
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 01:28.


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