From PokeMod:
Code:
public Gust(id, skill, prop)
{
new gust = SkillLevel(id, skill) / GUST_FACTOR
new Float:velocity[3], Float:Cvelocity[3]
poke_sound(id, CHAN_VOICE, SND_JUMPLAND)
velocity_by_aim(id, gust*GUST_VELOCITY, velocity)
new players[MAX_PLAYERS], pnum, aid
poke_get_players(players, pnum ,PLAYER_ALIVE|PLAYER_MORTAL)
for(new i=0; i<pnum; i++){
aid = players[i]
if(fm_is_ent_visible(id, aid)){
pev(aid, pev_velocity, Cvelocity)
Cvelocity[0] += velocity[0]
Cvelocity[1] += velocity[1]
Cvelocity[2] += velocity[2]
set_pev(aid, pev_velocity ,Cvelocity)
skilldamage(aid, id, gust, skill)
poke_print(aid, print_center, "You were hit by a %s", SkillToName(skill) )
poke_sound(aid, CHAN_VOICE, SND_JUMPLAND)
}
}
return SKILL_USED;
}