Jump to content

Bonsai

Members
  • Posts

    1,031
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Bonsai

  1. No, that wouldn't work. Its simply created by createObject and similar functions.
  2. No, its not about the map editor. I'm just loading maps with a custom map loader, going through the map file and create the objects later on. But e.g. this glassy object: It looks the same from inside: When loading it with the default race resource, it looks like that too, having the double sided attribute set to false in the map file. So when I load that object myself, the map file says doublesided is false, so I set it to false using setElementDoubleSided function. And I guess that makes it only having one side visible, while actually both should. So I think however MTA loads objects, there is something being done that I don't know about, to solve this. Or maybe thats not the problem at all, but its the only thing that makes sense to me, since forcing doublesided to be true makes it look normal, but the map file says it should be false. Bonsai
  3. Hey, there are some objects that are double sided by default, and apparently stay like that even if they have the "doublesided" attribute in a .map file set to false. So when I load those objects myself, the default doublesided attribute is overwritten, since it says false in the map file, which makes them look different to how they are in the SA map. Is there any way to know which objects have this? I couldn't find anything about this neither in the MTA resources nor the MTA source code. Bonsai
  4. Sorry for double post, I can't edit my original post somehow. I meanwhile tried something, which seem to work, but I would appreciate if anyone can confirm that to be a solid solution for the problem. Basically, I modify the metatable of _G and redirect all changes there into my newly created environment.
  5. Hey, I have a problem with loading script files of maps into an environment. If a map uses "addEventHandler" to e.g. add the event "onClientMarkerHit" it most likely uses the "source" variable inside the attached function. However, this source variable does not exist in the scripts environment. The only way to still make it work at the moment is to let it have access to the _G environment, where the variable seems to exist. Is there a way to make it work without that? Bonsai
  6. Wiki of addCommandHandler: "This function will attach a scripting function (handler) to a console command, so that whenever a player or administrator uses the command the function is called. Note: You cannot use "list" or "test" as command name."
  7. Virtual Box works fine for me. A bit laggy but good enough for tests. For latency related testing I'm using WANem.
  8. What is number? If you use it like this, its a variable, so you cannot do something like playerTable.number. You can only do that if you use it like this: playerTable["number"] = {}.
  9. Does this really have to be onPlayerConnect? If you could use the clientside event "onClientResourceStart", you would only have to trigger a server event passing the resolution. Then you can output it for everyone.
  10. Did you edit the picture cause this is a stolen resource?
  11. Thats related to the min version set in the meta file of that resource. Check what it says there and compare it to your servers version.
  12. My last map was long ago, but often the editor_test resource could help to get things back in such situations.
  13. The triggerClientEvent function is outside of the loop so you cannot use the "player" variable of the loop. Instead it uses the resource variable also called "player", that is provided by onResourceStart event.
  14. Bonsai

    Server list spam

    Hey, Fake: mtasa://46.105.180.204:22010 Situation: Since April, this server is no part of the DDC Community anymore and was supposed to be renamed. Sadly it hasn't been done yet and it doesn't seem it will happen any time soon, we gave them several month now. Bonsai
  15. @Bonsai, have a look at line 10: destroyElement( chatSphere ) Even if the chatsphere is created a billion times, that doesn't matter. If it wasn't destroyed it would be 100 times worse. Just because MTA provides a function that lets you get all elements within a colshape, it doesn't mean its faster. How does it work internally? Maybe after all its just comparing positions aswell, so you could just compare them yourself without having to create and destroy elements, which might also have to be synced with the clients.
  16. There are 50 clients CPU's, but only 1 server.
  17. A colshape every time someone sends a message? I'm not sure if "getElementsWithinColShape" even works if a player doesn't actually enter the colshape, but is already in it when it is created. And all of this is happening serverside. Just send the messages to all players and let the clients do the math if they are near enough.
  18. I once read somewhere on the wiki that dynamic objects wont be affected by gravity as long as they are not touched or something, and a way to fix that is to use setElementVelocity(element, 0, 0 ,0) it said.
  19. What is the getControl function returning? Apparently not a gui element as it should, at least in this case.
  20. Bonsai

    Server list spam

    I'm pretty sure TDD refers to a certain gamemode, Team DD.
  21. If you really have no idea how to make that, then it will be pretty much impossible for you. Why don't you try to make it with normal MTA gui first, and once everything works you can switch to CEF.
  22. Where is the handler? Most likely not bound to a specific marker, but all markers.
  23. Hey, This isn't really a problem I have, I'm just curious. I noticed that the "moveAwayPlayer" part of the spectator script of the default race resource doesn't seem to be needed anymore. It used to fix the camera trying to focus on dead bodies as far as I know. I'm wondering what has been changed to make this work without it now. Is it related to the camera functions that have been added some time ago? Bonsai
  24. Well surely they are fixable, but its not my business. As I said, its maps scripts that are loaded and executed, I cannot fix them all
  25. Hey Peeps, is there are way to suppress warnings and errors, so they don't show up in the debuglog? I have a resource that is producing a lot of errors, but those errors are not important and not fixable (map scripts). But they are spamming my debuglog too much so actual problems might be missed. Is there something like that? Bonsai
×
×
  • Create New...