←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
Ktoś zrobi Klasę ?

Locked

emiona1's Photo emiona1 07.05.2011

Mam pytanie ?
Zrobi mi ktoś Klasę ?

Oto Szgegóły:

new const nazwa[] = "Strzelec Galila";
new const opis[] = "1/4 z Galil, dodatkowe 35 obrazen z Famas ";
new const bronie = 1<<CSW_GALIL | 1<<CSW_FAMAS;
new const zdrowie = 50;
new const kondycja = 37;
new const inteligencja = 20;
new const wytrzymalosc = 56;

I jak ktoś może dodać mi do klasy Broń: Elite ?
Za pomoc: +
Edited by emiona1, 07.05.2011 13:57.
Quote

Po prostu Paweł's Photo Po prostu Paweł 08.05.2011

spróbuj tego chć nie jestem pewien
/* Plugin generated by AMXX-Studio */

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

#define DMG_BULLET (1<<1)


new bool:ma_klase[33];

new const nazwa[] = "Strzelec Galila";
new const opis[] = "1/4 z Galil, dodatkowe 35 obrazen z Famas ";
new const bronie = 1<<CSW_GALIL | 1<<CSW_FAMAS | 1<<CSW_ELITE;
new const zdrowie = 50;
new const kondycja = 37;
new const inteligencja = 20;
new const wytrzymalosc = 56;

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

public cod_class_enabled(id)
	ma_klase[id] = true;
	
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(get_user_weapon(idattacker) == CSW_GALIL && random_num(1,4) == 1)
		cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
	
	if(get_user_weapon(idattacker) == CSW_FAMAS)
		cod_inflict_damage(idattacker, this, 35, 0.0, idinflictor)
		
	return HAM_IGNORED;
}

Edited by Po prostu Paweł, 08.05.2011 13:40.
Quote
Locked