Jump to content

Search the Community

Showing results for tags 'recoil'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 3 results

  1. How to check the recoil of a weapon. Notice that when you shoot, for example, with an ak47, it starts with a slight recoil and after 3 seconds when you hold it, you have a large recoil and it stops at this recoil, then the bullets fly in all directions when you are, for example, on poor level. Therefore, is there something to check the recoil of a given weapon so that the int changes at the time of the initial recoil and the final recoil? Maybe the getWeaponProperty function but I don't see anything that could check it because "spread" for example stops on the same recoil.
  2. Estou tentando fazer um script de recuo que funcione de forma mais realista mexendo o eixo Z também, porém da forma que tentei fazer não funcionou, se alguém puder me dar uma ajuda fico grato. local weap = {shot=false,timer=false} addEventHandler("onClientPlayerWeaponFire", localPlayer, function() local rot = getPedCameraRotation(localPlayer) if (isTimer(weap.timer)) then killTimer(weap.timer); end if (not weap.shot) then setCameraMatrix (x, y-0.2, z+0.3, lx, ly, lz) setCameraTarget ( localPlayer ) weap.shot = true weap.timer = setTimer(setPedCameraRotation, 50, 1, localPlayer, -(rot+0.28)) else setCameraMatrix (x, y+0.2, z+0.3, lx, ly, lz) setCameraTarget ( localPlayer ) weap.shot = false weap.timer = setTimer(setPedCameraRotation, 50, 1, localPlayer, -(rot-0.28)) end end)
  3. function rotateCameraRight() if getKeyState( "mouse1" ) == false then removeEventHandler("onClientPreRender", root, rotateCameraRight) else setTimer (function() setPedCameraRotation(localPlayer, -(getPedCameraRotation(localPlayer) + 0.08)) setPedCameraRotation(localPlayer, -(getPedCameraRotation(localPlayer) - 0.08)) end, 50, 1 ) setCameraMatrix (x, y+0.8, z, lx, ly, lz) setCameraTarget ( localPlayer ) if not isTimer(timer_right) then timer_left = setTimer ( timer_l, 850, 1 ) end end end function timer_l() removeEventHandler("onClientPreRender", root, rotateCameraRight) addEventHandler("onClientPreRender", root, rotateCameraLeft) end function rotateCameraLeft() if getKeyState( "mouse1" ) == false then removeEventHandler("onClientPreRender", root, rotateCameraLeft) else setTimer ( function() setPedCameraRotation(localPlayer, -(getPedCameraRotation(localPlayer) - 0.08)) setPedCameraRotation(localPlayer, -(getPedCameraRotation(localPlayer) + 0.08)) end, 50, 1 ) setCameraMatrix (x, y-0.8, z, lx, ly, lz) setCameraTarget ( localPlayer ) if not isTimer(timer_left) then timer_right = setTimer ( timer_r, 900, 1 ) end end end function timer_r() removeEventHandler("onClientPreRender", root, rotateCameraLeft) addEventHandler("onClientPreRender", root, rotateCameraRight) end function addEvent() local weapon = getPedWeapon(localPlayer) if (weapon==34) or (weapon==31) or (weapon==30) or (weapon==6) then addEventHandler("onClientPreRender", root, rotateCameraRight) end end bindKey("mouse1", "down", addEvent) bind = true so i made this code trying to make something similar to h1z1 horizontal recoil, but it only goes left. I need it to go left or right randomly but never repeat left or repeat right.
×
×
  • Create New...