register_forward(FM_CmdStart, "granaty", 1)
public start_granat(id, uc, random)
{
if(!is_user_connected(id) || !is_user_alive(id))
return FMRES_IGNORED
cs_set_user_bpammo(id, CSW_HEGRENADE, 1)
return FMRES_IGNORED
}
I chodzi o to że gdy np. ja mam dostęp do wyboru przeciwnika, i gdy juz sie zacznie pojedynek, to jak ja kolo siebie rzuce granat to nie otrzymuje obrażeń, a jeżeli rzuce granat do innego CT nie tego co wybralem to zabiera mu hp i jak to zablokowac?
RegisterHam(Ham_TakeDamage, "player", "player_damage")
public player_damage(this, idinflictor, idattacker, Float:damage, damagebits) {
if(!is_user_connected(this) || !is_user_connected(idattacker))
return HAM_IGNORED
team[0] = get_user_team(this)
team[1] = get_user_team(idattacker)
if(damagebits == DMG_HEGRENADE)
{
if(team[0] == 2 && team[1] == 2)
return HAM_SUPERCEDE
if(duel[this] && duel[idattacker]) {
if((this == Duela && idattacker == Duelb) || (this == Duelb && idattacker == Duela))
return HAM_IGNORED
return HAM_SUPERCEDE
}
}
return HAM_IGNORED
}
O co biega z tym? Co jest źle?