Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/06/23 in all areas

  1. For easy and fast management. For looping speed. (complexer management) Note: you can also go for both. Or you could go for this one: https://wiki.multitheftauto.com/wiki/CreateElement (as parent) https://wiki.multitheftauto.com/wiki/SetElementParent Benefits: No need to clean up after a ped is deleted. Able to get specific streamedin peds at clientside. Attach eventHandlers to all your peds and only those. (Whipe all peds with just one destroyElement call > propagation.)
    1 point
  2. yes i was really thinking wrong separating it into functions is a good idea than writing all the artificial intelligence in one place thanks IIYAMA I have another question, which one do you think I should use to store the peds, I'm undecided between these two but do you have a better idea? local allpeds = {} local testped = createPed(0, 0,0,3) allpeds[testped] = true --or local allpeds = {} local testped = createPed(0, 0,0,3) table.insert(allpeds, testped)
    1 point
  3. AI thinking is not linear unfortunately. But some tasks are, and yet those probably can be interrupted in some way. Therefore it is important to run some of the checks every cycle. You could give something like this a try: local dataStorage_AI = {} -- Give the ped a brain if it hasn't one yet. function init_AI (ped) if dataStorage_AI[ped] then return end dataStorage_AI[ped] = { controls = {}, -- pressed controls maybe? (since serverside is not aware) element = ped } end -- Run the main update cycle function update_AI(ped) if not dataStorage_AI[ped] then return end -- no storage, no brain... if isPedDead(ped) then return end if isElementInWater(ped) then return runPedInWaterInstructions (ped) end end -- If the ped is in the water, do stuff here function runPedInWaterInstructions (ped) local pedData = dataStorage_AI[ped] -- do something here end
    1 point
  4. i think u have to use table_name = {"A",1,2,3,"A"} for i=1,#table_name do -- it loops through all the indexes if table_name[i] == "A" then -- example outputDebugString("This index has useful value") end end I am not very advanced in tables but u should go for ipairs if u want to find a certain value in a table. Also check this topic it might be useful. -> https://forum.multitheftauto.com/topic/36318-ipairs-and-pairs/
    1 point
  5. Hello, Effective immediately it's no longer possible to: - Report players to AC team - Appeal any global bans Do not attempt to report players to MTA staff team, or appeal any bans. It doesn't matter what you think or believe in, they will no longer be processed. A) If you need to report a player, please contact admins on the server they are playing on. Server admins should pay the amount of attention that staff in other multiplayer games (with hosted servers) typically pay, and owners should be mindful of script security and scripted anti-cheat solutions to fill in some cracks that started to be created over the past few years, and continue to do so as a result of lowered manpower within the MTA AC team. B) Appealing bans is no longer needed as permanent bans have been removed last month, and any of the handful of cases not covered aren't meant to ever be appealed, without exception. Temporary bans were never meant to be appealed, although some staff member's intepretation of that (while redirecting users) has varied - if you got a temporary ban, wait for it to expire and surely you got a feeling of what not to do/not to run next time while MTA is opened, to avoid getting banned again. AC team is actively monitoring the reliability & integrity of standard detections that may lead to temporary bans, that's one of the things its manpower still allows it to do, so you can see why we're confident to go this route - any leakage of appeals in places they don't belong/users contacting MTA about their bans anyways, our experience has learned is 99.9% users that know why they got banned but won't accept it and are persistent.. as before, all such inquiries won't lead anywhere, but especially now we said "No appeals anymore" there will be zero interaction and certain behaviors may also lead to removal from the respective platforms where inquiries are made in a persistent or disruptive fashion. Finally, regarding cheaters - the level of sophistication that our AC has reached due to years of playing a cat mouse game with cheaters, is a hugely raised border for cheats to be made and will continue to do so (as methods that were used in the past were patched as per the spoilered text in this topic, so they can't be re-used). However, with the loss of dedicated AC developers within AC team, comes that we can no longer keep up as before, this situation has existed for the past 2 years so as of this post nothing is abruptly changing, it's just the point of admitting we won't be tryharding as much as in the past to be known as totally cheater-free game, a reputation we held for long. If you look around in the gaming industry, you'll see that we held up pretty well in comparison, but the cheating industry (due to toxicity demand) has also hardened, and after 20 years we are low on manpower which is fully understandable. We will continue to bring AC improvements and get rid of emerging cheats and cheaters, but at our own pace, without external pressure or too high community expectations, from now on everything is on a best-effort basis and the point is that there may be periods during which we can't make any waves due to manpower constricts. You can see that this topic intends to lower your expectations and respect the amount of free time we (as volunteers) are able to invest, and get off our backs for things being different compared to some years ago. We're also OK to restrict ban appeals and player reports so we can delegate all of the manpower that's left on our new strategy, breaking cheats (patching them) and just preventing them from working to begin with, instead of permanently banning cheat users and having to deal with them "regretting" in ban appeals. We are also OK to restrict reporting cheaters as our focus shifts to breaking the cheats, and to get the required information to break one, we have our own methods and channels so much that we don't need any sort of reports. Due to the state of anticheat and heuristics, we always have a good picture of abnormalities and what cheats are doing, so the main limiting factor is manpower to get to work with what we have & know. Enjoy the game, and remember that player desires make the market for servers - so if you see too many cheaters, ask server owners to invest their time in training server admins to be on the lookout for cheaters and ban them, script protection/alert systems, and after all, have some peace of mind because cheating in MTA will always be a raised border and still won't be as common as in directly competing projects. // Note: using the bug bounty program for security bugs remains possible, end user security will always be among MTA team's top priorities. The program has been frozen for cheats, though, and documentation will soon reflect that.
    1 point
  6. Just for the people that didn't notice it. but ipairs as well as pairs are functions. Before you actually running the loop, you are executing (pre-process) functions. players = {1,2,3,4} theFunction, players2 = ipairs(players) -- note: players and players2 are the same table (not a copy) print(theFunction(players2, 0)) -- 1, 1 print(theFunction(players2, 1)) -- 2, 2 print(theFunction(players2, 2)) -- 3, 3 print(theFunction(players2, 3)) -- 4, 4
    1 point
  7. قوانین انجمن فارسی ام تی ای:اس ای .به انجمن فارسی ام تی ای خوش آمدید. لطفا قوانین زیر را جهت اطمینان مطالعه نمایید نسخه کوتاه لطفا با قضاوت صحیح از هرگونه اعمالی که باعث دردسر برای ما و شما شود خودداری نمایید. ضمنا بایکدیگر بدرستی برخورد نمایید نحوه تماس با ما سرور دیسکورد: (در صورت هرگونه سوال): مشخصات - لینک دعوت پیام در انجمن (پی ام - الالخصوص برای موضوعات خصوصی): لینک اعضاء توییتر : ام تی ای گروه استیم : لینک قوانین کلی الف) از هرگونه بی احترامی و برخورد نادرست خودداری نمایید ب) قوانین عمومی را رعایت نموده و از فحاشی، نژادپرستی، مباحث سیاسی و مذهبی خودداری نمایید پ) انتشار هرگونه لینک دعوت، تبلیغ و غیره خودداری نمایید ت) از انتشار هرگونه اطلاعات شخصی دیگر افراد خودداری نمایید ث) هرگونه انتشار و استفاده و یا درخواست کمک برای اسکریپت های لو رفته یا دزدی شده اکیدا ممنوع است ج) لطفا از استفاده حروف انگلیسی (به اصطلاح فینگلیش) خودداری نمایید
    1 point
×
×
  • Create New...