Adissonboy11 Posted March 21, 2015 Share Posted March 21, 2015 (edited) I saw on some server , that without having to aim the gun in his hand ( target running without having gun in hand, type DayZ SA ) by pressing the right mouse button , podria someone show me how I can put this fuction on my server? Ex: Edited March 21, 2015 by Guest Link to comment
Mr.unpredictable. Posted March 21, 2015 Share Posted March 21, 2015 ???? Can you explain it, I can't understand what are you trying to say. Link to comment
Adissonboy11 Posted March 21, 2015 Author Share Posted March 21, 2015 ????Can you explain it, I can't understand what are you trying to say. I put an example , think of now to understand . Link to comment
Castillo Posted March 21, 2015 Share Posted March 21, 2015 That's a custom crosshair, you can do it with: getPedTargetEnd getScreenFromWorldPosition guiGetScreenSize dxDrawImage Link to comment
Tomas Posted March 21, 2015 Share Posted March 21, 2015 Or simply draw the crosshair in the center of the window when aiming. function drawCrosshairIfAiming() if isPedAiming(localPlayer) then dxDrawImage(...) end end addEventHandler("onClientRender",root,drawCrosshairIfAiming) function isPedAiming ( thePedToCheck ) if isElement(thePedToCheck) then if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then return true end end end return false end Link to comment
Adissonboy11 Posted March 23, 2015 Author Share Posted March 23, 2015 Or simply draw the crosshair in the center of the window when aiming. function drawCrosshairIfAiming() if isPedAiming(localPlayer) then dxDrawImage(...) end end addEventHandler("onClientRender",root,drawCrosshairIfAiming) function isPedAiming ( thePedToCheck ) if isElement(thePedToCheck) then if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then return true end end end return false end The above script is not working as I expected, the gun appears , not more as in the examples . See how it's getting Link to comment
neves768 Posted March 23, 2015 Share Posted March 23, 2015 i think he wants a "camera zoom" like DayZ:SA when press the right mouse button. Link to comment
Adissonboy11 Posted April 12, 2015 Author Share Posted April 12, 2015 i think he wants a "camera zoom" like DayZ:SA when press the right mouse button. No Neves, only aim without being with gun in hand. 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