Jump to content

botder

MTA Team
  • Posts

    524
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by botder

  1. The chat box doesn't work like that. To accomplish your suggestion we would have to assign an unique message id for every chat message. You could use the id to receive, edit and delete a chat message. Feel free to submit a ticket in the bugtracker.
  2. You can use my premake-refactor repository of the modules: https://github.com/Necktrox/multitheftauto-modules
  3. Well, I didn't work on my resource for a long time, but I can also link to newer resources.
  4. https://wiki.multitheftauto.com/wiki/Shader
  5. You could try it in a virtual machine.
  6. if _G[tostring(d)] == true then _G is the global table.
  7. Your method reads the complete file everytime somebody requires it (if you don't save it on your client's disk). Your server blocks until the file has been read. If 3 players connect and request your file then it will block your server 3 times (time outs may occur), because you don't keep the file content in memory.
  8. http://lua-users.org/wiki/ExpressionsTutorial Look there. (=> Relational expressions)
  9. He can make a clientside script, which will fade the camera in and change the camera matrix on resource start. I never implied he is forced to use onPlayerJoin.
  10. You can add this option to your meta.xml if you want to start a script earlier than the others: <download_priority_group>1</download_priority_group> Here is the explanation from the wiki: In the early starting script you can change the environment prior to the download of the other resources.
  11. It's a good idea to approach the reading of the file into memory by increasing the buffer-size depending on the size of the source file. The formula to compute the buffer-size should consider hardware speed, memory size and source file size. Hardware speed (cheap VPS with 1/2 cores vs. multicore root servers) and memory size should be hard-coded as constants (does the garbage collector give any information to calculate an optimal threshold for memory usage iykwim?). Code it and publish it as a useful function on the MTA wiki Furthermore, you might shot yourself in the leg if you rely on 3rd-party programs calculating the MD5-filehash by hashing each 1024 bytes while your script does it with e.g. 4096 - the resulting hash will be wrong. (You might load the entire file into memory and then hash each 1024-byte part, but wouldn't that end up with Lua copying each 1024 bytes again into memory, which would kill the whole point of file-readin optimization?). Nevertheless, a fast function to load an entire file would be useful for other purposes if you need the file as a whole (e.g. script execution).
  12. Well, hello there. My hash function does not follow any standards and to improve the performance I decreased/increased the buffer size. The result was that increasing the buffer was counter-performance in this case, but this statement may be false on larger files - didn't investigate. I am open for improvements on my shitty code Edit: http://stackoverflow.com/questions/10324611/how-to-calculate-the-md5-hash-of-a-large-file-in-c This is not a standard description page, but the example codes given by the authors of each posts indicate that 1024 is the correct size for this.
  13. That's why you can't use '#' length operator on the result table.
  14. https://community.multitheftauto.com/index.php?p=resources&s=details&id=6380 This one is free and has more features.
  15. Each resource on your server can only read/write its own files by default. You can give resources the permission to read/write to other resource folders by giving them ACL permission for general.ModifyOtherObjects. You SHOULD NOT give this permission to any resource, which doesn't need it. Read more here: https://wiki.multitheftauto.com/wiki/ACL
  16. Could you try other servers on MTA and report your FPS experience? MTA is running scripts on your client-side, which takes performance, while SAMP is completely on server-side. A bad scripted server might impact on your FPS.
  17. botder

    Shaders

    Use the mta-helper.fx for some specific scripting references (for various Matrix structures): https://nightly.multitheftauto.com/files/shaders/mta-helper.fx Articles: http://rbwhitaker.wikidot.com/hlsl-tutorials http://www.catalinzima.com/xna/tutorials/crash-course-in-hlsl/ https://msdn.microsoft.com/en-us/library/bb944006(v=vs.85).aspx Advanced: http://http.developer.nvidia.com/GPUGems/gpugems_part01.html http://xbox.create.msdn.com/en-US/education/catalog/?contenttype=0&devarea=14&sort=1 Something to buy: https://www.packtpub.com/game-development/hlsl-development-cookbook Not sure if this one works: https://developer.nvidia.com/fx-composer
  18. Test package: https://mega.nz/#!kYVzzaAb!CUEWe9llnrld ... 5sHrCgZRu0 Result: [Local] (5s) Calls: 5534587 [Export] (5s) Calls: 537927 [Local_Long] (5s) Calls: 1471 [Export_Long] (5s) Calls: 1421 [Local_Long_Long] (5s) Calls: 707 [Export_Long_Long] (5s) Calls: 718 Legend: Local is a resource-local function Export is a foreign-resource export function Long is a loop with 5000 iterations Long Long is a loop with 10000 iterations Summary Local functions are super fast, but they are technically equal to the exported functions when they iterate a lot.
  19. And did you do it correctly? "high" will be drawn frist (bottom) "normal" will be drawn as next "low" will be drawn as last (top)
  20. Maximum size for GUI is limited by CEGUI to resolution.
  21. https://wiki.multitheftauto.com/wiki/Ge ... GUIElement You can use the getElementID hack to get every resource https://forum.multitheftauto.com/viewtopic.php?f=91&t=94573
  22. https://community.multitheftauto.com/ind ... s&id=12365 Copied my resource from my GitHub repository. Removed the copyright and broke the license (GPLv2). https://github.com/Necktrox/debugconsole Same applies to an other resource uploaded by him: (also GPL) https://community.multitheftauto.com/ind ... s&id=12366 Original: https://forum.multitheftauto.com/viewtopic.php?f=108&t=88047 DONE
  23. That's how you archieve the effect from your picture (1 name-less column for flag icon and 1 column for country name).
  24. https://wiki.multitheftauto.com/wiki/Re ... scoreboard exports.scoreboard.scoreboardAddColumn("CountryIcon", root, 40, " ", 3) exports.scoreboard.scoreboardAddColumn("CountryName", root, 100, "Country", 4)
  25. A particular resource helpmanager uses that "hack": https://github.com/multitheftauto/mtasa ... nt.lua#L48
×
×
  • Create New...