He ball knife
2 replies



27.03.14 06:21:36 am
Dear guys, i have a problems, strip knife to He Grenades...
When attack with knife, then spaw a He or Snowball to enemy or ahead. Of course: infinity he.
Like this:
Bad Eng.
When attack with knife, then spaw a He or Snowball to enemy or ahead. Of course: infinity he.
Like this:
Code:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("attack","attack")
function attack(id)
if player(id,"weapon") == 50 then
parse("strip "..id.." 75")
end
end
function attack(id)
if player(id,"weapon") == 50 then
parse("strip "..id.." 75")
end
end
Bad Eng.
Your code doesn't do that in the least.
If you want accurate distance you'll have to use reqcld to get the position of your cursor and then calculate the distance between it and you.
Code:
1
2
3
4
5
6
2
3
4
5
6
addhook("attack","boom")
function boom(id)
if player(id,"weapontype")==50 then
parse("spawnprojectile "..id.." 51 "..player(id,"x").." "..player(id,"y").." 350 "..player(id,"rot"))
end
end
function boom(id)
if player(id,"weapontype")==50 then
parse("spawnprojectile "..id.." 51 "..player(id,"x").." "..player(id,"y").." 350 "..player(id,"rot"))
end
end
If you want accurate distance you'll have to use reqcld to get the position of your cursor and then calculate the distance between it and you.



