Speedo Posted April 10, 2016 Share Posted April 10, 2016 (edited) Hi all, i've looker around ,in community and the forum itself and cant find anything like this. Well i found the script to shoot from the car, but this apply to all cars in the map, i need one script that apply the rocket to only 1 car or 2. Here the script i want to modify: local shootingAllowed = true function playerSpawn() shootingAllowed = true end addEventHandler("onClientPlayerSpawn", getLocalPlayer(), playerSpawn) function doShoot() if shootingAllowed == true then if not isPlayerDead(getLocalPlayer()) then shootingAllowed = false local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) local x,y,z = getElementPosition(theVehicle) local rX,rY,rZ = getVehicleRotation(theVehicle) local x = x+4*math.cos(math.rad(rZ+90)) local y = y+4*math.sin(math.rad(rZ+90)) createProjectile(theVehicle, 19, x, y, z, 1.0, nil) setTimer(allowShooting, 3000, 1) end end end function allowShooting() shootingAllowed = true end for keyName, state in pairs(getBoundKeys("fire")) do bindKey(keyName, "down", doShoot) end Edited April 14, 2016 by Guest Link to comment
GTX Posted April 10, 2016 Share Posted April 10, 2016 Well, post the script and we can work something out Link to comment
Speedo Posted April 10, 2016 Author Share Posted April 10, 2016 (edited) Look 1st post here, i found 2 .lua file saved on my documents (i downloaded them not made by me).. i will post it here to see if this one is correct, i will test it on a map if you need -- Edit Edited April 14, 2016 by Guest Link to comment
Speedo Posted April 14, 2016 Author Share Posted April 14, 2016 Bump, Anyone can help? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now