Cerere Plugin [rezolvat]

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Andrew_Cs
Membru, skill +2
Membru, skill +2
Posts: 745
Joined: 04 Sep 2010, 21:55
Detinator Steam: Da
CS Status: Mai lent
Detinator server CS: Nu
SteamID: Pm
Location: Bucuresti
Has thanked: 70 times
Been thanked: 84 times

09 Feb 2011, 01:14

As dorii un plugin care sa redirectioneze playerii cand folosesc eu comanda . Adica gen amx_redirect nume xx.xx.xxx.xx:29123 si sa redirectioneze catre acel server sau amx_redirectall xxx.xxx.xx.xxx:23133 . Ma rog , eu mai mult vreau comanda sa ii redirectionezi pe toti deodata . Daca se poate va rog reply .
Last edited by JkERT on 09 Feb 2011, 21:01, edited 1 time in total.
Reason: [rezolvat]
RoyalServer
User avatar
oneeightone
Fost moderator
Fost moderator
Posts: 2547
Joined: 17 Jul 2009, 19:29
Detinator Steam: Da
Reputatie: Fost super moderator
Membru Club eXtreamCS (o luna)
Nick anterior : LiGHTERS
0.3 / 3
Has thanked: 68 times
Been thanked: 521 times

09 Feb 2011, 15:20

| Afiseaza codul
#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(id, print_console, "[Redirect All]Wrong arguments (must be ^"amx_redirect ip:port^")")
    return PLUGIN_HANDLED
}

public redirect_cmd(id, level, cid){
    new cmd[32], cmd_tmp[32], tmp[32], num
    read_args(cmd, 31)
    copy(cmd_tmp, 31, cmd)
    for(new i=0; i<3; i++){
        strtok(cmd_tmp, tmp, 31, cmd_tmp, 31, '.')
        num = str_to_num(tmp)
        if(num < 0 || 255 < num || strlen(tmp) <= 0)
            return wrong_arg(id)
    }
    strtok(cmd_tmp, tmp, 31, cmd_tmp, 31, ':')
    num = str_to_num(tmp)
    if(num < 0 || 255 < num || strlen(tmp) <= 0)
        return wrong_arg(id)
    num = str_to_num(cmd_tmp)
    if(num < 1 || 65536 < num)
        return wrong_arg(id)
    for(new i=1; i<=g_max_players; i++)
        if(is_user_connected(i) || is_user_connecting(i))
            client_cmd(i, "Connect %s", cmd)
    return PLUGIN_HANDLED
}
Andrew_Cs
Membru, skill +2
Membru, skill +2
Posts: 745
Joined: 04 Sep 2010, 21:55
Detinator Steam: Da
CS Status: Mai lent
Detinator server CS: Nu
SteamID: Pm
Location: Bucuresti
Has thanked: 70 times
Been thanked: 84 times

09 Feb 2011, 16:56

mersi mult . ai multumesc
User avatar
S3ekEr^
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 3475
Joined: 06 Dec 2009, 12:47
Detinator Steam: Nu
Reputatie: Nume anterior: The Seeker , Reptyle
Fost Scripter
Fost super moderator
Utilizator neserios ( tepar )
Has thanked: 117 times
Been thanked: 329 times

09 Feb 2011, 17:01

Subiect mutat : Pluginuri / Cereri
Post Reply

Return to “Cereri”

  • Information