Jump to content

Search the Community

Showing results for tags 'shady1'.

  • 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 1 result

  1. With this simple bit of code, we are able to move our ped's head ?? in the direction we choose to move the mouse ?️. The only thing i dont like is how the head moves while the ped is aiming around. I need to force the head to look at where i'm aiming. I tried using the weapon muzzle position as the forced lookAt position but i'm not sure why it's not working. --------------------------- -- Head Moving --------------------------- local scrX, scrY = guiGetScreenSize ( ) setTimer( function() if not isPedAiming(localPlayer) then local x, y, z = getWorldFromScreenPosition( scrX / 2, scrY / 2, 15) setPedLookAt(localPlayer, x, y, z, 3000, 1000, nil) else local sx, sy, sz = getPedWeaponMuzzlePosition(localPlayer) setPedLookAt(localPlayer, sx, sy, sz, 0, 0, nil) end end, 120, 0) --------------------------- -- Functions --------------------------- 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" or isPedDoingGangDriveby(thePedToCheck) then return true end end end return false end
×
×
  • Create New...