[Pitanje] Činovi Plugin
Results 1 to 12 of 12

Thread: Činovi Plugin

  1. #1
    Senior Member Array
    Join Date
    May 2016
    Karma
    2

    Default Činovi Plugin

    Ima neki dobar Cinovi Plugin za DM? Testiro sam jedan al sve je bagovano.

  2. #2
    Senior Member Array
    Join Date
    Jan 2017
    Location
    Proffessional Coder.
    Age
    34
    Karma
    0

    Default

    probaj ovaj:

    PHP Code:
    #include <amxmodx>
    #include <amxmisc>
    #include <dhudmessage>
    #include <nvault>

    #define HUD 672

    new ispis[64]
    new 
    pCvarPrefix
    new const Cinovi[][]=


    {
        
    "Pocetnik",
        
    "Amater",
        
    "Mladji vojnik",
        
    "Vojnik",
        
    "Narednik",
        
    "Narednik I",
        
    "General",
        
    "General I",
        
    "General II",
        
    "General III",
        
    "Potporucnik",
        
    "Porucnik",
        
    "Kapetan",
        
    "Major",
        
    "Potpukovnik",
        
    "Pukovnik",
        
    "Brigadni General",
        
    "General-Major",
        
    "General-Potpukovnik",
        
    "Expert"
        
    }

    new 
    max_level 20000g_sync1g_podaci_pcvar_killxpxp_igraca[33], CinX[33], level_igraca[33] = 1_pcvar_boja[3], _pcvar_pozicija[2],_pcvar_nagrada,_pcvar_mesto

    public plugin_init() {
        
    register_plugin("Level System Cinovi""1.1b""Rasist & Megastorm")
        
    g_podaci nvault_open("level_mod");
        
        
    register_event("DeathMsg""player_death""ade");
        
        
    _pcvar_killxp register_cvar("lvl_killxp","3")
        
    _pcvar_boja[0] = register_cvar("lvl_red","0")
        
    _pcvar_boja[1] = register_cvar("lvl_green","200")
        
    _pcvar_boja[2] = register_cvar("lvl_blue","250")
        
    _pcvar_pozicija[0] = register_cvar("lvl_x","0.02")
        
    _pcvar_pozicija[1] = register_cvar("lvl_y","0.75")
        
    _pcvar_nagrada register_cvar("amx_nagrada","1")
        
    _pcvar_mesto register_cvar("amx_mesto" "1")
        
    pCvarPrefix register_cvar("prefix_tip","1")
        
    register_concmd("set_lvl""cmd_lvl"ADMIN_RCON"<nick> <level>");
        
        
    get_configsdir(ispis63); 
        
    formatex(ispis63"%s/lvl_podesavanja.cfg"ispis); 
        
        
    g_sync1 CreateHudSyncObj()
        
        
    register_message(get_user_msgid("SayText"),"handleSayText");
    }


    public 
    handleSayText(msgId,msgDest,msgEnt)
    {
        new 
    id get_msg_arg_int(1);
        
        if(!
    is_user_connected(id))
            return 
    PLUGIN_CONTINUE;
        
        new 
    szTmp[256],szTmp2[256]
        
    get_msg_arg_string(2,szTmpcharsmaxszTmp ) )
        
        new 
    szPrefix[64]
        
        switch(
    get_pcvar_num(pCvarPrefix))
        {
            case 
    1:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^x04[%s]",Cinovi[CinX[id]]);  
            }
            case 
    2:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^x04[%d]",level_igraca[id]);
            }
            case 
    3:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^4[^3%s^4][^3Level^4 : ^3%d^4]",Cinovi[CinX[id]],level_igraca[id]);
            }
        }
        
        if(!
    equal(szTmp,"#Cstrike_Chat_All")){
            
    add(szTmp2,charsmax(szTmp2),szPrefix);
            
    add(szTmp2,charsmax(szTmp2)," ");
            
    add(szTmp2,charsmax(szTmp2),szTmp);
        }
        else{
            
    add(szTmp2,charsmax(szTmp2),szPrefix);
            
    add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 :  %s2");
        }
        
        
    set_msg_arg_string(2,szTmp2);
        
        return 
    PLUGIN_CONTINUE;
    }       


    public 
    plugin_precache()
    {
        
    mkdir(ispis)
        if(!
    file_exists(ispis) )
        {
            
    write_file(ispis,"*****************************[LVL Podesavanja]*****************************")
            
    write_file(ispis,"<<-------------------Ovde podesavate sve cvarove vezane za plugin---------------->>")
            
    write_file(ispis," ")
            
    write_file(ispis,"lvl_killxp ^"3^"    // XP za kill")
            
    write_file(ispis,"lvl_red ^"0^"       // Kolicina-Nijansa crvene")
            
    write_file(ispis,"lvl_green ^"200^"   // Kolicina-Nijansa zelene")
            
    write_file(ispis,"lvl_blue ^"250^"    // Kolicina-Nijansa plave")
            
    write_file(ispis,"lvl_x ^"0.02^"      // Pozicija po X osi(0.01-1.0(-1.0 za centar))")
            
    write_file(ispis,"lvl_y ^"0.75^"      // Pozicija po Y osi(0.01-1.0(-1.0 za centar))")
            
    write_file(ispis,"amx_nagrada ^"1^"   // Nagrade - slot, slot + imunitet - 1 - on, 2 - off")
            
    write_file(ispis,"amx_mesto ^"2^"     // Gde ce da stoji text? : 1-vi birate, 2-ispod radara")
        }
        
    server_cmd("exec %s"ispis)
        
    server_exec()
    }

    public 
    Reset(id)
    {
        
    xp_igraca[id] = 1
        proverilvl
    (id)
        
    client_print(idprint_chat"[LVL] Uspesno si resetovao levele")
    }

    public 
    cmd_lvl(idlevelcid)
    {
        if(!
    cmd_access(idlevelcid3))
            return 
    PLUGIN_HANDLED;
        
        new 
    arg1[33];
        new 
    arg2[6];
        
    read_argv(1arg132);
        
    read_argv(2arg25);
        new 
    player cmd_target(idarg10);
        if(!
    is_user_connected(player))
            return 
    PLUGIN_HANDLED;
        
        new 
    value str_to_num(arg2)-1;
        
        if(
    value 199)
        {
            
    client_print(idprint_console"Ne mozes postaviti igracu vise od 200 levela!")
            return 
    PLUGIN_HANDLED
        
    }
        
    client_print(idprint_console"Uspesno si postavio %s %d levela"playervalue)
        
    xp_igraca[player] = xp_za_level(value);
        
    level_igraca[player] = 0;
        
    proverilvl(player);
        return 
    PLUGIN_HANDLED;
    }

    public 
    pokazi_podatke(id)
    {
        
    id -= HUD
        
        
    if(!is_user_connected(id))
            return 
    PLUGIN_HANDLED
        
        set_task
    (0.1"pokazi_podatke"id+HUD);
        
        if(
    get_pcvar_num(_pcvar_mesto) == 1)
        
    set_dhudmessage(get_pcvar_num(_pcvar_boja[0]), get_pcvar_num(_pcvar_boja[1]), get_pcvar_num(_pcvar_boja[2]), get_pcvar_float(_pcvar_pozicija[0]), get_pcvar_float(_pcvar_pozicija[1]), 00.00.30.00.0);
        
    show_dhudmessage(id"[Level: %i]^n[Skill: %i / %i]^n[Cin: %s]",level_igraca[id], xp_igraca[id], xp_za_level(level_igraca[id]), Cinovi[CinX[id]])
        
        if(
    get_pcvar_num(_pcvar_mesto) == 2)
        
    set_dhudmessage(025500.00.1506.012.0)
        
    show_dhudmessage(id"[Level: %i]^n[Skill: %i / %i]^n[Cin: %s]",level_igraca[id], xp_igraca[id], xp_za_level(level_igraca[id]), Cinovi[CinX[id]])
        
        
        return 
    PLUGIN_CONTINUE;
    }  

    public 
    player_death()
    {
        new 
    attacker read_data(1)
        
        if(!
    is_user_connected(attacker))
            return 
    PLUGIN_HANDLED
        
        
    new xp_za_ubistvo get_pcvar_num(_pcvar_killxp)
        if(
    level_igraca[attacker] < max_level || xp_igraca[attacker] >= 119990)
        {
            
    xp_igraca[attacker] += xp_za_ubistvo
            proverilvl
    (attacker)
        }
        else
        {
            
    level_igraca[attacker] = max_level
            xp_igraca
    [attacker] = 119990
            proverilvl
    (attacker)
        }    
        
        
        return 
    PLUGIN_CONTINUE
    }

    public 
    proverilvl(id)
    {
        if(
    level_igraca[id] >= max_level)
            return 
    PLUGIN_HANDLED
        
        
    if(level_igraca[id] < max_level)
        {
            while(
    xp_igraca[id] >= xp_za_level(level_igraca[id]))
            {
                
    level_igraca[id]++
                
    set_hudmessage(20000, -1.00.2501.02.00.10.2);
                
    ShowSyncHudMsg(idg_sync1"Dobrodosao na %i level!"level_igraca[id]);
            }
        }
        else
        {
            
    xp_igraca[id] = 119990
            level_igraca
    [id] = max_level
        
    }
        
        switch(
    level_igraca[id])
        {
            case 
    1CinX[id] = 0;
                case 
    2CinX[id] = 1;
                case 
    3..4CinX[id] = 2;
                case 
    5..7CinX[id] = 3;
                case 
    8..15CinX[id] = 4;
                case 
    16..23CinX[id] = 5;
                case 
    24..31CinX[id] = 6;
                case 
    32..63CinX[id] = 7;
                case 
    64..74CinX[id] = 8;
                case 
    75..127CinX[id] = 9;
                case 
    128..155CinX[id] = 10;
                case 
    156..191CinX[id] = 11;
                case 
    192..200CinX[id] = 12;
                case 
    201..211CinX[id] = 13;
                case 
    212..225CinX[id] = 14;
                case 
    226..235CinX[id] = 15;
                case 
    236..250CinX[id] = 16;
                case 
    251..270CinX[id] = 17;
                case 
    271..20000CinX[id] = 18;
            }
        
        return 
    PLUGIN_CONTINUE
    }

    public 
    xp_za_level(lvl)
        return 
    lvl*3*2;


    public 
    client_putinserver(id)
    {
        if(
    get_pcvar_num(_pcvar_nagrada) == 1)
        
    level_igraca[id] = 1
        
        Ucitaj
    (id)
        
    set_task(3.0"pokazi_podatke"id+HUD);
        
        switch(
    level_igraca[id])
        {
            case 
    50..499:
            {
                
    set_user_flags(idADMIN_RESERVATION);
            }
            case 
    500.2000:
            {
                
    set_user_flags(idADMIN_IMMUNITY);
                
    set_user_flags(idADMIN_RESERVATION);
            }
        }
    }

    public 
    client_disconnect(id)
    {
        
    Sacuvaj(id)
    }

    public 
    Sacuvaj(id)
    {
        new 
    vltkey[128]
        new 
    podaci[256]
        new 
    steam_id_igraca[64];
        
    format(podacicharsmax(podaci),"#%i#%i#%i"xp_igraca[id], level_igraca[id], CinX[id]);
        
        
    get_user_authid(idsteam_id_igracacharsmax(steam_id_igraca))
        
        
    format(vltkeycharsmax(vltkey),"%s-lvl_mod"steam_id_igraca);
        
    nvault_set(g_podaci,vltkey,podaci);
        
        return 
    PLUGIN_CONTINUE;
    }

    public 
    Ucitaj(id)
    {
        new 
    vltkey[128]
        new 
    podaci[256]
        new 
    steam_id_igraca[64];
        
        
    get_user_authid(idsteam_id_igracacharsmax(steam_id_igraca))
        
        
    format(vltkeycharsmax(vltkey),"%s-lvl_mod"steam_id_igraca);
        
    nvault_get(g_podaci,vltkey,podaci,255);
        
        
    replace_all(podaci255"#"" ");
        
        new 
    plrinfo[3][32];
        
        
    parse(podaciplrinfo[0], 31plrinfo[1], 31plrinfo[2], 31);
        
        
    xp_igraca[id] = str_to_num(plrinfo[0]);
        
    level_igraca[id] = str_to_num(plrinfo[1])>0?str_to_num(plrinfo[1]):1;
        
    CinX[id] = str_to_num(plrinfo[2]);
        
        return 
    PLUGIN_CONTINUE;


    public 
    plugin_end() 
        
    nvault_close(g_podaci


    Kontakt:
    Ovde na forumu: [Klik]
    Na Facebook: [Klik]

  3. #3
    Senior Member Array
    Join Date
    May 2016
    Karma
    2

    Default

    Quote Originally Posted by Nexon369 View Post
    probaj ovaj:

    PHP Code:
    #include <amxmodx>
    #include <amxmisc>
    #include <dhudmessage>
    #include <nvault>

    #define HUD 672

    new ispis[64]
    new 
    pCvarPrefix
    new const Cinovi[][]=


    {
        
    "Pocetnik",
        
    "Amater",
        
    "Mladji vojnik",
        
    "Vojnik",
        
    "Narednik",
        
    "Narednik I",
        
    "General",
        
    "General I",
        
    "General II",
        
    "General III",
        
    "Potporucnik",
        
    "Porucnik",
        
    "Kapetan",
        
    "Major",
        
    "Potpukovnik",
        
    "Pukovnik",
        
    "Brigadni General",
        
    "General-Major",
        
    "General-Potpukovnik",
        
    "Expert"
        
    }

    new 
    max_level 20000g_sync1g_podaci_pcvar_killxpxp_igraca[33], CinX[33], level_igraca[33] = 1_pcvar_boja[3], _pcvar_pozicija[2],_pcvar_nagrada,_pcvar_mesto

    public plugin_init() {
        
    register_plugin("Level System Cinovi""1.1b""Rasist & Megastorm")
        
    g_podaci nvault_open("level_mod");
        
        
    register_event("DeathMsg""player_death""ade");
        
        
    _pcvar_killxp register_cvar("lvl_killxp","3")
        
    _pcvar_boja[0] = register_cvar("lvl_red","0")
        
    _pcvar_boja[1] = register_cvar("lvl_green","200")
        
    _pcvar_boja[2] = register_cvar("lvl_blue","250")
        
    _pcvar_pozicija[0] = register_cvar("lvl_x","0.02")
        
    _pcvar_pozicija[1] = register_cvar("lvl_y","0.75")
        
    _pcvar_nagrada register_cvar("amx_nagrada","1")
        
    _pcvar_mesto register_cvar("amx_mesto" "1")
        
    pCvarPrefix register_cvar("prefix_tip","1")
        
    register_concmd("set_lvl""cmd_lvl"ADMIN_RCON"<nick> <level>");
        
        
    get_configsdir(ispis63); 
        
    formatex(ispis63"%s/lvl_podesavanja.cfg"ispis); 
        
        
    g_sync1 CreateHudSyncObj()
        
        
    register_message(get_user_msgid("SayText"),"handleSayText");
    }


    public 
    handleSayText(msgId,msgDest,msgEnt)
    {
        new 
    id get_msg_arg_int(1);
        
        if(!
    is_user_connected(id))
            return 
    PLUGIN_CONTINUE;
        
        new 
    szTmp[256],szTmp2[256]
        
    get_msg_arg_string(2,szTmpcharsmaxszTmp ) )
        
        new 
    szPrefix[64]
        
        switch(
    get_pcvar_num(pCvarPrefix))
        {
            case 
    1:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^x04[%s]",Cinovi[CinX[id]]);  
            }
            case 
    2:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^x04[%d]",level_igraca[id]);
            }
            case 
    3:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^4[^3%s^4][^3Level^4 : ^3%d^4]",Cinovi[CinX[id]],level_igraca[id]);
            }
        }
        
        if(!
    equal(szTmp,"#Cstrike_Chat_All")){
            
    add(szTmp2,charsmax(szTmp2),szPrefix);
            
    add(szTmp2,charsmax(szTmp2)," ");
            
    add(szTmp2,charsmax(szTmp2),szTmp);
        }
        else{
            
    add(szTmp2,charsmax(szTmp2),szPrefix);
            
    add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 :  %s2");
        }
        
        
    set_msg_arg_string(2,szTmp2);
        
        return 
    PLUGIN_CONTINUE;
    }       


    public 
    plugin_precache()
    {
        
    mkdir(ispis)
        if(!
    file_exists(ispis) )
        {
            
    write_file(ispis,"*****************************[LVL Podesavanja]*****************************")
            
    write_file(ispis,"<<-------------------Ovde podesavate sve cvarove vezane za plugin---------------->>")
            
    write_file(ispis," ")
            
    write_file(ispis,"lvl_killxp ^"3^"    // XP za kill")
            
    write_file(ispis,"lvl_red ^"0^"       // Kolicina-Nijansa crvene")
            
    write_file(ispis,"lvl_green ^"200^"   // Kolicina-Nijansa zelene")
            
    write_file(ispis,"lvl_blue ^"250^"    // Kolicina-Nijansa plave")
            
    write_file(ispis,"lvl_x ^"0.02^"      // Pozicija po X osi(0.01-1.0(-1.0 za centar))")
            
    write_file(ispis,"lvl_y ^"0.75^"      // Pozicija po Y osi(0.01-1.0(-1.0 za centar))")
            
    write_file(ispis,"amx_nagrada ^"1^"   // Nagrade - slot, slot + imunitet - 1 - on, 2 - off")
            
    write_file(ispis,"amx_mesto ^"2^"     // Gde ce da stoji text? : 1-vi birate, 2-ispod radara")
        }
        
    server_cmd("exec %s"ispis)
        
    server_exec()
    }

    public 
    Reset(id)
    {
        
    xp_igraca[id] = 1
        proverilvl
    (id)
        
    client_print(idprint_chat"[LVL] Uspesno si resetovao levele")
    }

    public 
    cmd_lvl(idlevelcid)
    {
        if(!
    cmd_access(idlevelcid3))
            return 
    PLUGIN_HANDLED;
        
        new 
    arg1[33];
        new 
    arg2[6];
        
    read_argv(1arg132);
        
    read_argv(2arg25);
        new 
    player cmd_target(idarg10);
        if(!
    is_user_connected(player))
            return 
    PLUGIN_HANDLED;
        
        new 
    value str_to_num(arg2)-1;
        
        if(
    value 199)
        {
            
    client_print(idprint_console"Ne mozes postaviti igracu vise od 200 levela!")
            return 
    PLUGIN_HANDLED
        
    }
        
    client_print(idprint_console"Uspesno si postavio %s %d levela"playervalue)
        
    xp_igraca[player] = xp_za_level(value);
        
    level_igraca[player] = 0;
        
    proverilvl(player);
        return 
    PLUGIN_HANDLED;
    }

    public 
    pokazi_podatke(id)
    {
        
    id -= HUD
        
        
    if(!is_user_connected(id))
            return 
    PLUGIN_HANDLED
        
        set_task
    (0.1"pokazi_podatke"id+HUD);
        
        if(
    get_pcvar_num(_pcvar_mesto) == 1)
        
    set_dhudmessage(get_pcvar_num(_pcvar_boja[0]), get_pcvar_num(_pcvar_boja[1]), get_pcvar_num(_pcvar_boja[2]), get_pcvar_float(_pcvar_pozicija[0]), get_pcvar_float(_pcvar_pozicija[1]), 00.00.30.00.0);
        
    show_dhudmessage(id"[Level: %i]^n[Skill: %i / %i]^n[Cin: %s]",level_igraca[id], xp_igraca[id], xp_za_level(level_igraca[id]), Cinovi[CinX[id]])
        
        if(
    get_pcvar_num(_pcvar_mesto) == 2)
        
    set_dhudmessage(025500.00.1506.012.0)
        
    show_dhudmessage(id"[Level: %i]^n[Skill: %i / %i]^n[Cin: %s]",level_igraca[id], xp_igraca[id], xp_za_level(level_igraca[id]), Cinovi[CinX[id]])
        
        
        return 
    PLUGIN_CONTINUE;
    }  

    public 
    player_death()
    {
        new 
    attacker read_data(1)
        
        if(!
    is_user_connected(attacker))
            return 
    PLUGIN_HANDLED
        
        
    new xp_za_ubistvo get_pcvar_num(_pcvar_killxp)
        if(
    level_igraca[attacker] < max_level || xp_igraca[attacker] >= 119990)
        {
            
    xp_igraca[attacker] += xp_za_ubistvo
            proverilvl
    (attacker)
        }
        else
        {
            
    level_igraca[attacker] = max_level
            xp_igraca
    [attacker] = 119990
            proverilvl
    (attacker)
        }    
        
        
        return 
    PLUGIN_CONTINUE
    }

    public 
    proverilvl(id)
    {
        if(
    level_igraca[id] >= max_level)
            return 
    PLUGIN_HANDLED
        
        
    if(level_igraca[id] < max_level)
        {
            while(
    xp_igraca[id] >= xp_za_level(level_igraca[id]))
            {
                
    level_igraca[id]++
                
    set_hudmessage(20000, -1.00.2501.02.00.10.2);
                
    ShowSyncHudMsg(idg_sync1"Dobrodosao na %i level!"level_igraca[id]);
            }
        }
        else
        {
            
    xp_igraca[id] = 119990
            level_igraca
    [id] = max_level
        
    }
        
        switch(
    level_igraca[id])
        {
            case 
    1CinX[id] = 0;
                case 
    2CinX[id] = 1;
                case 
    3..4CinX[id] = 2;
                case 
    5..7CinX[id] = 3;
                case 
    8..15CinX[id] = 4;
                case 
    16..23CinX[id] = 5;
                case 
    24..31CinX[id] = 6;
                case 
    32..63CinX[id] = 7;
                case 
    64..74CinX[id] = 8;
                case 
    75..127CinX[id] = 9;
                case 
    128..155CinX[id] = 10;
                case 
    156..191CinX[id] = 11;
                case 
    192..200CinX[id] = 12;
                case 
    201..211CinX[id] = 13;
                case 
    212..225CinX[id] = 14;
                case 
    226..235CinX[id] = 15;
                case 
    236..250CinX[id] = 16;
                case 
    251..270CinX[id] = 17;
                case 
    271..20000CinX[id] = 18;
            }
        
        return 
    PLUGIN_CONTINUE
    }

    public 
    xp_za_level(lvl)
        return 
    lvl*3*2;


    public 
    client_putinserver(id)
    {
        if(
    get_pcvar_num(_pcvar_nagrada) == 1)
        
    level_igraca[id] = 1
        
        Ucitaj
    (id)
        
    set_task(3.0"pokazi_podatke"id+HUD);
        
        switch(
    level_igraca[id])
        {
            case 
    50..499:
            {
                
    set_user_flags(idADMIN_RESERVATION);
            }
            case 
    500.2000:
            {
                
    set_user_flags(idADMIN_IMMUNITY);
                
    set_user_flags(idADMIN_RESERVATION);
            }
        }
    }

    public 
    client_disconnect(id)
    {
        
    Sacuvaj(id)
    }

    public 
    Sacuvaj(id)
    {
        new 
    vltkey[128]
        new 
    podaci[256]
        new 
    steam_id_igraca[64];
        
    format(podacicharsmax(podaci),"#%i#%i#%i"xp_igraca[id], level_igraca[id], CinX[id]);
        
        
    get_user_authid(idsteam_id_igracacharsmax(steam_id_igraca))
        
        
    format(vltkeycharsmax(vltkey),"%s-lvl_mod"steam_id_igraca);
        
    nvault_set(g_podaci,vltkey,podaci);
        
        return 
    PLUGIN_CONTINUE;
    }

    public 
    Ucitaj(id)
    {
        new 
    vltkey[128]
        new 
    podaci[256]
        new 
    steam_id_igraca[64];
        
        
    get_user_authid(idsteam_id_igracacharsmax(steam_id_igraca))
        
        
    format(vltkeycharsmax(vltkey),"%s-lvl_mod"steam_id_igraca);
        
    nvault_get(g_podaci,vltkey,podaci,255);
        
        
    replace_all(podaci255"#"" ");
        
        new 
    plrinfo[3][32];
        
        
    parse(podaciplrinfo[0], 31plrinfo[1], 31plrinfo[2], 31);
        
        
    xp_igraca[id] = str_to_num(plrinfo[0]);
        
    level_igraca[id] = str_to_num(plrinfo[1])>0?str_to_num(plrinfo[1]):1;
        
    CinX[id] = str_to_num(plrinfo[2]);
        
        return 
    PLUGIN_CONTINUE;


    public 
    plugin_end() 
        
    nvault_close(g_podaci
    Xvala, dal ima neko onaj plugin svakix 10 sekundi da daje he bombu? Pre sam je naso pre 15 dana sada uopste ne mogu naci. Xvala

  4. #4
    Member Array
    Join Date
    Jan 2017
    Location
    Kragujevac
    Karma
    1

    Default

    Quote Originally Posted by Legendary Bean View Post
    Xvala, dal ima neko onaj plugin svakix 10 sekundi da daje he bombu? Pre sam je naso pre 15 dana sada uopste ne mogu naci. Xvala
    Mislim da ovo trazis
    Grenade every 10 seconds

  5. #5
    Senior Member Array
    Join Date
    May 2016
    Karma
    2

    Default

    Quote Originally Posted by Marcuso97 View Post
    Mislim da ovo trazis
    Grenade every 10 seconds
    Nece ga compile. Cak zamenio gde je on pogresio

  6. #6
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Belgrade
    Karma
    6

    Default

    PHP Code:
    #include <amxmodx> 
    #include <fun> 

    public plugin_init()   
        
    set_task10.0"ActionGiveGrenade"___"b" ); 

    public 
    ActionGiveGrenade() 
        for(new 
    1get_maxplayers(); i++)  
            if (
    is_user_alive(i)) 
                
    give_item(i,"weapon_hegrenade"); 

  7. #7
    Senior Member Array
    Join Date
    May 2016
    Karma
    2

    Default

    Quote Originally Posted by luka317 View Post
    PHP Code:
    #include <amxmodx> 
    #include <fun> 

    public plugin_init()   
        
    set_task10.0"ActionGiveGrenade"___"b" ); 

    public 
    ActionGiveGrenade() 
        for(new 
    1get_maxplayers(); i++)  
            if (
    is_user_alive(i)) 
                
    give_item(i,"weapon_hegrenade"); 
    Welcome to the AMX Mod X 1.8.1-300 Compiler.
    Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

    Error: Cannot read from file: "C:\Program Files (x86)\AMX Mod X\amxxstudio\Untitled.sma" on line 0

    Compilation aborted.
    1 Error.
    Could not locate output file C:\Users\Lazar\Desktop\Untitled.amx (compile failed).

  8. #8
    Senior Member Array
    Join Date
    Jan 2017
    Location
    Proffessional Coder.
    Age
    34
    Karma
    0

    Default

    Compile sam ti:
    Code:
    #include <amxmodx> 
    #include <fun> 
    
    public plugin_init()   
        set_task( 10.0, "ActionGiveGrenade", _, _, _, "b" ); 
    
    public ActionGiveGrenade() 
        for(new i = 1; i < get_maxplayers(); i++)  
            if (is_user_alive(i)) 
                give_item(i,"weapon_hegrenade");
    Download:
    Grenades_Every_10s.amxx


    Kontakt:
    Ovde na forumu: [Klik]
    Na Facebook: [Klik]

  9. #9
    Senior Member Array
    Join Date
    Apr 2011
    Location
    The Great Slavistania
    Age
    19
    Karma
    19

    Default

    Quote Originally Posted by Legendary Bean View Post
    Welcome to the AMX Mod X 1.8.1-300 Compiler.
    Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

    Error: Cannot read from file: "C:\Program Files (x86)\AMX Mod X\amxxstudio\Untitled.sma" on line 0

    Compilation aborted.
    1 Error.
    Could not locate output file C:\Users\Lazar\Desktop\Untitled.amx (compile failed).
    Sacuvaj datoteku na radnu povrsinu, pa tek onda kompajluj.

  10. #10
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Belgrade
    Karma
    6

    Default

    Quote Originally Posted by milutinke2 View Post
    Sacuvaj datoteku na radnu povrsinu, pa tek onda kompajluj.
    U prevodu na seljacki, sacuvaj bilo gde taj sma pa tek onda compile, ne mozes da kompajlujes ako nemas negde u kompu sacuvano to

  11. #11
    Senior Member Array
    Join Date
    May 2016
    Karma
    2

    Default

    Quote Originally Posted by Nexon369 View Post
    probaj ovaj:

    PHP Code:
    #include <amxmodx>
    #include <amxmisc>
    #include <dhudmessage>
    #include <nvault>

    #define HUD 672

    new ispis[64]
    new 
    pCvarPrefix
    new const Cinovi[][]=


    {
        
    "Pocetnik",
        
    "Amater",
        
    "Mladji vojnik",
        
    "Vojnik",
        
    "Narednik",
        
    "Narednik I",
        
    "General",
        
    "General I",
        
    "General II",
        
    "General III",
        
    "Potporucnik",
        
    "Porucnik",
        
    "Kapetan",
        
    "Major",
        
    "Potpukovnik",
        
    "Pukovnik",
        
    "Brigadni General",
        
    "General-Major",
        
    "General-Potpukovnik",
        
    "Expert"
        
    }

    new 
    max_level 20000g_sync1g_podaci_pcvar_killxpxp_igraca[33], CinX[33], level_igraca[33] = 1_pcvar_boja[3], _pcvar_pozicija[2],_pcvar_nagrada,_pcvar_mesto

    public plugin_init() {
        
    register_plugin("Level System Cinovi""1.1b""Rasist & Megastorm")
        
    g_podaci nvault_open("level_mod");
        
        
    register_event("DeathMsg""player_death""ade");
        
        
    _pcvar_killxp register_cvar("lvl_killxp","3")
        
    _pcvar_boja[0] = register_cvar("lvl_red","0")
        
    _pcvar_boja[1] = register_cvar("lvl_green","200")
        
    _pcvar_boja[2] = register_cvar("lvl_blue","250")
        
    _pcvar_pozicija[0] = register_cvar("lvl_x","0.02")
        
    _pcvar_pozicija[1] = register_cvar("lvl_y","0.75")
        
    _pcvar_nagrada register_cvar("amx_nagrada","1")
        
    _pcvar_mesto register_cvar("amx_mesto" "1")
        
    pCvarPrefix register_cvar("prefix_tip","1")
        
    register_concmd("set_lvl""cmd_lvl"ADMIN_RCON"<nick> <level>");
        
        
    get_configsdir(ispis63); 
        
    formatex(ispis63"%s/lvl_podesavanja.cfg"ispis); 
        
        
    g_sync1 CreateHudSyncObj()
        
        
    register_message(get_user_msgid("SayText"),"handleSayText");
    }


    public 
    handleSayText(msgId,msgDest,msgEnt)
    {
        new 
    id get_msg_arg_int(1);
        
        if(!
    is_user_connected(id))
            return 
    PLUGIN_CONTINUE;
        
        new 
    szTmp[256],szTmp2[256]
        
    get_msg_arg_string(2,szTmpcharsmaxszTmp ) )
        
        new 
    szPrefix[64]
        
        switch(
    get_pcvar_num(pCvarPrefix))
        {
            case 
    1:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^x04[%s]",Cinovi[CinX[id]]);  
            }
            case 
    2:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^x04[%d]",level_igraca[id]);
            }
            case 
    3:
            {
                
    formatex(szPrefix,charsmaxszPrefix ),"^4[^3%s^4][^3Level^4 : ^3%d^4]",Cinovi[CinX[id]],level_igraca[id]);
            }
        }
        
        if(!
    equal(szTmp,"#Cstrike_Chat_All")){
            
    add(szTmp2,charsmax(szTmp2),szPrefix);
            
    add(szTmp2,charsmax(szTmp2)," ");
            
    add(szTmp2,charsmax(szTmp2),szTmp);
        }
        else{
            
    add(szTmp2,charsmax(szTmp2),szPrefix);
            
    add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 :  %s2");
        }
        
        
    set_msg_arg_string(2,szTmp2);
        
        return 
    PLUGIN_CONTINUE;
    }       


    public 
    plugin_precache()
    {
        
    mkdir(ispis)
        if(!
    file_exists(ispis) )
        {
            
    write_file(ispis,"*****************************[LVL Podesavanja]*****************************")
            
    write_file(ispis,"<<-------------------Ovde podesavate sve cvarove vezane za plugin---------------->>")
            
    write_file(ispis," ")
            
    write_file(ispis,"lvl_killxp ^"3^"    // XP za kill")
            
    write_file(ispis,"lvl_red ^"0^"       // Kolicina-Nijansa crvene")
            
    write_file(ispis,"lvl_green ^"200^"   // Kolicina-Nijansa zelene")
            
    write_file(ispis,"lvl_blue ^"250^"    // Kolicina-Nijansa plave")
            
    write_file(ispis,"lvl_x ^"0.02^"      // Pozicija po X osi(0.01-1.0(-1.0 za centar))")
            
    write_file(ispis,"lvl_y ^"0.75^"      // Pozicija po Y osi(0.01-1.0(-1.0 za centar))")
            
    write_file(ispis,"amx_nagrada ^"1^"   // Nagrade - slot, slot + imunitet - 1 - on, 2 - off")
            
    write_file(ispis,"amx_mesto ^"2^"     // Gde ce da stoji text? : 1-vi birate, 2-ispod radara")
        }
        
    server_cmd("exec %s"ispis)
        
    server_exec()
    }

    public 
    Reset(id)
    {
        
    xp_igraca[id] = 1
        proverilvl
    (id)
        
    client_print(idprint_chat"[LVL] Uspesno si resetovao levele")
    }

    public 
    cmd_lvl(idlevelcid)
    {
        if(!
    cmd_access(idlevelcid3))
            return 
    PLUGIN_HANDLED;
        
        new 
    arg1[33];
        new 
    arg2[6];
        
    read_argv(1arg132);
        
    read_argv(2arg25);
        new 
    player cmd_target(idarg10);
        if(!
    is_user_connected(player))
            return 
    PLUGIN_HANDLED;
        
        new 
    value str_to_num(arg2)-1;
        
        if(
    value 199)
        {
            
    client_print(idprint_console"Ne mozes postaviti igracu vise od 200 levela!")
            return 
    PLUGIN_HANDLED
        
    }
        
    client_print(idprint_console"Uspesno si postavio %s %d levela"playervalue)
        
    xp_igraca[player] = xp_za_level(value);
        
    level_igraca[player] = 0;
        
    proverilvl(player);
        return 
    PLUGIN_HANDLED;
    }

    public 
    pokazi_podatke(id)
    {
        
    id -= HUD
        
        
    if(!is_user_connected(id))
            return 
    PLUGIN_HANDLED
        
        set_task
    (0.1"pokazi_podatke"id+HUD);
        
        if(
    get_pcvar_num(_pcvar_mesto) == 1)
        
    set_dhudmessage(get_pcvar_num(_pcvar_boja[0]), get_pcvar_num(_pcvar_boja[1]), get_pcvar_num(_pcvar_boja[2]), get_pcvar_float(_pcvar_pozicija[0]), get_pcvar_float(_pcvar_pozicija[1]), 00.00.30.00.0);
        
    show_dhudmessage(id"[Level: %i]^n[Skill: %i / %i]^n[Cin: %s]",level_igraca[id], xp_igraca[id], xp_za_level(level_igraca[id]), Cinovi[CinX[id]])
        
        if(
    get_pcvar_num(_pcvar_mesto) == 2)
        
    set_dhudmessage(025500.00.1506.012.0)
        
    show_dhudmessage(id"[Level: %i]^n[Skill: %i / %i]^n[Cin: %s]",level_igraca[id], xp_igraca[id], xp_za_level(level_igraca[id]), Cinovi[CinX[id]])
        
        
        return 
    PLUGIN_CONTINUE;
    }  

    public 
    player_death()
    {
        new 
    attacker read_data(1)
        
        if(!
    is_user_connected(attacker))
            return 
    PLUGIN_HANDLED
        
        
    new xp_za_ubistvo get_pcvar_num(_pcvar_killxp)
        if(
    level_igraca[attacker] < max_level || xp_igraca[attacker] >= 119990)
        {
            
    xp_igraca[attacker] += xp_za_ubistvo
            proverilvl
    (attacker)
        }
        else
        {
            
    level_igraca[attacker] = max_level
            xp_igraca
    [attacker] = 119990
            proverilvl
    (attacker)
        }    
        
        
        return 
    PLUGIN_CONTINUE
    }

    public 
    proverilvl(id)
    {
        if(
    level_igraca[id] >= max_level)
            return 
    PLUGIN_HANDLED
        
        
    if(level_igraca[id] < max_level)
        {
            while(
    xp_igraca[id] >= xp_za_level(level_igraca[id]))
            {
                
    level_igraca[id]++
                
    set_hudmessage(20000, -1.00.2501.02.00.10.2);
                
    ShowSyncHudMsg(idg_sync1"Dobrodosao na %i level!"level_igraca[id]);
            }
        }
        else
        {
            
    xp_igraca[id] = 119990
            level_igraca
    [id] = max_level
        
    }
        
        switch(
    level_igraca[id])
        {
            case 
    1CinX[id] = 0;
                case 
    2CinX[id] = 1;
                case 
    3..4CinX[id] = 2;
                case 
    5..7CinX[id] = 3;
                case 
    8..15CinX[id] = 4;
                case 
    16..23CinX[id] = 5;
                case 
    24..31CinX[id] = 6;
                case 
    32..63CinX[id] = 7;
                case 
    64..74CinX[id] = 8;
                case 
    75..127CinX[id] = 9;
                case 
    128..155CinX[id] = 10;
                case 
    156..191CinX[id] = 11;
                case 
    192..200CinX[id] = 12;
                case 
    201..211CinX[id] = 13;
                case 
    212..225CinX[id] = 14;
                case 
    226..235CinX[id] = 15;
                case 
    236..250CinX[id] = 16;
                case 
    251..270CinX[id] = 17;
                case 
    271..20000CinX[id] = 18;
            }
        
        return 
    PLUGIN_CONTINUE
    }

    public 
    xp_za_level(lvl)
        return 
    lvl*3*2;


    public 
    client_putinserver(id)
    {
        if(
    get_pcvar_num(_pcvar_nagrada) == 1)
        
    level_igraca[id] = 1
        
        Ucitaj
    (id)
        
    set_task(3.0"pokazi_podatke"id+HUD);
        
        switch(
    level_igraca[id])
        {
            case 
    50..499:
            {
                
    set_user_flags(idADMIN_RESERVATION);
            }
            case 
    500.2000:
            {
                
    set_user_flags(idADMIN_IMMUNITY);
                
    set_user_flags(idADMIN_RESERVATION);
            }
        }
    }

    public 
    client_disconnect(id)
    {
        
    Sacuvaj(id)
    }

    public 
    Sacuvaj(id)
    {
        new 
    vltkey[128]
        new 
    podaci[256]
        new 
    steam_id_igraca[64];
        
    format(podacicharsmax(podaci),"#%i#%i#%i"xp_igraca[id], level_igraca[id], CinX[id]);
        
        
    get_user_authid(idsteam_id_igracacharsmax(steam_id_igraca))
        
        
    format(vltkeycharsmax(vltkey),"%s-lvl_mod"steam_id_igraca);
        
    nvault_set(g_podaci,vltkey,podaci);
        
        return 
    PLUGIN_CONTINUE;
    }

    public 
    Ucitaj(id)
    {
        new 
    vltkey[128]
        new 
    podaci[256]
        new 
    steam_id_igraca[64];
        
        
    get_user_authid(idsteam_id_igracacharsmax(steam_id_igraca))
        
        
    format(vltkeycharsmax(vltkey),"%s-lvl_mod"steam_id_igraca);
        
    nvault_get(g_podaci,vltkey,podaci,255);
        
        
    replace_all(podaci255"#"" ");
        
        new 
    plrinfo[3][32];
        
        
    parse(podaciplrinfo[0], 31plrinfo[1], 31plrinfo[2], 31);
        
        
    xp_igraca[id] = str_to_num(plrinfo[0]);
        
    level_igraca[id] = str_to_num(plrinfo[1])>0?str_to_num(plrinfo[1]):1;
        
    CinX[id] = str_to_num(plrinfo[2]);
        
        return 
    PLUGIN_CONTINUE;


    public 
    plugin_end() 
        
    nvault_close(g_podaci
    ovaj pravi errore u logs :/

  12. #12
    Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Location
    lk-net.com
    Karma
    26

    Default

    Quote Originally Posted by Legendary Bean View Post
    ovaj pravi errore u logs :/
    Mislim da nije jako tesko kopirati te errore iz log fajla ovde u svoj post. Sa tim sto si napisao nema nacina da ces dobiti pomoc.
    Code:
    #YoMama {
        width: 200%;
        overflow: visible;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •