Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. It is weird that the default argument is set to true for ponds pools though. ? Maybe it is not real water, just drawn. As the note on wiki suggest (window is missing though).
  2. Please stick with Portuguese, your topic has already been moved to your section, because you couldn't decide which language to use.
  3. Airplane This resource adds ambient aircraft to your MTA map. As many as you want, as long as the MTA element stream engine likes it. The aircraft models can be modified in config_s.lua. The resource was pre-mentioned in the Server time sync resource, because it is was an example resource which made use of serverside time. (And still makes use of) But by posting updates there for a different resource is a bit confusing. It is beyond a test resource now. Note: you still need to download the server time sync resource for this resource to work. You will be given an option to download server time sync resource, when you the download the resource airplane. The resource doesn't only creates planes, but also helicopters. Which is confusing I know, since the resource name is 'airplane'. But it was already too late for that without losing my version archive. Version 1.2.0 / 1.1.1 video's Admin settings Quantity aircraft Developermode Displaying the airplanes and other useful information. Demomode true - Let the resource create the aircraft false - Fill in your own aircraft list manually in file: config_s.lua How the aircraft is adjusted according to the GTA map. The blue crosses are used to display the max ground height of that specific area(200x200). You see that the crosses are placed higher near trees and buildings. The resource will adjust the aircraft height according to this data. This view is visible when development mode is active and some adjustments in the config_s.lua for the ground height data. Dataset for the aircraft height is available here: https://wiki.multitheftauto.com/wiki/Dataset-map-height Pro's: Low CPU usage after initialization. No network usage after initialization. Only the dependency server time sync will use network usage after initialization. Not that many lines of code for you have to scan through, if you want to modify the resource. Simple to implement. If you find a bug, I will be here. Con's No AI implementation. Brain-dead AI. The 'time based driven (animations)' concept is used, not everybody is familiar with that concept. That makes it harder to edit. It basically means that the aircraft animations are unstoppable, since time doesn't stop either. Pro: Which nearly nullifies the need of constant network usage between the server and the client. All aircraft are indestructible (even if not set to damage proof). (Can also be a pro) But I might add something in the future to counter that... but I first must figure out how that is suppose to work. Does not work outside of the GTA map. Download link: Resource Airplane Other downloads: Resource Server time sync Dataset GTA map height
  4. @TiTawNdo you need more information on this subject? (Or maybe an alternative to XML, depending on the context of the data)
  5. @nogisza friendly reminder that your question has been answered.
  6. Future development of the airplane resource. Fixing the aircraft fly height according to the GTA landscape.

     

  7. See this meta.xml tag. https://wiki.multitheftauto.com/wiki/Meta.xml Set it to true in the gamemode which you are using: <sync_map_element_data>true</sync_map_element_data>
  8. It should be working now. @ozulus I have added the large update for the airplane resource. NOTE: Both resources must be updated to the latest version. As promised, high performance after initializing and nearly zero latency. - Added a last minute fix for an unexpected error. 1.1.0 > 1.1.1 Note: Not all bugs have been fixed. Like for example, aircraft can still fly through mountains. But you can adjust that by adding the aircraft manually.
  9. By the way, I fixed the download of the test resource, which seems to be bugged by the forum. But the community resource page also has some issues, hope the link works for you.
  10. An new version on the test resource is getting a little bit out of hand in my local server. ? Creating a 101 aircrafts With very very little network usage. With very little Lua performance impact because of the similar method of the test resource. (This sample resource will be available on the community if there are more people interested in it)
  11. Good observation. If it is an old resource. The shaking is probably created by createExplosion. The explosion was set to tiny, damage + sound disabled and placed behind the camera. Which is the old method for making the camera shake.
  12. I have moved your topic to your own language section. Which you can find here: https://forum.multitheftauto.com/forum/97-portuguese-português/
  13. IIYAMA

    Object

    You can also cancel the object-break of the current resource. -- clientside addEventHandler("onClientObjectBreak", resourceRoot, -- resourceRoot so that it only triggers for elements of the same resource function() cancelEvent() setObjectBreakable ( source, false ) -- optional end ) Or make use of a propagation call for all elements of the whole resource: -- clientside (important for this method here is that you create the elements on serverside without delay > not on onResourceStart) addEventHandler("onClientResourceStart", resourceRoot, function () setObjectBreakable ( source, false ) end, false) Options enough.
  14. The xml object model (or a custom implementation) is saved inside of the memory. XML is fast for modifying specific nodes because of the model. When you run out of memory because the file is too big, it is normally for the server to use storage as memory (swap). Which is slow memory. But I am not sure if that is your problem, but it is a possibility. Read more about xml object model here: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms759093(v=vs.85) It is very important to unload large xml files. And never use it for data that keeps growing like logs.
  15. I have added a test resource for inspiration. Enjoy!
  16. I have added a server time sync resource to the community. Useful for scripters that want to play with (infinity) animations. Enjoy and best wishes!

     

  17. Server Time Sync This resource is used to sync server timestamp (in Milliseconds) to all clients. It is for scripters and resources that may use it in the future. The resource itself is not very complicated at it's core, but it can be incredible useful for (infinity) animations. For example to let many trains drive around the map with almost no bandwidth required, in that resource is the same concept applied. local timeNow = exports.servertimesync:getServerTime() if timeNow then local currentRotation = ((timeNow % 10000) / 10000) * 360 -- Rotate 0-359 every 10 seconds. end I have added a little test resource. Which you can download below. World location: 0, 0, ~. You can download the resource here. Enjoy your server . The test resource. (requires servertimesync)
  18. According to the warning, playerSource is nil. Try this: addEvent("fwheelset",true) function setf ( ) executeCommandHandler ( "fwd", client, "" ) end addEventHandler("fwheelset", root, setf)
  19. It does, there is code included for: exports.resourceName1:createLuaTimer("exports.resourceName2:exportedFunction", 3000, 1) <export function="createLuaTimer" type="client"/> But it can be a bit unreliable, since it doesn't check if an resource has been restarted. It will not destroy the timer, you will have to add that yourself.
  20. I think it more or less depends on the quantity of timers. As The_GTA mentioned triggerEvent can be very expensive, but if the amount of timers exceed a specific amount, it might become beneficial at some point. But the amount ???. I came with the following concept, which can handle lots of timers and is just as accurate(or better) as a normal timer. Note: Only when your resource(s) use a lot of timers, else it is not beneficial. Feel free to use/modify/inspiration. https://gitlab.com/IIYAMA12/draw-distance/-/blob/master/scripts/timer_c.lua
  21. Try this: function scp(thePlayer) local theVeh = getPedOccupiedVehicle(thePlayer) Be aware that this code does not sync the state of the component, it only syncs the adjustment. But it is a good start, keep it up!
  22. IIYAMA

    Money Hack

    yes
  23. IIYAMA

    Money Hack

    You will have to communicate that with the server. There is no server variant. It uses more resources than normal as mentioned on the wiki. But not how much is too much. Money given / set functions are probably not used every 1 second, so it should be a big problem to keep it on. (except when your server needs all resource to keep running)
×
×
  • Create New...