SHARE
TWEET

Untitled

a guest May 16th, 2019 72 in 2 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function doShoot()
  2.     if shootingAllowed == true then
  3.         local theVehicle = getPedOccupiedVehicle(getLocalPlayer())
  4.         if (theVehicle) then
  5.             if (isCTF ~= true or isCTF == true ) then
  6.             if  isVehicleOnGround(theVehicle) == false then
  7.                 if (getTickCount()-lastJump <= 55) then
  8.                     outputChatBox("You can't shoot and jump at the same time.",0,68,255);
  9.                     return true;
  10.                 end
  11.                 shootingAllowed = false
  12.                 local x,y,z = getElementPosition(theVehicle)
  13.                 local rX,rY,rZ = getElementRotation(theVehicle)
  14.                 if (rY >= 130 and rY <= 240) or (rX >= 130 and rX <= 240) then
  15.                 setElementData (localPlayer,"double",true)
  16.                 else
  17.                 setElementData (localPlayer,"double",false)
  18.                 end
  19.                 local x = x+4*math.cos(math.rad(rZ+90))
  20.                 local y = y+4*math.sin(math.rad(rZ+90))
  21.                 --local rWord = randomWord [ math.random (#randomWord) ]
  22.                 local rocket = createProjectile(theVehicle, 19, x, y, z, 1.0, nil)
  23.                 setElementData (localPlayer,"ground",isVehicleOnGround (theVehicle))
  24.                 --[[if rockets == 1 then
  25.                 rockets = 2
  26.                 allowShoot = setTimer(allowShooting, 320, 1)
  27.                 elseif rockets == 2 then
  28.                 rockets = 1
  29.                 allowShoot = setTimer(allowShooting, 3000, 1)
  30.                 else
  31.                 rockets = 1]]
  32.                 allowShoot = setTimer(allowShooting, 3000, 1)
  33.                 --end
  34.             else
  35.                 outputChatBox("You can't shoot while you're on the ground",0,68,255)
  36.             end
  37.             end
  38.         end
  39.     end
  40. end
  41. for keyName, state in pairs(getBoundKeys("fire")) do
  42. bindKey(keyName, "down", doShoot)
  43. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top