Big Smoker Posted June 4, 2017 Share Posted June 4, 2017 (edited) Good Morning I need a help on a Crosshair system is a sniper aiming system, some must know it I want to put a blocking function to appear when the player jumps, why when he jumps the crosshair is in front. .. already tried putting a system isClientBindKey more did not work also the bug continues ... what should I do? What did i do wrong in it? can you help me? thank you function on_weapon_aimed(key,state) if (pressed) then return end outputChatBox("off") if getPedWeapon(getLocalPlayer())== 34 then if state == "down" then weap1 = getElementData(getLocalPlayer(),"currentweapon_2") for i,weaponData in pairs(weaponTable)do if weap1 == weaponData[1] then cross = CH[weap1] end end setPlayerHudComponentVisible("crosshair",false) addEventHandler("onClientHUDRender",getRootElement(),render_crosshair) else cross = false removeEventHandler("onClientHUDRender",getRootElement(),render_crosshair) end end end addEventHandler( "onClientKey", getRootElement(),function(button,press) if button == "lsfhit" then pressed = true outputChatBox("ON") setTimer(function() pressed = false end, 50000, 1) end end) Edited June 5, 2017 by Dutchman101 edited title tag & code box to fit section guidelines Link to comment
Moderators IIYAMA Posted June 5, 2017 Moderators Share Posted June 5, 2017 https://wiki.multitheftauto.com/wiki/GetPedMoveState or/and https://wiki.multitheftauto.com/wiki/GetPedSimplestTask or/and https://wiki.multitheftauto.com/wiki/GetPedTask or maybe this works as well: https://wiki.multitheftauto.com/wiki/GetPedTargetStart 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