Jump to content

Need Help By Rocket Command Scipt


al19ja

Recommended Posts

Posted

Hello I Need Help By a Scipt I want It With Wen I Tip fire In chat Box Then Shoot Rockets Not Wen I Press i

Please Help Me Or Fix it for me

theVehicle = createVehicle(600, 2530.413, -1710.22, 13.323, 0, 0, 0, "RocketCar") 
setElementData(theVehicle,"rocket",true) 
zenit = createObject(3884, 2530.621, -1715.385, 12.489) 
attachElements(zenit, theVehicle, 0,-1.8,-0.5) 
  
function bindKeyStartFire() 
bindKey(source,"i","down",startfireRocket) 
end 
addEventHandler("OnPlayerJoin", getRootElement(),bindKeyStartFire) 
  
  
function startfireRocket(source) 
 if isPedInVehicle(source) then 
  local vehicle = getPedOccupiedVehicle(source) 
  if getElementData(vehicle,"rocket") == true then 
   if getVehicleController(vehicle) == source then 
    local x,y,z = getElementPosition(vehicle) 
    local rx,ry,rz = getVehicleRotation(vehicle)     
     if getElementData(vehicle,"rocket_Progress") == 100 then 
      triggerClientEvent("fireRocket", getRootElement(), source, x, y, z, rz,vehicle) 
     else 
      playSoundFrontEnd(source,5)    
      outputChatBox(""..tostring(100 - getElementData(vehicle,"rocket_Progress"))..".", source, 0, 0, 0,true) 
     end 
   end   
  end  
 end 
end 
  
function explodeZUvehicle() 
 if getVehicleOccupant(source) then 
 local player = getVehicleOccupant(source) 
  if (getElementData(source,"rocket") == true) then 
   triggerClientEvent(player, "destroiGui", getRootElement(),player) 
  end 
 end  
end 
addEventHandler("onVehicleExplode", getRootElement(), explodeZUvehicle) 

Good Gretings From Alex

Posted

very basic. and you are too lazy for it?

we are not fulfilling requests, we are not machines doing everything somebody want!!

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...