Problem, 1/1 z broni nie działa
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
R1d4r
30.08.2015
proszę sprawdzić czy działa.
joker.sma 5,72 KB
65 Ilość pobrań
Użytkownik Metal9712 edytował ten post 30.08.2015 14:37
ForeverAllone
30.08.2015
proszę sprawdzić czy działa.
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? Bo jest 2x AWP:)
R1d4r
30.08.2015
Tak, tak. Zrobiłem błąd. Pospieszyłem się za bardzo, przepraszam.
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);
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
Użytkownik Metal9712 edytował ten post 30.08.2015 17:24
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.