Jump to content

pixel77

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

pixel77's Achievements

Rat

Rat (9/54)

0

Reputation

  1. Hi! How do you deploy your updates from your development server to your production server? What is your workflow? Github push/pull/clone? Github CI/CD? Manually copy/paste modified files? Or do you use a self developed tool?
  2. data[1] and data[2] are numbers. For example: inUseData[12][5] = true The client is clicking on a dxDraw button, that is rendered on the 3D World.
  3. Hello! I have this code: client.lua: function clicksFunction(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) .... if isCursorInBox(x, y, 20, 20) then triggerServerEvent("serverEventName", resourceRoot, data) end .... end addEventHandler("onClientClick", getRootElement(), clickInTheFarms) server.lua: local inUseData = {} addEvent("serverEventName", true) addEventHandler("serverEventName", resourceRoot, function(data) if not inUseData[data[1]] then inUseData[data[1]] = {} end if inUseData[data[1]] and inUseData[data[1]][data[2]] == true then return end inUseData[data[1]][data[2]] = true --some more code here to do things end) My problem is when two player clicks on client side, and triggering server event in the exact same time, then the if inUseData[data[1]] and inUseData[data[1]][data[2]] == true then return end not blocking the code execution under this line. So they can run the "--some more code here to do things" in the same time, and I don't want to allow this. How can I solve this problem?
  4. But as I said, it does not always crash, so it is hard to test by disabling them one by one, and there is nothing error message/crash report. Any other methods?
  5. Because it happens to more players, the problem comes from a resource on the host.
  6. Hi! I am having a strange problem with my server. Sometimes when players connect to the server and the server files are loading, the MTA:SA client crashes/freezes. But the crash/freeze is completely random, not crashing all the time, that's why I can't stop resources one by one and test. The crash is not person specific, it happens to a lot of players, but not always. Sometimes they need to connect to another server/map editor first, then back to my server to prevent the crash/freeze, because sometimes MTA freezes a lot of times in a row. How can I find out what is causing the crash? There is no error message about anything when the MTA crashes, only the MTA window does not respond.
  7. Hi! I am having a strange problem with my server. Sometimes when players connect to the server and the server files are loading, the MTA:SA client crashes/freezes. But the crash/freeze is completely random, not crashing all the time, that's why I can't stop resources one by one and test. The crash is not person specific, it happens to a lot of players, but not always. Sometimes they need to connect to another server/map editor first, then back to my server to prevent the crash/freeze, because sometimes MTA freezes a lot of times in a row. How can I find out what is causing the crash? There is no error message about anything when the MTA crashes, only the MTA window does not respond.
  8. By the way the https://wiki.multitheftauto.com/wiki/Script_security#Securing_triggerServerEvent article is changed not a long time ago. The old triggerServerEvent validating still working or not? The old validation method server side: addEvent("onRaiseTheRoof", true) addEventHandler("onRaiseTheRoof", resourceRoot, function(arg1, arg2) -- Check data is coming from a client if client then -- The source for this event is always 'resourceRoot' if source ~= resourceRoot then reportNaughtyness( eventName, client, "source" ) return end -- arg1 should be the player if arg1 ~= client then reportNaughtyness( eventName, client, "arg1" ) return end -- arg2 should be between 1 and 100 if arg2 < 1 or arg2 >100 then reportNaughtyness( eventName, client, "arg2" ) return end end -- -- Do usual code for 'onRaiseTheRoof' -- end ) -- Helper function to log illegal things function reportNaughtyness( eventName, client, reason ) -- Report outputConsole( "Possible rogue client!" .. " client:" .. tostring(getPlayerName(client)) .. " eventName:" .. tostring(eventName) .. " reason:" .. tostring(reason) ) end
  9. But it is not relevant, because cheaters can see all of the bones position through walls, without weapon too.
  10. I see. Thanks. And if I am right, there is nothing against xray/wallhack?!
  11. How did you solved the distance measurement on server side? With timers?
  12. Yes, or jump out of a plane/helicopter, or jump off the roof. But what about explosions?
  13. And what if a cheater is flying or creating explosions, or changes other players positions, teleporting to other players with setElementPosition? @Dutchman101
  14. thanks, its working Yes, I know, just I needed a faster solution right now, but thanks for the advice.
  15. Hi, I have a SQL problem that I didn't have before: sourceS.lua:836: dbPoll failed; Field 'asdasd' doesn't have a default value I've been using the script for 3 years now, I don't know why it now asks for a default value. Okay, I could set a default value, but is there no other way to fix this issue? I think the problem started when I updated the MariaDB or PHPMyAdmin: mysql Ver 15.1 Distrib 10.5.11-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper My script running fine with this mysql: mysql Ver 15.1 Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 MTA:SA server version is 1.5.8. Thx for help!
×
×
  • Create New...