Jump to content

Forums

  1. Multi Theft Auto: San Andreas 1.x

    1. Support for MTA:SA 1.x

      HELP! HELP! Need help? Post here.

      55.9k
      posts
    2. User Guides

      These guides are a good place to start learning how to achieve certain things within MTA in an efficient and well mannered way.

      11
      posts
    3. Open Source Contributors

      This space is for contributors to discuss the development of MTA. No user suggestions/support.

      1.3k
      posts
    4. Suggestions

      Suggestions and requests go here. Please note that actual feature requests must be filed on our GitHub.

      7.7k
      posts
    5. [Read-Only] Ban appeals

      We have stopped accepting ban appeals for MTA. You can find more about this at our newspost: https://forum.multitheftauto.com/topic/139550-cheater-reports-ban-appeals-in-2023/

      4.6k
      posts
  2. General MTA

    1. News

      News and updates on Multi Theft Auto.

      9.8k
      posts
    2. Media

      User-made screens and movies go here.

      4.5k
      posts
    3. Site/Forum/Discord/Mantis/Wiki related

      Share your comments & concerns about our services.

      5.7k
      posts
    4. MTA Chat

      MTA related chat that is NOT support related!

      2.2k
      posts
    5. 331.2k
      posts
  3. MTA Community

    1. Scripting

      All Lua scripting topics related to Multi Theft Auto.

      262.5k
      posts
    2. Maps

      Discussions for maps on various gamemodes.

      13.5k
      posts
    3. Resources

      Everything else about resources.

      28.8k
      posts
    4. Other Creations & GTA modding

      This section includes things such as GUI themes, forum userbars, user-created MTA logos, etc. Also contains topics which cover general GTA modding areas that can be used in MTA, such as modelling.

      2.5k
      posts
    5. Competitive gameplay

      Discussions about various MTA-related competitive gameplay events. Also gang (clan) forums.

      26.7k
      posts
    6. Servers

      Looking for a server to play on? Looking for someone to host your server? Looking for a place to discuss with other server owners? Here's where to look.

      15.9k
      posts
  4. Other

    1. General

      Non-MTA discussions. Anything you want.

      38.1k
      posts
    2. Multi Theft Auto 0.5r2

      Discussion regarding Multi Theft Auto 0.5r2 for GTAIII and Vice City.

      694
      posts
    3. Third party GTA mods

      Showcase for single player mods and requests.

      813
      posts
  5. Archive

    1. 144k
      posts
    2. Trash

      These posts have broken forum rules. They are stored here temporarily so offending users can see what they have done wrong.

      4k
      posts
  • Posts

    • Yeah. I've seen this documentation. So much to start with xD. But yesterday i checked it and downloaded server folder from github repo. I thought that there will be more code. But for my luck that code is acceptably short. Like i guess still month to understand all functions, and how to call them. But one month to start code something is not that wrong. Anyway. Thank you so much for your help. For now i decided to make my own buffer system as module. As im not having problems with understanding C/C++ it will be easier even for me to make whole server as C code lol. I can make that module as lua script. But i like to keep everything organized. When i'll get courage to make that module. Maybe also i'll get will to make my own documentation and publish it. So no one longer gonna strugle with modules. Anyway. Thank you for your help again and your recomendations. From me i can recommend you getting in to C languages. Getting point of how them work improve also skills in lua. As you are "closer" to machine. I think that this topic can be locked.
    • I have no experience with C++ myself nor with modules. But I do know that Lua is fast enough for a basic gamemode. The moment C++ might become important is when you want to implement something like pathfinding.   There are other things that can save you more resources. For example using less timers. Most of the time getTickCount / getRealTime is more than enough. Or use as less as possible element data.   Sort of 😬: https://wiki.multitheftauto.com/wiki/Modules_Introduction
    • Ofc you are right. and this should always be good advice for everyone to not mess with critical data. i know it, and more programmers should know that. i like to organize everything in hierarchy of importance. like cars possitions can be lost if something happens wrong. as that's not so crucial to server working after shutdown. and in database are still hold relativeley "fresh" data, like vehicle possitions and so on. But money and housing systems for examples are 1st or 2nd importance. so it must be sure that after buying a house money amount is right and house owner is assigned afap in buffer and database.  and ofc validate everything. yeah i know that i can do that this way. but i was thinking about directly working with server objects.  like buffermodule takes objects how they real look like. and scan only for lets say vehicles. and all previous ideas of how it will be implemented in lua. and make them in Cpp instead of lua. oldtable newtable etc. direct calling from module to built in dbFunctions should be faster in theory. and if i use some coroutines i can prevent that way server from lagging. but still keeping the lua code just to drive module. but i can mistaken somewhere and what i think can be fast. can also be not fast. on one side i can then keep everything hardly bounded together. but on the other side it can be error generating nightmare. what i know from experience in Cpp xD. and my question is. do i'm right about it? and if so.  are there good sources to start with it? cause personaly i didn't found anything more usefull on the internet than example module. and ofc mta blue repo. im having in mind some sort of documentation. cause looking at servers source code just to get an idea of how module should look like and work pushes me back even from trying. im doing it everyday, so getting point of my mates is my second nature. but mta blue server is a lot of code.  so i guess my natural questions are. if there is a chance that server can save 5% to 10% of power and space. is there any code documentation? so i can short my working time on module. ofc if im right that it can save cycles. i never wrote mta module, and didn't heard opinions of people who did. maybe someone is reading this rn. please get in to discussion. you can help me and others just by getting in to discussion.  EDIT also thanks for earlier replying @IIYAMA 
    • For some changes it is a good way to save resource. Like for example statistics or car fuel. But do not do it for critical data. When for example your power shuts down, it could create weir de-syncs. (Like if you were buying a house ingame: you do not receive the house [in buffer] but the money has already been withdrawn [not in buffer])   You can use MySQL + dbConnect, instead of writing a custom module. The current MySQL module available is blocking the CPU thread, so that is not really an option for 200 players in my opinion. Also a way to save resources, is to enable multi_statements: local connection = dbConnect("sqlite", "database/database.db", "", "", "multi_statements=1") When for example if you want to remove data at multiple tables. dbExec(connection, "DELETE FROM shared_memory_file WHERE clientId = ?;DELETE FROM shared_memory_frame WHERE clientId = ?;DELETE FROM shared_memory_frame_position WHERE clientId = ?", clientId, clientId, clientId) Or get data from multiple tables: dbQuery(processRequestSharedMemory, { player, clientId }, connection, [[ SELECT variantKey, item, fileData FROM shared_memory_file WHERE clientId = ?; SELECT x, y, item FROM shared_memory_frame WHERE clientId = ?; SELECT x, y, z FROM shared_memory_frame_position WHERE clientId = ? LIMIT 1 ]], clientId, clientId, clientId)  
    • Maybe model has no plates, but defined texture one.

Twitter Feed

×
×
  • Create New...