1/x szans na strzelenei HS z danej Broni.
SocketS
02.07.2015
Witam. Tak jak w tytule tematu. Jak przerobić ten kod aby szansa na HS była z mp5 ? Bo ten kod jest na wszystkie bronie?
Pod : #include <fun> dodajemy : #define DMG_BULLET (1<<1) do public plugin_init dodajemy : RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); I na samym końcu dodajemy : public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_alive(idattacker) || !is_user_connected(idattacker) || !ma_klase[idattacker]) return HAM_IGNORED if(get_user_hitzones(idattacker, this) != 2 && random_num(1,6)==1) { set_user_hitzones(idattacker, this, 2) } return HAM_IGNORED }
NoLiFeR
02.07.2015
Sprawdzasz czy bron gracza to CSW_MP5NAVY oraz damagebits & DMG_BULLET
if(get_user_hitzones(idattacker, this) != 2 && random_num(1,6)==1 && get_user_weapon(idattacker) == CSW_MP5NAVY && (damagebits & DMG_BULLET)
damagebits sprawdzamy w celu unikniecia zabicia granatem trzymając w reku mp5
Użytkownik NoLiFeR edytował ten post 02.07.2015 09:53