Raised This Month: $ Target: $400
 0% 

Player Number Redirect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pcpalex
Member
Join Date: Mar 2010
Location: Romania
Old 12-27-2013 , 10:21   Player Number Redirect
Reply With Quote #1

Hello,

I want to do a little modification to this plugin. I do not want to redirect all players want to redirect only 7 players.

PHP Code:
#include <amxmodx>

new g_max_players
public plugin_init(){
    
register_plugin("Redirect All""1.0""Sylwester")
    
register_clcmd("amx_redirect""redirect_cmd"ADMIN_BAN"")
    
g_max_players get_maxplayers()
}

public 
wrong_arg(id){
    
client_print(idprint_console"[Redirect All]Wrong arguments (must be ^"amx_redirect ip:port^")")
    return 
PLUGIN_HANDLED
}

public 
redirect_cmd(idlevelcid){
    new 
cmd[32], cmd_tmp[32], tmp[32], num
    read_args
(cmd31)
    
copy(cmd_tmp31cmd)
    for(new 
i=0i<3i++){
        
strtok(cmd_tmptmp31cmd_tmp31'.')
        
num str_to_num(tmp)
        if(
num || 255 num || strlen(tmp) <= 0)
            return 
wrong_arg(id)
    }
    
strtok(cmd_tmptmp31cmd_tmp31':')
    
num str_to_num(tmp)
    if(
num || 255 num || strlen(tmp) <= 0)
        return 
wrong_arg(id)
    
num str_to_num(cmd_tmp)
    if(
num || 65536 num)
        return 
wrong_arg(id)
    for(new 
i=1i<=g_max_playersi++)
        if(
is_user_connected(i) || is_user_connecting(i))
            
client_cmd(i"Connect %s"cmd)
    return 
PLUGIN_HANDLED

pcpalex is offline
Send a message via Yahoo to pcpalex
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-27-2013 , 14:23   Re: Player Number Redirect
Reply With Quote #2

Redirection is no longer possible and thus will not be supported here.
__________________
fysiks 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 10:13.


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