Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 23/11/22 in Posts

  1. With the rise of specialised anti-DDoS solutions, it is possible to make your MTA server almost immune to DDoS attacks, should you know how to isolate your other services & ports properly so that the specialised DDoS protection can absorb everything. For example, the market-leading soyoustart and OVH GAME anti-DDoS provides 100% protection with MTA natively supported through their protection layer (if you enable it for your specific MTA server UDP ports in their Hosting Control panel).. so that you can't be DDoSed if the following circumstances are met: * There is no attack method that your hoster, e.g OVH still needs to patch (they surface every now and then, it's a cat and mouse game) * You managed to isolate other services and ports, this requires a serious extent of skill and understanding of networking (like being a sysop or having studied for it) As part of 1 of the isolation steps, securing your HTTP resource download interface can be important. This guide is for that particular thing. If you use the internal HTTP server in MTA server, you aren't protected at all (except for maybe your hoster's general traffic firewall).. if an attacker can't deal serious damage through sending DDoS to your UDP ports, they will usually carry out TCP attacks next. More details on isolating other services & ports may follow in the future in Reserved posts to this topic. Let's get to the point: Basic tutorial for setting up Cloudflare for HTTP server in MTA 1. Add your domain to CloudFlare, using it as your DNS provider. It will tell you what nameservers to assign to your domain 2. Under the DNS tab create an A record for either your subdomain or the domain itself that should point to your Nginx. In here add the IP address to the Nginx server. (NOTE: You should use the standard HTTP port in your Nginx config and use that subdomain as your server_name). Make sure to tick the proxy status to on so that the request is proxied 3. In your mtaserver.conf set httpdownloadurl to whichever (sub)domain you assigned for the downloads You can then further modify your CloudFlare settings to have https, a firewall setup etc. But that's a lot more specific than what you may go with initially. Under "caching", then "configuration" you can setup how the caching itself should work Extra info (to help you understand the logic of this infrastructure): - For using CloudFlare in this way, you need just a domain, no webhost (other than the nginx External HTTP server itself). You need to be able to point the nameservers to Cloudflare. You will have to modify the DNS records at Cloudflare, and point it to your nginx External HTTP server. Since you can't just upload that data to Cloudflare and have them handle it that way The subdomain is essentially just used for Cloudflare to proxy request through, when it has that data cached it will serve it itself If not it will go further to your Nginx server to fetch it, then caches it - It is recommended to use a separate machine (VPS/dedicated server) to host your External HTTP, which Cloudflare is connected to on its time. Why? Because it helps you to isolate from DDoS attacks.. for reasons like these: * keeping your real host IP hidden is crucial to benefit from the added protection of Cloudflare. If you use a host on the same machine as your MTA Server is, it's easy to leak the IP, rendering your CloudFlare useless should they attack it directly rather than where it gets served from (Cloudflare hosts). * if an attack hits your HTTP server after all, load won't get forwarded to your main MTA server machine and immediately freeze its CPU with 100% usage/disconnect all players
    1 point
  2. Probam da udjem pise mi connecting,i posle nesto connection timed out
    1 point
  3. I felt the need to reply purely by how elaborate your lie is.. You ran a cheat from a Brazilian provider of paid MTA hacks. It's been fully confirmed through technical analysis in AC, so if your story about being an admin on a big server is true, i hope that the owner finds out what you were really doing Ban appeal denied, wait for it to expire @Mari Cupcake
    1 point
  4. try this local sX, sY = guiGetScreenSize ( ) local onEmoji4 = {}; local plyEmoji4 = getElementsByType ( "player" ) local showEmoji4 = false function onEmoji4Render ( ) local cx, cy, cz = getCameraMatrix () for p in pairs (onEmoji4) do if ( isElement(p) ) then local x, y, z = getPedBonePosition.. --- -- blag blah blah local dEmoji4 = getDistanceBetweenPoints3D ( cx... -- blag blah blah if ( dEmoji4 < 100 ) then if ( isLineOfSightClear ( cx, cy... -- blag blah blah if (getElementData (p, "Emoji4") == true) then local sx, sy = getScreenFromWorldPosition...-- blag blah blah if ( sx ) and ( sy ) then local sEmoji4 = 400 / ...-- blag blah blah dxDrawImage ( sx - ( sEmoji4 / 2 ), sy - ( sEmoji4 / 2 ), sEmoji4, sEmoji4, "T_UI_Message_Icon_Aisatsu_BC.webp", 0, 0, 0, tocolor ( 255, 255, 255, 255 ) ) end end end end end end end function attachEmoji4 ( Emoji4 ) if not Emoji4 or not isElement ( Emoji4 ) then return end onEmoji4[Emoji4] = true addEventHandler ( "onClientRender", root, onEmoji4Render ) setTimer(function() removeEventHandler ( "onClientRender", root, onEmoji4Render ) end, 2000, 1) end addEvent( "StartEmoji", true ) addEventHandler( "StartEmoji", root, attachEmoji4 )
    1 point
  5. There is the problem. use it like this triggerClientEvent( source, "StartEmoji", source )
    1 point
  6. LuaRocks is the package manager for Lua modules. Small tricks allow you to use it on MTA server. Installing Linux x64: Windows x86: Usage example: Installing packages is done by typing commands such as: Linux: luarocks install lua-cjson Windows: luarocks.exe install lua-cjson Now you are ready to load this package from MTA. Do this in your Lua script file: -- You should run this function once in your resource initLuaPackage() -- Load library local json = require "cjson" -- Use it print( json.encode({ key = "example" }) ) It's done. Tell me in PM, if you have any remarks and additional information for this tutorial. Thx
    1 point
  7. hello @Lalalu welcome to the forum, I made an edit about this topic, I recommend you to try it. local sX, sY = guiGetScreenSize ( ) local onEmoji4 = {}; local plyEmoji4 = getElementsByType ( "player" ) local showEmoji4 = false local isEventAdded = false function onEmoji4Render ( ) local cx, cy, cz = getCameraMatrix () for i = 1, #plyEmoji4 do local p = plyEmoji4[i] if ( onEmoji4[p] ) then local x, y, z = getPedBonePosition.. --- -- blag blah blah local dEmoji4 = getDistanceBetweenPoints3D ( cx... -- blag blah blah if ( dEmoji4 < 100 ) then if ( isLineOfSightClear ( cx, cy... -- blag blah blah if (getElementData (p, "Emoji4") == true) then local sx, sy = getScreenFromWorldPosition...-- blag blah blah if ( sx ) and ( sy ) then local sEmoji4 = 400 / ...-- blag blah blah dxDrawImage ( sx - ( sEmoji4 / 2 ), sy - ( sEmoji4 / 2 ), sEmoji4, sEmoji4, "T_UI_Message_Icon_Aisatsu_BC.webp", 0, 0, 0, tocolor ( 255, 255, 255, 255 ) ) end end end end end end end function attachEmoji4 ( Emoji4 ) if not ( Emoji4 and isElement ( Emoji4 ) ) then return end if(isEventAdded) then return end -- if event added don't go onEmoji4[Emoji4] = true addEventHandler ( "onClientRender", root, onEmoji4Render ) isEventAdded = true -- mark as added setTimer(function() removeEventHandler ( "onClientRender", root, onEmoji4Render ) isEventAdded = false -- mark as deleted end, 2000, 1) end addEvent( "StartEmoji", true ) addEventHandler( "StartEmoji", root, attachEmoji4 ) local dEmoji4 = getDistanceBetweenPoints3D ( cx... -- blag blah blah and something caught my eye I'm seeing non-Lua codes, can you explain a bit? In addition, the code I sent you above will fix the eventHandler problem.
    1 point
  8. si deja de funcionar al salir del servidor, es por que da un error, hay que añadir otra funciòn mas en el server addEventHandler("onPlayerQuit", root, function() if objects[source] then destroyObject(objects[source]) objects[source] = nil triggerClientEvent("water_walk", root, objects) end end )
    1 point
  9. A dead coroutine means that this: local SCAN_WORLD = coroutine.create(function() end) function has ended it's execution in some way. Either by an error or just running until the very end. I recommend to start the next async call just before the yield. This will eliminate the problems of resuming dead coroutines. So: STREET_LIGHTS.SCAN_TIMER = setTimer(resumeScan, 1000, 0) addEventHandler("onClientResourceStart", resourceRoot, function() if not isTimer(STREET_LIGHTS.SCAN_TIMER) then STREET_LIGHTS.SCAN_TIMER = setTimer(resumeScan, 1000, 1) end return true end) Run the code for X amount of time and start the resume timer there: (see a version of your current method below) local MAX_EXECUTION_INTERVAL = 3 -- ms local maxExecutionTime = 0 -- inside of the loop if getTickCount() > maxExecutionTime then STREET_LIGHTS.SCAN_TIMER = setTimer(resumeScan, 1000, 1) coroutine.yield() end You might consider balance the STREET_LIGHTS.SCAN_TIMER timer out with the max execution time. function resumeScan() maxExecutionTime = getTickCount() + MAX_EXECUTION_INTERVAL return coroutine.resume(SCAN_WORLD) end ---> math.abs(x) % 100 == 100 This will never be true 100 % 100 = 0 99 % 100 = 99 101 % 100 = 1 500 % 100 = 0 You might consider using 0 math.abs(x) % 100 == 0 if math.abs(x) % 100 == 0 then SCAN.current.x = x print"yield" STREET_LIGHTS.SCAN_TIMER = setTimer(resumeScan, 1000, 1) coroutine.yield() end
    1 point
  10. 1 point
  11. Don't lie Disable hardware spoofer, we won't be of any help
    1 point
  12. We know who you are, so pretending you have no idea why this PC is also banned (because it belongs to you.. a paid hack user) isn't going to change anything The answer to your original appeal at https://forum.multitheftauto.com/topic/135698-ban-trainer-im-sorry/ is final
    1 point
  13. This matter (also about that particular serial) was already answerred in another topic: https://forum.multitheftauto.com/topic/136652-ac-4-trainer-кикнул-вас/#comment-1012958 As explained, there is nothing we can do.. but in a few mins, i will solve that ban which is on it because someone who was duplicated got it banned.
    1 point
  14. شكرا ولله فدتني كتييييييييييييييييير
    1 point
×
×
  • Create New...