Jump to content

Search the Community

Showing results for tags 'ipairs'.

  • 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. شباب ممكن حد يشرحلي for i,k ipairs و متى تستعمل
  2. I wanna know how to use ipairs and pairs correctly plz
  3. Hello. As you can see, in my script i attached 2 weapons to a vehicle. I set a bind for shooting one of the gun. My problem is that when i start the function called "fire_gun_c" then both of the weapons will be fired. So my question is how can i only shoot the weapon "gun1" by using getAttachedElements? client function attach() local gun1 = createWeapon(31, 0,0,0) local gun2 = createWeapon(31, 0,0,0) attachElements ( gun1, veh, 0, 1, 0) attachElements ( gun1, veh, 0, -1, 0) end function fire_gun_c(veh) local attachedElements = getAttachedElements(veh) for ElementKey, ElementValue in ipairs ( attachedElements ) do fireWeapon ( ElementValue ) -- it fires both of the guns because it gets all the data with getAttachedElements end end addEvent("fire_gun_c", true) addEventHandler ( "fire_gun_c", resourceRoot, fire_gun_c)
×
×
  • Create New...