Search the Community

Showing results for tags 'ipairs'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 4 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)
  4. CONSOLE: ERROR: advertisements/advertisements.lua:187: call: failed to call 'm [21;1Hysql:select' [string "?"] [ [15:26:01] ERROR: advertisements/advertisements.lua:187: bad argument #1 to 'ipa [ irs' (table expected, got boolean) [ [30m [42m [1@ [m [39;49m [37m [40m ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SCRIPT: function openAdvertisements( player, command ) local advertisements = { } --These will hold our advertisements to send to the client and populate our advertisement tables. if not player then player = source end for _, ad in ipairs( exports.mysql:select('advertisements') ) do if tonumber( ad.expiry ) >= tonumber( getRealTime().timestamp ) then --Check if the advertisement has expired, delete it if so. = exports.mysql:select_one( "characters", { id = ad.created_by } ).charactername table.insert( advertisements, ad ) else deleteAdvertisement( ) end end triggerClientEvent( player, resourceName .. ":display_all", root, advertisements, exports.integration:isPlayerAdmin( player ) ) --Send the advertisements to the client to create the GUI. end ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PROBLEM: It says that is an SQL Error. What should I do to repair it? Because no one can make any advertisement on my hosted server. Thank you! ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- THE ERROR LINE: for _, ad in ipairs( exports.mysql:select('advertisements') ) do