Advertisement
Guest User

Untitled

a guest
May 28th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. function SpawnRocket(a,b,c)
  2.     local e= ents.Create("rpg_missile")
  3.     e:SetOwner(c)e:SetPos(a)
  4.     e:SetAngles(b)
  5.     e:Spawn()
  6.     e:SetNotSolid(true)
  7. end
  8. hook.Add("KeyPress",1,function(ply,key)
  9.     if (key == IN_ATTACK or key == IN_ATTACK2) and IsValid(ply:GetActiveWeapon()) and ply:GetActiveWeapon():GetClass()=="fists"then
  10.         SpawnRocket(ply:GetShootPos(), ply:EyeAngles(), ply)
  11.     end
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement