[ZP] Extra Item: Sweet Revenge

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
Rainq
Manager ZM
Manager ZM
Posts: 2587
Joined: 21 Jul 2015, 18:50
Detinator Steam: Da
CS Status: Busy
Detinator server CS: ---
Reputatie: Fost moderator
Manager ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucuresti
Been thanked: 10 times
Contact:

19 Feb 2019, 17:17

Descriere: Acest iteam cand il cumparati daca un om va omoara acel om o sa fie ucis de propria arma.


Descarcare:
| Afiseaza codul
#include <amxmodx> 
#include <fun> 
#include <zombieplague> 

new bool:g_bHasItem[33]; 
new g_itemid, cvar_enable, g_maxplayers; 

// Item Cost 
#define COST 20 

public plugin_init()  
{ 
    register_plugin("[ZP] Extra Item: Sweet Revenge", "1.1", "CapoStrike") 
    g_itemid = zp_register_extra_item("Sweet Revenge (If you die, the killer also dies)", COST, ZP_TEAM_ZOMBIE) 
    g_maxplayers = get_maxplayers(); 
    cvar_enable = register_cvar("zp_sweet_revenge", "1") 
    register_event("DeathMsg", "player_die", "a") 
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0") 
} 

public zp_extra_item_selected(player, itemid) { 
    if (itemid == g_itemid)  
    { 
        if(!get_pcvar_num(cvar_enable)) 
        { 
            zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player) + COST) 
            client_print(player, print_chat, "[ZP] Sorry, this item has been disabled.") 
        } else { 
            set_user_rendering(player, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20)  
            g_bHasItem[player] = true 
            client_print(player, print_chat, "[ZP] If you die, the killer also dies !!!") 
        } 
    } 
} 

public player_die()  
{ 
    new attacker = read_data(1) 
    new victim = read_data(2) 
    if(g_bHasItem[victim])  
    { 
        static victim_name[33] 
        static attacker_name[33] 
        get_user_name(victim, victim_name, sizeof victim_name -1) 
        get_user_name(attacker, attacker_name, sizeof attacker_name -1) 
        user_kill(attacker) 
        server_print("[ZP] %s was %s who die too !!!", victim_name, attacker_name) 
        g_bHasItem[victim] = false 
    } 
     
    return PLUGIN_CONTINUE 
} 

public client_putinserver( id ) { 
    g_bHasItem[id] = false 
} 

public client_disconnect( id ) { 
    g_bHasItem[id] = false 
} 

// Round Starting 
public event_round_start() { 
    for( new i = 1; i <= g_maxplayers; i++ ) { 
        if( is_user_connected( i ) ) 
            g_bHasItem = false; 
    } 
}


Nume: [ZP] Extra Item: Sweet Revenge
Versiune: -
Link oficial: click


Instalare:
1. Fisierul zp_extra_sweet_revenge.sma il puneti in addons/amxmodx/scripting
2. Fisierul zp_extra_sweet_revenge.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins-zplague.ini si adaugati la urma:

Code: Select all

zp_extra_sweet_revenge.amxx
4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
zp_sweet_revenge 1 (sau 0 daca vrei sa dezactivezi)


Imagini: -
RETRAS
Image
Leul si tigru sunt mai puternici ca lupul,dar lupul la circ nu participa.
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests