Results 1 to 2 of 2

Thread: Vip system

  1. #1
    Zastavnik
    Join Date
    May 2012
    Posts
    20
    Karma
    0

    Vip system

    Pozdrav..
    Da li neko hoce i ima volje jedan plugin da mi uradi, a da je free?
    Hteo bi plugin da bude tipa vip sistema i da sadrzi sledece
    Komanda /vips za vip online
    Da reklamira na svakih 60sec o kupovini vipa "Cena VIP-a je 1xBOOST,say: /fb" u collor chatu
    Vip nevidljivost kada ima noz nekih 50%
    Zoom za ak47 i m4a1
    Moze i ne mora no recoil,neki blagi
    U pitanju je DM mod
    Hvala

  2. #2
    Zastavnik
    Join Date
    Apr 2013
    Location
    Serbia
    Age
    25
    Posts
    20
    Karma
    7

    Re: Vip system

    Quote Originally Posted by Zorzikic View Post
    Pozdrav..
    Da li neko hoce i ima volje jedan plugin da mi uradi, a da je free?
    Hteo bi plugin da bude tipa vip sistema i da sadrzi sledece
    Komanda /vips za vip online
    Da reklamira na svakih 60sec o kupovini vipa "Cena VIP-a je 1xBOOST,say: /fb" u collor chatu
    Vip nevidljivost kada ima noz nekih 50%
    Zoom za ak47 i m4a1
    Moze i ne mora no recoil,neki blagi
    U pitanju je DM mod
    Hvala
    Code:
    #include <amxmodx>
    #include <fun>
    #include <cstrike>
    #include <fakemeta>
    #include <engine>
    #include <hamsandwich>
    #include <colorchat>
    
    #define PLUGIN "Deathmatch Vip Advanced"
    #define VERSION "1.0"
    #define AUTHOR "AMD(Pozajmljen shop i Multijump iz COD Mod-a)"
    
    new g_msg_screenfade;
    
    
    new const maxAmmo[31]={0,52,0,90,1,32,1,100,90,1,120,100,100,90,90,90,100,120,30,120,200,32,90,120,90,2,35,90,90,0,100};
    
    new broj_skokova_igraca[33];
    new bool:freezetime = true;
    new ImaZoom[33]
    new cena2
    
    public plugin_init() 
    {
        register_plugin(PLUGIN, VERSION, AUTHOR);
        
        RegisterHam(Ham_TakeDamage, "player", "OstecenIgrac");
        RegisterHam(Ham_Spawn, "player", "spawned", 1)
        register_forward(FM_CmdStart, "CmdStart");
        register_forward(FM_EmitSound, "EmitSound");
        
        register_event("Damage", "Damage", "b", "2!=0");
        register_event("CurWeapon","CurWeapon","be", "1=1");
        register_clcmd("say /kupi", "Shop");
        register_clcmd("say /cena", "cena");
        cena2 = register_cvar("amx_cena","2")
        
        g_msg_screenfade = get_user_msgid("ScreenFade");
    }
    
    public spawned(id)
    {
        set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 255)
    }
    
    public plugin_cfg() 
    {    
        server_cmd("sv_maxspeed 9999");
    }
    
    public CmdStart(id, uc_handle)
    {
        if(!is_user_alive(id))
            return FMRES_IGNORED;
        
        new button = get_uc(uc_handle, UC_Buttons);
        new flags = pev(id, pev_flags);
        new oldbutton = pev(id, pev_oldbuttons);
        
        if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && broj_skokova_igraca[id] > 0)
        {
            broj_skokova_igraca[id]--;
            new Float:velocity[3];
            pev(id, pev_velocity,velocity);
            velocity[2] = random_float(265.0,285.0);
            set_pev(id, pev_velocity,velocity);
        }
        else if(get_user_flags(id) & ADMIN_LEVEL_H)
        {
            if(flags & FL_ONGROUND)
            {    
                broj_skokova_igraca[id] = 0;
                if(is_user_alive(id))
                    broj_skokova_igraca[id]++;
            }
        }
        if(button & IN_ATTACK && get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new Float:punchangle[3];
            new weapon = get_user_weapon(id)
            if(weapon == CSW_AK47 || weapon == CSW_M4A1 || weapon == CSW_M249)
            {
                set_pev(id, pev_punchangle, punchangle);
                for(new i=0; i<3;i++) 
                    punchangle[i]*=0.9;
                set_pev(id, pev_punchangle, punchangle);
            }
        }
        
        if(get_user_flags(id) & ADMIN_RCON)
        {
            if(button & IN_DUCK)
            {
                set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 8)
            }
            else
            {
                set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255)
            }
        }
        
        if(button & IN_ATTACK2 && !(pev(id, pev_oldbuttons) & IN_ATTACK2) && get_user_flags(id) & ADMIN_RCON)
        {
            new weapon= get_user_weapon(id)
            
            if(weapon == CSW_AK47 && !ImaZoom[id])
            {
                ImaZoom[id] = true;
                cs_set_user_zoom(id, CS_SET_FIRST_ZOOM, 1);
                emit_sound(id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100);
            }
            
            else if (ImaZoom[id])
            {
                ImaZoom[id] = false;
                cs_set_user_zoom(id, CS_RESET_ZOOM, 0);
            }
        }
        if(get_user_flags(id) & ADMIN_LEVEL_H)
        {
            if(button & IN_JUMP && button & IN_DUCK && flags & FL_ONGROUND && get_gametime() > 4.0)
            {
                new Float:velocity[3];
                VelocityByAim(id, 700, velocity);
                velocity[2] = random_float(265.0,285.0);
                set_pev(id, pev_velocity, velocity);
            }
        }
        return FMRES_IGNORED;
    }
    
    public Pocetak(id)
    {
        if(!is_user_alive(id) || !is_user_connected(id))
            return PLUGIN_CONTINUE;        
        new weapons[32];
        new weaponsnum;
        get_user_weapons(id, weapons, weaponsnum);
        for(new i=0; i<weaponsnum; i++)
            if(is_user_alive(id))
            if(maxAmmo[weapons[i]] > 0)
            cs_set_user_bpammo(id, weapons[i], maxAmmo[weapons[i]]);
        
        PostaviAtribute(id)
        
        return PLUGIN_CONTINUE;
    }
    
    public PostaviAtribute(id)
    {
        set_user_health(id,100);
    }
    
    public OstecenIgrac(this, idinflictor, idattacker, Float:damage, damagebits)
    {
        if(!is_user_alive(this) || !is_user_connected(this) || !is_user_connected(idattacker) || get_user_team(this) == get_user_team(idattacker))
            return HAM_IGNORED;
        
        new health = get_user_health(this);
        new weapon = get_user_weapon(idattacker);
        
        if(health < 2)
            return HAM_IGNORED;
        
        if(weapon == CSW_AWP)
            damage=float(health);
        
        if(get_user_flags(idattacker) && ADMIN_LEVEL_H)
            damage+=100;
        
        if((weapon = CSW_DEAGLE))
            damage = float(health);
        
        return PLUGIN_CONTINUE
    }
    
    public Damage(id)
    {
        new attacker = get_user_attacker(id);
        if(!is_user_alive(attacker) || !is_user_connected(attacker) || id == attacker )
            return PLUGIN_CONTINUE;
        
        if(get_user_flags(id) && ADMIN_LEVEL_H)
            Display_Fade(id,1<<14,1<<14 ,1<<16,0,200,250,230);
        
        return PLUGIN_CONTINUE;
    }
    
    public Death()
    {
        new id = read_data(2);
        new attacker = read_data(1);
        new hp = get_user_health(attacker)
        
        if(!is_user_alive(attacker) || !is_user_connected(attacker))
            return PLUGIN_CONTINUE;
        
        
        if(get_user_team(attacker) != get_user_team(id))
        {
            set_user_health(attacker, hp + 25)
        }
        return PLUGIN_CONTINUE;
    }
    
    public CurWeapon(id)
    {
        if(freezetime)
            return PLUGIN_CONTINUE;
        
        new weapons[32];
        new weaponsnum;
        get_user_weapons(id, weapons, weaponsnum);
        for(new i=0; i<weaponsnum; i++)
            if(is_user_alive(id))
            if(maxAmmo[weapons[i]] > 0)
            cs_set_user_bpammo(id, weapons[i], maxAmmo[weapons[i]]);
        
        return PLUGIN_CONTINUE;
    }
    
    
    stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha)
    {
        message_begin( MSG_ONE, g_msg_screenfade,{0,0,0},id );
        write_short( duration );    // Duration of fadeout
        write_short( holdtime );    // Hold time of color
        write_short( fadetype );    // Fade type
        write_byte ( red );        // Red
        write_byte ( green );        // Green
        write_byte ( blue );        // Blue
        write_byte ( alpha );    // Alpha
        message_end();
    }
    
    
    public plugin_precache()
    {    
        precache_sound("amd/belch.wav")
        precache_sound("amd/chipsy.wav")
    }
    
    public podrigni(id)
    {
        client_cmd(id, "spk amd/belch")
    }
    public Shop(id)
    {
        if(get_user_flags(id) & ADMIN_LEVEL_H)
        {
            new menu = menu_create("Shop:", "Shop_Handle");
            menu_additem(menu, "Mars [Dodaje 15 HP] Cena: 1500$");
            menu_additem(menu, "Chipsy [Dodaje 45 HP] Cena: 3000$");
            menu_additem(menu, "Pivo [Dodaje 125 HP] Cena: 5000$");
            menu_additem(menu, "Nevidljivost Cena: 10000$");
            menu_additem(menu, "Mix dodataka Cena: 12000$");
            menu_display(id, menu);
        }
        else 
        {
            ColorChat(id,NORMAL,"^3[Deathmatch Vip]^4 Nazalost nisi Vip,ali uvek mozes da kupis Vip status");
            ColorChat(id,NORMAL,"^3[Deathmatch Vip]^4 Da saznas koja je cena Vip statusa,say: /cena");
        }
    }
    public cena(id)
    {
        ColorChat(id,NORMAL,"^3[Deathmatch Vip]^4 Cena je %i eura", get_pcvar_num(cena2));
    }
    public Shop_Handle(id, menu, item) 
    {    
        if(item == MENU_EXIT)
        {
            menu_destroy(menu);
            return PLUGIN_CONTINUE;
        }
        menu_display(id, menu);
        new hp = get_user_health(id);
        new pare_igraca = cs_get_user_money(id);
        switch(item) 
        { 
            case 0:
            {
                new cena = 1500;
                if (pare_igraca<cena)
                {
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Nemas dovoljno para.");
                    return PLUGIN_CONTINUE;
                }
                else
                {
                    new ammount=20;
                    new nova_energija = hp+ammount;
                    set_user_health(id, nova_energija);
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1kupio si ^3Mars");
                    cs_set_user_money(id, pare_igraca-cena);
                    menu_destroy(menu);
                }
            }
            case 1:
            {
                new cena = 3000;
                if (pare_igraca<cena)
                {
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Nemas dovoljno para.");
                    return PLUGIN_CONTINUE;
                }
                else
                {
                    new ammount=50;
                    new nova_energija = hp+ammount
                    client_cmd(id, "spk amd/chipsy")
                    set_user_health(id, nova_energija)
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Kupio si^3 Chipsy");
                    cs_set_user_money(id, pare_igraca-cena);
                    menu_destroy(menu);
                }
            }
            case 2:
            {
                new cena = 5000;
                if (pare_igraca<cena)
                {
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Nemas dovoljno para.");
                    return PLUGIN_CONTINUE;
                }
                else
                {
                    new ammount=100;
                    new nova_energija = hp+ammount
                    set_user_health(id, nova_energija);
                    set_task(2.0, "podrigni")
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Kupio si^3 Pivo");
                    cs_set_user_money(id, pare_igraca-cena);
                    menu_destroy(menu);
                }
            }
            case 3:
            {
                new cena = 10000;
                if (pare_igraca<cena)
                {
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Nemas dovoljno para.");
                    return PLUGIN_CONTINUE;
                }
                else
                {
                    set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 10);
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Kupio si^3 Nevidljivost");
                    cs_set_user_money(id, pare_igraca-cena);
                    menu_destroy(menu);
                }
            }
            case 4:
            {
                new cena = 12000;
                if (pare_igraca<cena)
                {
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Nemas dovoljno para.");
                    return PLUGIN_CONTINUE;
                }
                else
                {
                    new ammount=100;
                    new nova_energija = hp+ammount
                    set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 10);
                    set_user_health(id, nova_energija);
                    ColorChat(id,GREEN,"[Deathmatch Vip] ^1Kupio si^3 Mix Dodataka");
                    cs_set_user_money(id, pare_igraca-cena);
                    menu_destroy(menu);
                }
            }
        }
        return PLUGIN_CONTINUE;
    }
    Last edited by GaMeR FoReVeR; 09.05.17 at 14:43. Reason: Code tag

Posting Permissions

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