• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team
    • jhxp

      Multi Theft Auto: San Andreas 1.5.4 is out!   21/04/17

      Click the link in the announcement for more details.  

Dzsozi

Members
  • Content count

    455
  • Joined

  • Last visited

Community Reputation

15 Decent

2 Followers

About Dzsozi

  • Rank
    Hustler

Details

  • Location
    Hungary

Recent Profile Visitors

688 profile views
  1. @Zango I like your second idea better, but I also like parts of the first one. I will try to mix these two, my idea is to create a timer after a certain distance, and then burst the tyres, the timer would have a random time generated by the script if the driver goes above the given distance, and then reset the distance counter after the tyre was burst, so the whole thing starts from the beginning with a newly generated timer with a random time. Thanks! One more question, which is better in your opinion? - to use the setTimer function - to use onClientRender and getTickCount? Right now I find the second one easier and better, but I don't know, I really want to prevent lags and fps drops.
  2. Hello! I would like to create a script in which your vehicle's tyre would burst randomly, so I can do things like you will have to change tyres, etc. but I don't know what would be the most efficient way to do this, since I will have to do it server side to sync it, I don't think setTimer is a good choice, therefore there would be lots of timers which is not really good I guess. Or is it okay to use timers? If so, how should I use them, when to create and kill them, etc. Any suggestions or help in connection with that? Has anybody made something similar like this?
  3. I know it doesn't remove the lights, but this is one useful resource if you want darker nights without shaders. http://community.multitheftauto.com/index.php?p=resources&s=details&id=9333 I think you should at least try it and see if you like it.
  4. You can try using https://wiki.multitheftauto.com/wiki/CreateAnimation function. I didn't test it or tried it out but it might work.
  5. Fixed it by myself omg... The problem was in the meta, I should write the weatherS.lua before the waterS.lua, not after the waterS.lua. Thank you anyway!
  6. Still not working, btw, it must be added there so you can use the event in other resources as well.
  7. Hello! I am trying to make a new custom server-sided event for my weather system, but for some reason it doesn't work in an other script. Here's the handling of my custom event in weatherS.lua: addEvent("onWeatherChange", true) local lastWeather = getWeather() function checkNewWeather() local weather = getWeather() if weather ~= lastWeather then triggerEvent("onWeatherChange", getRootElement(), lastWeather, weather) lastWeather = weather end end setTimer(checkNewWeather, 50, 0) And here's the part that doesn't work inside waterS.lua: function testWeatherEvent(lastWeather, weather) outputChatBox(tostring(weather)) outputChatBox("lol") end addEventHandler("onWeatherChange", getRootElement(), testWeatherEvent) It doesn't output anything from the waterS.lua, not even the "lol" string. Finally, here's my meta.xml: <meta> <download_priority_group/>2<download_priority_group/> <script src="waterS.lua" type="server" /> <script src="weatherS.lua" type="server" /> <script src="timecycS.lua" type="server" /> <export function="onWeatherChange" type="server" /> </meta> Could somebody tell me what is the problem or what am I doing wrong, or help me fixing this?
  8. I was thinking about that too, but I think there would be too much objects then. EDIT: And also, when using the useLODs setting in the maps' meta file, it won't change, the default SA model will still be visible as a LOD (I guess).
  9. I checked it this way and it says false, but I don't know why. function fixWallModelLODs() for index, mod in pairs(mods) do if string.find(mod.fileName, "/walls/") then for k, v in ipairs(getElementsByType("object")) do if getElementModel(v) == mod.modelID then return outputChatBox(tostring(setLowLODElement(v, v))) end end end end end
  10. Hello! I have a few models modded on my server that I can use with mapping, for example wall models. The problem is that they are modded on land masses, like a road from SF and such, but I would like to use their LODs, so they would be visible from a distance, the only problem is that their low LOD elements are the default GTA SA models, so a wall object has a road LOD element. I would like to change the low LOD elements of these walls to the modded object, so a wall would have a wall LOD. Here's what I came up with, but for some reason it doesn't work, the low LOD elements are the same GTA SA LODs. Does anyone know if it is possibble or know how to fix it, maybe I did something wrong in the script? I can't manage to do that by myself and I don't see any errors in the script or in the debugscript either. I would appreciate if somebody could help me with this. function fixWallModelLODs() for index, mod in pairs(mods) do if string.find(mod.fileName, "/walls/") then for k, v in pairs(getElementsByType("object")) do if getElementModel(v) == mod.modelID then setLowLODElement(v, v) end end end end end addEventHandler("onClientResourceStart",resourceRoot, function () fixWallModelLODs() end) Thank you in advance!
  11. Yes, it works that way, thank you!
  12. But I don't really understand how.
  13. I fixed it already, thanks to @NeXuS™, but yes, the problem was what you wrote @MrTasty. Thank you for the help!