...::: Cs-StRiKeS CoMMuNiTy :::...

Doriti să reactionati la acest mesaj? Creati un cont în câteva clickuri sau conectati-vă pentru a continua.
...::: Cs-StRiKeS CoMMuNiTy :::...

ForUm Cs-StRiKeS SerVeR !

Varsta minima : 16 ANI !
Trebuie sa ai experienta multa in administrarea unui server !
Cel mai important : Sa ai CEL PUTIN 50 de ore jucate pe server !

    Server Restart With Hud & Voice (Vs. 1.1)

    bMw
    bMw
    Administrator
    Administrator


    Numarul mesajelor : 319
    Varsta : 32
    Localizare : VoLuNtArRy
    Detinator Steam : Da
    Best SITE : www.strikes.ro
    Data de inscriere : 22/02/2008

    Server Restart With Hud & Voice (Vs. 1.1) Empty Server Restart With Hud & Voice (Vs. 1.1)

    Mesaj  bMw Joi Feb 12, 2009 9:29 am

    Descriere: E un simplu plugin care da restart la server si in acelasi timp anunta repornirea printr-un mesaj HUD afisat tuturor jucatorilor.


    Autor: CoSmiN
    Versiune: 1.1

    Download: Link!

    Instalare:
    1. Fisierul restart_server.amxx il puneti in addons\amxmodx\plugins
    2. Intrati in fisierul addons\amxmodx\configs\plugins.ini si adaugati la urma:


    Code:
    restart_server.amxx



    Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
    Daca e pus in .sma #define CmdLine 1, comanda va fi:
    amx_restart <Seconds> - reporneste jocul

    Daca va fi #define CmdLine 0, comanda va fi:
    admin_restart <Seconds> - reporneste jocul

    Alternativa(codul in sine):


    Code:
    #include <amxmodx>
    #include <amxmisc>

    #define PLUGIN "Restart Server with Voice & Hud"
    #define VERSION "1.1"
    #define AUTHOR "Kouta"

    #define AccesLevel ADMIN_LEVEL_B
    #define CmdLine 1


    new Sync, Seconds;


    public plugin_init()
    {
    register_plugin(PLUGIN, VERSION, AUTHOR)

    #if CmdLine 1
    register_concmd("amx_restart","Restart",AccesLevel,"<Seconds> - dati restart la server");
    #else
    register_concmd("admin_restart","Restart",AccesLevel,"<Seconds> - dati restart la server");
    #endif

    Sync = CreateHudSyncObj();


    }



    public Restart(id,level,cid)
    {
    if(!cmd_access(id,level,cid,2))
    return PLUGIN_HANDLED;


    new Target[32];

    read_argv(1, Target, sizeof Target -1);

    Seconds = str_to_num(Target);

    if(Seconds <= 20)
    {
    set_hudmessage(255, 170, 0, 0.10, 0.33, 1, 12.1, 10.0)
    show_hudmessage(0, "*********** Server Restart *********");
    client_cmd(0,"spk ^"vox/warning _comma detected^"");
    set_task(float(Seconds), "Trigger", 0, "", 0, "a", Seconds)
    }
    else
    {
    client_print(id, print_console,"********** Prea Multe Seconde **********");
    return PLUGIN_HANDLED;
    }
    return PLUGIN_CONTINUE;
    }


    public Trigger()
    {
    if(Seconds >= 0)
    {
    if(Seconds == 20 || Seconds == 15)
    {
    new voice_[64]
    num_to_word(Seconds, voice_, 63)
    client_cmd(0, "spk ^"vox/%s _comma seconds^"", voice_)
    }
    else
    if(Seconds < 11)
    {
    new voice_[64]
    num_to_word(Seconds, voice_, 63)
    client_cmd(0, "spk ^"vox/%s _comma^"", voice_)
    }

    if(Seconds > 11)
    set_hudmessage(255, 170, 0, 0.10, 0.35, 1, 6.1, 6.0)

    else
    if(Seconds == 10)
    set_hudmessage(255, 170, 0, 0.10, 0.37, 1, 6.1, 6.0)

    else
    if(Seconds == 9)
    set_hudmessage(255, 170, 0, 0.10, 0.39, 1, 6.1, 6.0)

    else
    if(Seconds == Cool
    set_hudmessage(255, 170, 0, 0.10, 0.41, 1, 6.1, 6.0)

    else
    if(Seconds == 7)
    set_hudmessage(255, 170, 0, 0.10, 0.43, 1, 6.1, 6.0)

    else
    if(Seconds == 6)
    set_hudmessage(255, 170, 0, 0.10, 0.46, 1, 6.1, 6.0)

    else
    if(Seconds == 5)
    set_hudmessage(255, 170, 0, 0.10, 0.49, 1, 6.1, 6.0)

    else
    if(Seconds == 4)
    set_hudmessage(255, 0, 0, 0.10, 0.51, 1, 6.1, 6.0)

    else
    if(Seconds == 3)
    set_hudmessage(255, 0, 0, 0.10, 0.54, 1, 6.1, 6.0)

    else
    if(Seconds == 2)
    set_hudmessage(255, 0, 0, 0.10, 0.57, 1, 6.1, 6.0)

    else
    if(Seconds == 1)
    set_hudmessage(255, 0, 0, 0.10, 0.59, 1, 6.1, 6.0)

    if(Seconds <= 0)
    {
    client_cmd(0, "retry");
    server_cmd("restart");
    }

    ShowSyncHudMsg(0, Sync, "[%d] In Seconds", Seconds);

    --Seconds;

    set_task(1.0,"Trigger")
    }
    return PLUGIN_CONTINUE;
    }

      Data/ora curentă este: Joi Noi 21, 2024 4:07 pm