With range calculation and rotation calculation.
Help pls
Scripts
Throw weapon at player
Throw weapon at player
1

If you can't make a script as basic as this, you shouldn't speak expertly in my posts, it even says you would do better.cant_drop = {50,74}
normal_drop = {47,48,49,51,52,53,54,72,73,75,76,89}
addhook("drop","drop")
function drop(id,idd,type)
for _, value in pairs(cant_drop) do
if value == player(id,"weapon") then
return 1
end
end
for _, v in pairs(normal_drop) do
if v == player(id,"weapon") then
return 0
end
end
local x=player(id,"x")
local y=player(id,"y")
local rot=player(id,"rot")
parse("strip "..id.." "..type.."")
parse("spawnprojectile 0 "..type.." "..x.." "..y.." 100 "..rot.."")
return 1
end
cs2d_is_a_Gem: You and your scripting skills are sucks anyway. Most likely you don't know anything about performance optimization...and this code without tabs make my eyes hurt. No need to be pretentious anyway, sir. With my respect! -- in pixels
local locationX = 16
local locationY = 16
function throwTo(id, weapon)
local deltaX, deltaY = locationX-player(id,"x"), locationY-player(id,"y")
parse("spawnprojectile "..id.." "..weapon.." "..locationX.." "..locationY.." "..math.sqrt(deltaX^2+deltaY^2).." "..math.deg(math.atan2(-deltaX, deltaY)))
end
1
