←  Prośby o Klasę/Perk

AMXX.pl: Support AMX Mod X i SourceMod

»

Klasa
Proszę o Klasę "Wojskowy"

  • +
  • -
Adeegor - zdjęcie Adeegor 03.04.2015

Klasa:Wojskowy

Bronie:M4a1,deagle

Inteligencja : 0

Zdrowie : 0

Wytrzymalosc : 0

Kondycja : 50

Opis:Brak rorzutu,+ 10 int

Odpowiedz

  • +
  • -
PoLaNdPL - zdjęcie PoLaNdPL 04.04.2015

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
 
#define DMG_BULLET (1<<1)
 
 
new bool:ma_klase[33];
        
new const nazwa[]   = "Wojskowy";
new const opis[]    = "Brak rozrzutu w broniach, Dodatkowe 10(+int) obrazen";
new const bronie    = (1<<CSW_HEGRENADE)|(1<<CSW_M4A1)|(1<<CSW_DEAGLE);
new const zdrowie   = 0;
new const kondycja  = 50;
new const inteligencja = 0;
new const wytrzymalosc = 0;
    
public plugin_init()
{
	register_plugin(nazwa, "1.0", "PoLaNdPL");
	 
	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
	        RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
	 
	        register_forward(FM_PlayerPreThink, "PreThink");
	        register_forward(FM_UpdateClientData, "UpdateClientData", 1)
}
 
public cod_class_enabled(id)
{
	give_item(id, "weapon_hegrenade");
	        ma_klase[id] = true;
	 
}
 
public cod_class_disabled(id)
    ma_klase[id] = false;
 
public PreThink(id)
{
	if(ma_klase[id])
	set_pev(id, pev_punchangle, {0.0,0.0,0.0})
}
 
public UpdateClientData(id, sw, cd_handle)
{
	if(ma_klase[id])
	set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0})
}
 
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(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_M4A1 && damagebits & DMG_BULLET)
		cod_inflict_damage(idattacker, this, 10.0, 0.5, idinflictor, damagebits);
		if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_DEAGLE && damagebits & DMG_BULLET)
		cod_inflict_damage(idattacker, this, 10.0, 0.5, idinflictor, damagebits);
		                
		    }
	    
	    return HAM_IGNORED;
} 

Proszę.
 


radim (05.04.2015 07:03):
Do wstawiania kodu używamy tagów BBCode [code=auto:0] !
radim (05.04.2015 07:03):
Kod poprawiłem
Odpowiedz

  • +
  • -
Adeegor - zdjęcie Adeegor 04.04.2015

A możesz w formacie amxx i sma bo ja bez doświadczenia w tym  :D 

Odpowiedz

  • +
  • -
PoLaNdPL - zdjęcie PoLaNdPL 04.04.2015

Skompiluj to sobie: http://amxx.pl/source-kompilator/

 

 

Załączone pliki

Odpowiedz

  • +
  • -
olle - zdjęcie olle 04.04.2015

Mi tam się wydaję, ze dałeś kompilator do sourca ^^

Odpowiedz

  • +
  • -
PoLaNdPL - zdjęcie PoLaNdPL 04.04.2015

Raczej nie :)


MAGNET (06.04.2015 16:24):
skisłem
Odpowiedz