JDROCK Posted May 7, 2015 Posted May 7, 2015 Hi guys . I want to ask a question that the rockets are not firing on a fixed position when ever i change the vehicle's direction ,then the rockets firing source position also change from one headlight to another this is the script i also tried use setelement rotation but it didnt worked If someone can help me i will be thank full to him i created two different different rockets binded by mouse clicks function carshoot() if bindTrigger == 1 then if not isPedDead(cLP) then bindTrigger = 0 local x,y,z = getElementPosition(theVehicle) local rX,rY,rZ = getElementRotation(theVehicle) local x = x+1 local y = y+1 createProjectile(theVehicle, 19, x-2, y, z, 1.0, nil) setTimer(allowShoots,4000, 1) end end end function carshoot2() if bindTrigger2 == 1 then if not isPedDead(cLP) then bindTrigger2 = 0 local x,y,z = getElementPosition(theVehicle) local rX,rY,rZ = getElementRotation(theVehicle) local x = x+1 local y = y+1 createProjectile(theVehicle, 19, x, y, z, 1.0, nil) setTimer(allowShoots,4000, 1) end end end
Walid Posted May 7, 2015 Posted May 7, 2015 Try this one function carshoot2() if bindTrigger2 == 1 then if not isPedDead(cLP) then local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle) then bindTrigger2 = 0 local x,y,z = getElementPosition(vehicle) local rx,ry,rz = getElementRotation(vehicle) createProjectile(vehicle, 19, x+1, y+1, z, 1.0, nil,rx,ry,rz) setTimer(allowShoots,4000, 1) end end end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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