public item_hpp(id)
{
if (used_item[id])
{
hudmsg(id,2.0,"Uleczenia mozesz uzyc raz na runde!")
return PLUGIN_CONTINUE
}
new m_health = race_heal[player_class[id]]+player_strength[id]*2
new CurHealth = get_user_health(id)
new NewHealth = (CurHealth+player_b_hpitemm[id]<m_health)? CurHealth+player_b_hpitemm[id]:m_health
set_user_health(id, NewHealth)
used_item[id] = true
return PLUGIN_CONTINUE
}Zrobiłem tak:
public item_hpp(id)
{
if (used_item[id])
{
hudmsg(id,2.0,"Uleczenia mozesz uzyc raz na runde!")
return PLUGIN_CONTINUE
}
if (get_user_button(id) & IN_USE && button[id]==0 && on_knife[id])
{
button[id]=1;
new m_health = race_heal[player_class[id]]+player_strength[id]*2
new CurHealth = get_user_health(id)
new NewHealth = (CurHealth+player_b_hpitemm[id]<m_health)? CurHealth+player_b_hpitemm[id]:m_health
set_user_health(id, NewHealth)
}
used_item[id] = true
return PLUGIN_CONTINUE
}Ale nie działa. ;/ Oczywiście raz na rundę.


Dodatki SourceMod



Temat jest zamknięty









