Jump to content

IIYAMA

Moderators
  • Posts

    6,089
  • Joined

  • Last visited

  • Days Won

    216

Everything posted by IIYAMA

  1. GTA san is limited to only 1 CPU core and MTA is also limited to 1 core. If you make your code unoptimised, new CPU's with more cores will not make a lot of difference. The Ghz per core isn't something that will be increased dramatically, so yes a little bit optimisation isn't too much to ask. I am having an Intel i7-3770K 3.50Ghz 4 cores with multithreading to virtual 8 cores. If I write very unoptimised code, I am still stuck at only 1 core. That is when my GTA san is starting to crash. Good CPU? Not for MTA and unoptimised code. And if you want to share it with your friends = download speed.
  2. The most important thing when are recording MTA, is to detect (important/large) changes. You can reduce a lot of data when you do that. You want to make the data as small as possible. So when you walk one direction and the rotation and Z as doesn't change much. You can delete all points in between. Of course you can record it first and later optimise.
  3. Dear MTA scripters, Today I will start working on the next beta version. It has been 2 months since I first posted this topic and after the version 1.0.3 there will be probably not another beta version. That also means you won't be able to subscribe for the beta any more and your name won't be in the spotlights. Unfortunately, the most important thing that you will miss is your feedback being applied to the product. When the debug console leaves the beta, not much large changes will be made afterwards. So every (large) feature you wanted it to have, is something you have to create on your own. I hope I have informed everybody about this matter. Keep following this topic, because the finally release is also getting close. You don't want to miss it, if you like this new way of monitoring your debug information. Version 1.0.3 The debug console will be able to communicate with the resource resedit from The_GTA. P.s: Another thing, you can also request for the beta by replying here (say that you want it, that's all you have to do to get it). Since some people had problems with managing their pm's, doing it this way would make it a lot easier.
  4. if getElementData(player, "AFK") then Or if getElementData(player, "AFK") == true then
  5. Don't give immature - greedy - screaming baby's new toys will you! He has to make his first steps on his own... and not driving cars yet.
  6. Yea, that also works when you don't want to sort.
  7. >ped< is just a predefined variable you made up by yourself. (>ped< it is not a predefined variable) Use >source< instead. Pls, don't read this page sloppy: https://wiki.multitheftauto.com/wiki/OnPedWasted
  8. I don't know an mta function for that. But you can: Read the gridlist and save it in a table. Clear the gridlist. Re-insert the items.
  9. That is fine when you have a pc that can handle everything. If the map you run renders very slowly, you might end up inside the vehicle when you are standing on it. As for the amount of dx you render (depending on the handler priority), the longer the delay will be. The moment when updating the position of the player and the vehicle, it should be as close as possible to each other. Syncs should have priority over effects. If you disagree with that, it is fine.
  10. onClientPreRender onClientRender renders too late.
  11. [quote name=..&G:..] I am trying to attach an object to the vehicle. I know I 've tried this function with a player and an NPC, and whenever I turned arround, the NPC was still facing northAttach objects should be fine, unless there is something(a script) interfering. In 2015 I released a train script. It attaches perfect with that function.
  12. You have to scale custom objects in you model editor. MTA can't scale Collisions. But if you do not care about collisions, this might help you: https://wiki.multitheftauto.com/wiki/Ge ... oundingBox
  13. You mean guiBringToFront? No, check this.
  14. You have to focus on the element before you can edit it. That is just how it is suppose to be, it is not a bug. There are afaik no functions to change the element focus manually. Although there are some workarounds like: https://wiki.multitheftauto.com/wiki/OnClientKey
  15. @mgdmgd Commands are not bound on resources. @ViRuZGamiing Anyway, you are getting pretty good at lua. A total different level as when we last met.
  16. Jup, yup, yep, (Except for the typo of the event on line 35 > onResourceStop) And this line: fileSetPos(file, fileGetSize(file)) It only has to be called ones, when the file already exist. But is not a critical thing. After writing lines, the position will also change, so no need to call it every time you add content.
  17. You can't have the same reason, because of line 6. nil values are not allow to pass line 6. Pls restart everything correctly. You probably have some data in your db which doesn't have a valid shaderid. Which means you have saved some incomplete/corrupted data. Validate the file-locations in your db with: https://wiki.multitheftauto.com/wiki/FileExists Delete those that do not exist.
  18. outputDebugString("filename[i] = ".. tostring(filename[i])) if theskinId then fetchRemote("http://localhost/shadersqsdqs/"..theskinId..".jpg", checkPlayerAlternateSkin) end
  19. I can't help you if everything is correct. You have to be more specific. AND DEBUG YOUR CODE MANUALLY LIKE I DID FOR YOU! outputDebugString(tostring(theskinId))
  20. There is also math.max (another problem) else aFinal = math.min(aFinal - 20, 0) dxDrawRectangle(posX,posY,sizeX,sizeY,tocolor(r,g,b,aFinal)) end else aFinal = math.max(aFinal - 20, 0) dxDrawRectangle(posX,posY,sizeX,sizeY,tocolor(r,g,b,aFinal)) end
  21. for i=1, #filename do -- local theskinId = filename[i].shaderid outputDebugString(tostring(theskinId)) -- end ? https://www.lua.org/pil/4.3.4.html
  22. Opening and closing a file for every command isn't a good idea. (when the file gets larger you might experience lagg) That's why the fileFlush function is so important. fileFlush
  23. It does, you just have to search better. https://wiki.multitheftauto.com/wiki/FileCreate In the Netherlands we would call a you a 'blind chicken', although it is just a way of announcing somebody who doesn't search very well. (don't take this personal) -- on the top of your script local newFile = fileCreate("command.log") fileFlush ( newFile ) -- log files require buffers to reduce hard-drive writing. (more performance) -- -- when a player writes a command if (newFile) then fileWrite(newFile, "Log the blind chicken!") end -- -- on resource stop > if (newFile) then fileClose(newFile) end --
×
×
  • Create New...