Tem uma stock de knockback na svdex e no Modo Pain.
Use esta stock que eu editei pra ficar mais simples pra ti
Código:
stock set_user_knockback(victim, attacker, force)
{
new Float:vec[3];
new Float:oldvelo[3];
get_user_velocity(victim, oldvelo);
create_velocity_vector(victim , attacker , vec, force);
vec[0] += oldvelo[0];
vec[1] += oldvelo[1];
set_user_velocity(victim , vec);
}
// Knockback do Shinra Tensei
stock create_velocity_vector(victim,attacker,Float:velocity[3], force)
{
if(victim > 0 && victim < 33)
{
if(!is_user_alive(attacker))
return 0;
new Float:vicorigin[3];
new Float:attorigin[3];
entity_get_vector(victim , EV_VEC_origin , vicorigin);
entity_get_vector(attacker , EV_VEC_origin , attorigin);
new Float:origin2[3]
origin2[0] = vicorigin[0] - attorigin[0];
origin2[1] = vicorigin[1] - attorigin[1];
new Float:largestnum = 0.0;
if(floatabs(origin2[0])>largestnum) largestnum = floatabs(origin2[0]);
if(floatabs(origin2[1])>largestnum) largestnum = floatabs(origin2[1]);
origin2[0] /= largestnum;
origin2[1] /= largestnum;
new a = force
velocity[0] = ( origin2[0] * (100 *a) ) / get_entity_distance(victim , attacker);
velocity[1] = ( origin2[1] * (100 *a) ) / get_entity_distance(victim , attacker);
if(velocity[0] <= 20.0 || velocity[1] <= 20.0)
velocity[2] = random_float(200.0 , 275.0);
}
return 1;
}
Ative a Include Engine se quiser que funcione
E digite o comando
set_user_knockback(victim, attacker, (forca do knockback)) pra funcionar (se quer que cada tiro faça um trouxa voar de preferencia coloque na fw_takedamage)