Xwad Posted February 19, 2015 Author Share Posted February 19, 2015 But the script that you wrote that mount a minigun to a vehicle? Link to comment
Xwad Posted February 19, 2015 Author Share Posted February 19, 2015 and its client side ? Link to comment
Deepu Posted February 19, 2015 Share Posted February 19, 2015 well, yeah it is client sided, why? Link to comment
Xwad Posted February 19, 2015 Author Share Posted February 19, 2015 i am confused. What functions or codes need i use now?? Link to comment
Deepu Posted February 19, 2015 Share 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... Link to comment
Deepu Posted February 19, 2015 Share Posted February 19, 2015 well what are the errors? what commands did u type in? Link to comment
Xwad Posted February 19, 2015 Author Share 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? Link to comment
Deepu Posted February 19, 2015 Share Posted February 19, 2015 when you write /attach you see a minigun or something like that? on top of your car? Link to comment
Xwad Posted February 19, 2015 Author Share Posted February 19, 2015 no:( but the attach function creates only a minigun object or a weapon? 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