←  Prośby o Klasę/Perk

AMXX.pl: Support AMX Mod X i SourceMod

»

Klasa
Proszę o Klasę "Komandos" i "N...

  • +
  • -
SevSon- - zdjęcie SevSon- 20.04.2014

Nazwa klasy: Komandos

Inteligencja: 0

Zycie: 30

Wytrzymalosc: 0

Kondycja: 60

Bronie: deagle

Opis: Natychmiastowe zabicie z noza (PPM), 2 skoki

// uwaga bo te 1/1 z kosy w generatorze jest zbugowane

 

 

Nazwa klasy: Nozownik (45lvl)

Inteligencja: 0

Zycie: 20

Wytrzymalosc: 0

Kondycja: 30

Bronie: usp

Opis: Jest niewidzialny na nozu oraz 1/3 z niego(PPM)

 

/// Widocznosc klasy ma byc 5 . Klasa ma byc lvl'owa (dostepna od 45 lvl)

 

 

 

 

Z gory dzięki ;)

Odpowiedz

  • +
  • -
BlanciK THC - zdjęcie BlanciK THC 21.04.2014

Łap

 

Nożownik

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

#define DMG_BULLET (1<<1)
        
new const nazwa[]   = "Nozownik (45lvl)";
new const opis[]    = "Jest niewidzialny na nozu oraz 1/3 z niego(PPM)";
new const bronie    = (1<<CSW_USP);
new const zdrowie   = 20;
new const kondycja  = 30;
new const inteligencja = 0;
new const wytrzymalosc = 0;
    
new ma_klase[33];

public plugin_init()
{
	register_plugin(nazwa, "1.0", "amxx.pl");

	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);

	register_event("CurWeapon", "eventKnife_Niewidzialnosc", "be", "1=1");

        RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

}

public cod_class_enabled(id)
{
	ma_klase[id] = true;

        if(cod_get_user_level(id) < 45)

        {

        return COD_STOP

        }

        return COD_CONTINUE;
}

public cod_class_disabled(id)
{
	set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
    	ma_klase[id] = false;

}

public eventKnife_Niewidzialnosc(id)
{
	if(!ma_klase[id])
		return;

	if( read_data(2) == CSW_KNIFE )
	{
		set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 5);
	}
	else
	{
		set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
	}
}

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)

{

	if(!is_user_connected(idattacker))

		return HAM_IGNORED;



	if(!ma_klase[idattacker])

		return HAM_IGNORED;

	

	if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && damage > 20.0 && random_num(1,3) == 1)

		cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);

	

	return HAM_IGNORED;

}

Komandos

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

#define DMG_BULLET (1<<1)
        
new const nazwa[]   = "Komandos";
new const opis[]    = "Natychmiastowe zabicie z noza (PPM), 2 skoki";
new const bronie    = (1<<CSW_DEAGLE);
new const zdrowie   = 30;
new const kondycja  = 60;
new const inteligencja = 0;
new const wytrzymalosc = 0;
    
new skoki[33];

new ma_klase[33];

public plugin_init()
{
	register_plugin(nazwa, "1.0", "amxx.pl");

	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
   
	register_forward(FM_CmdStart, "fwCmdStart_MultiJump");

        RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

}

public cod_class_enabled(id)
{
	ma_klase[id] = true;

}

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

}

public fwCmdStart_MultiJump(id, uc_handle)
{
	if(!is_user_alive(id) || !ma_klase[id])
		return FMRES_IGNORED;

	new flags = pev(id, pev_flags);

	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
	{
		skoki[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(flags & FL_ONGROUND)
		skoki[id] = 1;

	return FMRES_IGNORED;
}

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)

{

	if(!is_user_connected(idattacker) || !ma_klase[idattacker])

		return HAM_IGNORED

 

	if(get_user_weapon(idattacker) == CSW_KNIFE && pev(idattacker, pev_button) & IN_ATTACK2)

	{

		SetHamParamFloat(4, float(pev(this, pev_health)))

		return HAM_HANDLED

	}

 

 

	return HAM_IGNORED;

}
Odpowiedz