←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Problem, 1/1 z broni nie działa

  • +
  • -
ForeverAllone - zdjęcie ForeverAllone 24.08.2015

Witam, nie wiem gdzie zrobiłem błąd, że nie działa 1/1 z AWP

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_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_AWP && damagebits & DMG_BULLET) 
        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_HEGRENADE && 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;
}

Załączone pliki

  • Załączony plik  joker.sma   5,87 KB   33 Ilość pobrań
Odpowiedz

  • +
  • -
WeBsteR - zdjęcie WeBsteR 24.08.2015

Proszę:

Załączone pliki

  • Załączony plik  joker.sma   5,91 KB   76 Ilość pobrań
Odpowiedz

  • +
  • -
ForeverAllone - zdjęcie ForeverAllone 30.08.2015

Nie działa;/

Odpowiedz

  • +
  • -
R1d4r - zdjęcie R1d4r 30.08.2015

proszę sprawdzić czy działa. :)

Załączony plik  joker.sma   5,72 KB   65 Ilość pobrań


Użytkownik Metal9712 edytował ten post 30.08.2015 14:37
Odpowiedz

  • +
  • -
ForeverAllone - zdjęcie ForeverAllone 30.08.2015

proszę sprawdzić czy działa. :)

attachicon.gifjoker.sma

if(get_user_weapon(idattacker) == CSW_AWP && random_num(1,1) == 1)
		cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
	if(get_user_weapon(idattacker) == CSW_AWP && random_num(1,2) == 1)
		cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);

Tutaj nie zrobiłeś błędu odnośnie HE?:D Bo jest 2x AWP:)

Odpowiedz

  • +
  • -
R1d4r - zdjęcie R1d4r 30.08.2015

Tak, tak. Zrobiłem błąd. Pospieszyłem się za bardzo, przepraszam. :D

if(get_user_weapon(idattacker) == CSW_AWP && random_num(1,1) == 1)
        cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_HEGRENADE && random_num(1,2) == 1)
        cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
Odpowiedz

  • +
  • -
ForeverAllone - zdjęcie ForeverAllone 30.08.2015

 nie działa;/

Odpowiedz

  • +
  • -
R1d4r - zdjęcie R1d4r 30.08.2015

Teraz powinno działać, przerobiłem 1/1 z noża ze swojego działającego komandosa na 1/1 z awp. :>

Załączone pliki

  • Załączony plik  joker.sma   6,08 KB   55 Ilość pobrań

Użytkownik Metal9712 edytował ten post 30.08.2015 17:24
Odpowiedz

  • +
  • -
ForeverAllone - zdjęcie ForeverAllone 30.08.2015

Dziwne jest to ze inną klase napisałem podobnie i działa. A ta ma focha... Nawet silnik od 0 zrobiony.
Odpowiedz