←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

CoD Nowy
HE 1/3

  • +
  • -
RedIce - zdjęcie RedIce 19.01.2012

Chciałem zrobić klase 1/3 z HE i teraz moje pytanie brzmi:

Proszę o skonfigurowanie tego pliku żeby był on na HE a nie na każda broń :)

public fwTakeDamage_JedenZ(this, idInf, idAtt, Float:fDmg, dmgBits){<br>&nbsp;&nbsp;&nbsp;&nbsp;if(!is_user_alive(idAtt) || !ma_klase[idAtt] || !(dmgBits &amp; (1&lt;&lt;1) ) || random_num(1, 3) != 1 )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return HAM_IGNORED;

Użytkownik RedIce edytował ten post 19.01.2012 16:47
Odpowiedz

*RefresH* - zdjęcie *RefresH* 19.01.2012

Trzeba dodać na początku:

#define DMG_HEGRENADE (1<<24)



i na smym końcu sma dodać:

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_HEGRENADE && 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;
}

spróbuj dodać 1/3 z he tak jak tu.

A tu zmieniasz szanse:
  if(damagebits & DMG_HEGRENADE && random_num(1, 2) == 1)


Poradnik by Goliath :)
Użytkownik *RefresH* edytował ten post 19.01.2012 16:59
Odpowiedz