←  Prośby o Klasę/Perk

AMXX.pl: Support AMX Mod X i SourceMod

»

Klasa
Klasa Deaglowy Kozak

TerminatorPL - zdjęcie TerminatorPL 17.07.2014

Proszę o klasę Deaglowy Kozak

Inteligencja: 20

Zdrowie: 10

Wytrzymałość: 0

Kondycja: 20

Bronie: he,usp,deagle

Opis klasy: 1/4 z deagl'a

 

Odpowiedz

  • +
  • -
Alelluja - zdjęcie Alelluja 17.07.2014

Proszę

 

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fun>
#include <hamsandwich>

#define DMG_BULLET (1<<1)

new const nazwa[]   = "Deaglowy Kozak";
new const opis[]    = "1/4 z deagl'a";
new const bronie    = (1<<CSW_HEGRENADE)|(1<<CSW_USP)|(1<<CSW_DEAGLE);
new const zdrowie   = 20;
new const kondycja  = 20;
new const inteligencja = 10;
new const wytrzymalosc = 0;

new ma_klase[33];

public plugin_init()
{
    register_plugin(nazwa, "1.0", "Alelluja");
    
    cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
    
    RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}

public cod_class_enabled(id)
{
    give_item(id, "weapon_hegrenade");
    
}

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
    if(!is_user_connected(idattacker))
        return HAM_IGNORED;
    
    if(!ma_klase[idattacker])
        return HAM_IGNORED;
    
    if(damagebits & DMG_BULLET)
    {
        new weapon = get_user_weapon(idattacker);
        
        if(weapon == CSW_DEAGLE && damage > 20.0 && random_num(1,4) == 1)
            cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
        
    }
    
    return HAM_IGNORED;
}

Odpowiedz