←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
Klasa nie wyświetla się we frakcji. czyt....

  • +
  • -
Paradise. - zdjęcie Paradise. 12.07.2014

Proszę o sprawdzenie tej klasy bo nie wyswietla mi sie we frakcji "klasy Mega Premium" i o ew. dopisanie czegoś. Frakcje mam w cod_frakcje

 

Tutaj jest .sma klasy

 

Wklejka 13oathsn273m(general) dodana przez Paradise., 12.07.2014 20:42
1.
2.
3.
4.
5.
6.
7.
8.
#include <amxmodx>
#include <amxmisc>
#include <codmod_frakcje>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
 
new const nazwa[]   = "General";
new const opis[]    = "Ma 1/2 z awp, obra
	

Odpowiedz

GranSki!pl - zdjęcie GranSki!pl 12.07.2014

#include <amxmodx>
#include <amxmisc>
#include <codmod_frakcje>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
 
new const nazwa[] = "General";
new const opis[] = "Ma 1/2 z awp, obra�enia z m4 zwi�kszone o 5 dmg.";
new const bronie = (1<<CSW_AWP)|(1<<CSW_M4A1)|(1<<CSW_DEAGLE);
new const zdrowie = 15;
new const kondycja = 5;
new const inteligencja = 0;
new const wytrzymalosc = 15;
 
new const frakcja[] = "MegaPremium";
new ma_klase[33];
 
public plugin_init()
{
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
RegisterHam(Ham_TakeDamage, "player", "TakeDamage2");
    register_plugin(nazwa, "1.0", "Veteran");
 
    cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc, 0 ,frakcja);
}
 
public cod_class_enabled(id)
{
    if(!(get_user_flags(id) & ADMIN_LEVEL_H))
    {
        client_print(id, print_chat, "[General] Nie masz uprawnien, aby uzywac tej klasy.")
        return COD_STOP;
    }
ma_klase[id] = true;
    return COD_CONTINUE;
 
}
 
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
 
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_AWP && damage > 20.0 && random_num(1,2) == 1)
    cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
 
}
 
return HAM_IGNORED;
}
public TakeDamage2(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
 
if(!ma_klase[idattacker])
return HAM_IGNORED;
 
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_M4A1 && damagebits & DMG_BULLET)
 
cod_inflict_damage(idattacker, this, 5.0, 0.0, idinflictor, damagebits);
 
 
 
return HAM_IGNORED;
 
}

Odpowiedz

  • +
  • -
Alelluja - zdjęcie Alelluja 13.07.2014

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

#define DMG_BULLET (1<<1)

new const nazwa[]   = "General";
new const opis[]    = "Ma 1/2 z awp, obrazenia z m4 zwiekszone o 5 dmg.";
new const bronie    = (1<<CSW_AWP)|(1<<CSW_M4A1)|(1<<CSW_DEAGLE);
new const zdrowie   = 15;
new const kondycja  = 5;
new const inteligencja = 0;
new const wytrzymalosc = 15;

new ma_klase[33];

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

public cod_class_enabled(id)
{
    if(!(get_user_flags(id) & ADMIN_LEVEL_H))
    {
        client_print(id, print_chat, "[General] Nie masz uprawnien, aby uzywac tej klasy.")
        return COD_STOP;
    }
    ma_klase[id] = true;
    return COD_CONTINUE;
    
}

public cod_class_disabled(id)
{
    ma_klase[id] = false;
}

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_AWP && damage > 20.0 && random_num(1,2) == 1)
            cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
        
        if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_M4A1 && damagebits & DMG_BULLET)
            cod_inflict_damage(idattacker, this, 5.0, 0.0, idinflictor, damagebits);
        
    }
    
    return HAM_IGNORED;
}

 
 
Aha i jak masz w cod_frakcje to wpisz tak

 

[klasa]General[frakcja]Klasy MegaPremium


Użytkownik Alelluja edytował ten post 13.07.2014 18:08
Odpowiedz