Jump to content

AGENT_STEELMEAT

Members
  • Posts

    551
  • Joined

  • Last visited

Everything posted by AGENT_STEELMEAT

  1. Write some code and try yourself before asking for code.
  2. Why global variables and why broadcast FPS to the server every second. Bandwidth rape much?
  3. Then you need to start writing some code. Try it yourself, and post it here so we can guide you.
  4. FPS - Frames Per Second. It's simple. Oh, and I did a simple Google search. http://stackoverflow.com/questions/8730 ... -in-a-game
  5. --Returns true if the given element is on the ground, false otherwise. --Note: this may return incorrect values if the element is not streamed in. function isElementOnGround(element) if not isEntity(element) then error("Invalid arguments to isElementOnGround (expected entity at argument 1)!") return false end local oZ = getElementDistanceFromCentreOfMassToBaseOfModel(element) local x, y, z = getElementPosition(element) if x and y and z then --Check if for some reason the position is not available (this shouldn't happen) local ground = getGroundPosition(x, y) return (z-oZ == ground and true) or false else return false end end --Returns true if the given value is an entity, false otherwise. local validTypes = { "ped" = true, "player" = true, "vehicle"= true,"object" = true, "vehicle" = true, "pickup" = true, "marker" = true, "blip" = true, "radararea" = true} function isEntity(element) if not isElement(element) then return false end local elementType = getElementType(element) if validType[elementType] then return true else return false end end Clientside only, though it would be pretty easy to implement serverside.
  6. If a simple console application causes your computer to crash, you have bigger issues than your ignorance.
  7. You don't know how to use a basic command line / write a simple .bat file to do the work for you. It's not the compiler's fault, since almost everyone is using the same compiler (luac).
  8. Adding lots of whitespace, using crazy tables {{{{{ {}, {}, {} }}}}}, using local variables (or renaming global ones) are all ways to confuse the Lua decompiler. local almightyBunghole = {{{{{ {}, {}, {} }}}}} _setElementPosition = setElementPosition function setElementPosition(element, x, y, z, warp) return _setElementPosition(element, x, y, z, warp) end local function resourceStart(startedResource) print(string.format("Resource %s has started!", getResourceName(startedResource) ) end addEventHandler("onResourceStart", resourceRoot, resourceStart) If you have something really precious, you could use Ransom's file downloading method.
  9. I sorta think the handling editor is starting to become a bit large for it's purpose - I think you should consider downsizing the code, or releasing a separate "H-Edit Lite".
  10. I had to break out the MS Paint skills for this one.
  11. No, it just sets it to the current health (nothing is cancelled).
  12. AGENT_STEELMEAT

    Element count

    The bigger your server, the more resources you'll need, quite simply. I remember when I used to work on FTA we had a serverside element count of 3000, and a clientside element count of 7000 (we had a big housing system). There was some lag when we used to make the pickups dance by default, but since then an option was added to have them sit still. The reasonable limit is whatever your server can handle - optimization is key.
  13. It's best to give troubleshooting a shot.
  14. Try using the default MTA ports. Probably won't make a difference, but worth a shot.
  15. Okay, good. I still think the problem lies in the port forwarding, can you post a log of what 'openports' returns in the console?
  16. Ok then. Are you using a 64-bit or 32-bit debian?
  17. Not that I know of. Perhaps give me the IP and I can test?
  18. I'm not sure. It could be a version conflict, try updating the server to the latest release version of MTA, and ensure that all your clients are using the same version.
  19. There is a bug with onClientPlayerDamage anyways, it seems sometimes cancelEvent() works, and other times it doesn't.
×
×
  • Create New...