Xwad Posted February 19, 2015 Author Posted February 19, 2015 But the script that you wrote that mount a minigun to a vehicle?
Xwad Posted February 19, 2015 Author Posted February 19, 2015 i am confused. What functions or codes need i use now??
Deepu Posted February 19, 2015 Posted February 19, 2015 function posRender () x, y, z = getElementPosition(localPlayer) vx, vy, vz = getElementPosition(veh) end addEventHandler("onClientRender", root, posRender) local mini = createWeapon("minigun", vx, vy, vz+2) function attaching () if not isElement(mini) then mini = createWeapon("minigun", vx, vy, vz + 2) veh = getPedOccupiedVehicle(localPlayer) else destroyElement(mini) end end addCommandHandler("attach", attaching) -- do /attach to make minigun or destroy it... function wepFire() if isElement(mini) then fireWeapon(mini) end end addCommandHandler("fire", wepFire) use this one, and tell me if it works...
Deepu Posted February 19, 2015 Posted February 19, 2015 well what are the errors? what commands did u type in?
Xwad Posted February 19, 2015 Author Posted February 19, 2015 there is no error. But i think i need use a server side script no? I typed /attach and the /fire but nothing happens. AddCommandHandler makes possible to add commands to the script no?
Deepu Posted February 19, 2015 Posted February 19, 2015 when you write /attach you see a minigun or something like that? on top of your car?
Xwad Posted February 19, 2015 Author Posted February 19, 2015 no:( but the attach function creates only a minigun object or a weapon?
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