Witam. Zrobiłem sobie AutoBH na jednym z noży w knife_mod i działa ale mam jeden problem. AutoBH znika po oddaniu strzału lub po przeładowaniu zamiast po zmianie broni np. z noża na pistolet.
public client_PreThink(id){
new Weapon = read_data(2)
is_bh = true;
if(knife_model[id] == 4 && Weapon == CSW_KNIFE && is_bh){
entity_set_float(id, EV_FL_fuser2, 0.0);
if(entity_get_int(id, EV_INT_button) & 2){
new flags = entity_get_int(id, EV_INT_flags);
if(flags & FL_WATERJUMP || entity_get_int(id, EV_INT_waterlevel) >= 2 || !(flags & FL_ONGROUND)){
return PLUGIN_CONTINUE;
}
new Float:velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
velocity[2] += 250.0;
entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6);
}
}
return PLUGIN_CONTINUE;
}
http://amxx.pl/wklej...36575071932858/
Będę wdzięczny. Daje +


Dodatki SourceMod














