Jump to content

Bonsai

Members
  • Posts

    1,031
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Bonsai

  1. It should be much more expensive. Right now the queue is always full, therefore increasing the price would bring MTA more money and might stop certain servers from renewing it every week, so other servers have a chance to get into the queue aswell. I think at least the discount could be removed for now, @ccw
  2. If you are not sure about the if condition then simply make it two seperate ones. Also I think removing an entry from the table you are currently looping through will break something.
  3. Is that something public or leaked?
  4. Bonsai

    MTA on Steam

    Do you know what Rockstar/Take 2 did to the GTA 5 Multiplayer Mod? They don't care at all what the players want. They want you to play their official Multiplayer to make as much money as possible. People who are playing MTA SA does not help them much.
  5. That also creates a new table in the database for each map. Uhm, I'm not sure what u mean. Its only about the best way of storing toptimes. I would prefer to not have a seperate table for each map. But I dont know if that works, performance wise. I already have a table containing all maps data, eg. name, creator etc. Would be nice to use their key in another table that only has the toptime entries. Maps: Key Name Creator ... 1 Map1 Bonsai ... 2 Map2 Bonsai ... Toptimes: Key MapKey Player Time 1 1 Bonsai 70000 2 1 ccw 70001 3 2 Bonsai 90000 and so on. The toptimes table would become pretty big and also frequently used.
  6. Hey everyone, I'm wondering about the best way to store toptimes in a database. The toptimes resource that comes with MTA creates a new table for each map, containing the toptimes. This seems to be an easy solution but it doesnt feel right to dynamically create a table like that. Does anyone have a alternative design how to do it? My concern is that looking up toptimes might take too long when they are all stored in one table. I have about 8000 maps. When each has 100 toptimes average at some point, you end up with 800.000 entries. Bonsai
  7. If you make them clientside, only that player can see them.
  8. Then you probably have to work with tables and use players or the image path as an index. Everything but creating a new texture on every frame.
  9. Creating a texture and shader should not be done inside a render function. Do it only once somewhere, then use it.
  10. Bonsai

    Need help

    Line 15 in your server script, did you mean to use triggerClientEvent maybe?
  11. Instead of having to calculate if the vehicle bounds are inside of a certain area now I use processLineOfSight to make the area check if the vehicle is touching it. The idea behind using the bounds was to be able to not just check this small line from processLineOfSight, but a bigger width by getting the distance between vehicle bounds and the area. Think of it like a tube with a certain diameter. With processLineOfSight I can only check the center of it, but the whole width.
  12. I'm not calculating them anymore, I changed to using processLineOfSight again, which works but it would be nice to be able to check a bigger range, like a tube, not just a line.
  13. Yes, but it wasn't about the box itself, but the positions of the corners. I tried doing it with matrices and it worked, but its too slow to do it in a render function sadly.
  14. Yes, I also found that before I posted but meanwhile I figured something similar out (attaching 4 dummy elements to get positions) just to test if the idea itself works. Turned out it doesn't. Have to stick to using processLineOfSight which sadly doesn't let you check a bigger width.
  15. Its not about a col shape or anything like that. I just need the positions of the corners of the bounding box so I can calculate if it hits something. As far as I can see getting the bounding box of a vehicle doesn't take the rotation into account, so you only get the accurate points with a Z rotation of 0°. But in the map editor, the bounding box that appears when selecting an element rotates with the element. So it definitely is possible somehow, but the code of the map editor for that feature seems to be outdated. So I thought there might be an easier way to do it. Matrices turned out to be very bad, performance wise. Bonsai
  16. Isn't it obvious why that happens? You press the button, the cursor shows, you release the button, the cursor disappears. You need to check if the button is pressed or released.
  17. Bonsai

    Nvidia optimus

    Try force window mode, worked for me in the past.
  18. The red is what you get from the function, if the rotation of the vehicle is 0 (or 180). When you move, the vehicle moves out of the box, since its not a cube. The map editor has such a feature too, and it stays in the box even when rotating. I did not fully check the map editor code yet since I thought there might be some easy solution.
  19. Hey, anyone knows how to make the function https://wiki.multitheftauto.com/wiki/GetElementBoundingBox work with a rotated vehicle/object? If I get the position of a vehicle and add the values returned by this function, they are only at the correct position if the vehicle isn't rotated. How do I make it take the rotation into account? Bonsai
  20. Bonsai

    SQLite Problem

    The table in the database is named like the players account? Else it needs to be in there WHERE condition.
  21. You cannot access client side functions/events/variables server side. You need to pass everything you want to use on the other side.
  22. I remember a bug report about that problem. If you bound 4 chatbox keys, then unbind one, all will be gone. But they are not actually gone, they reappear once you bind another key again. If you do it without scripting, it works as expected: If you are ingame, and you use "/bind <key> chatbox Inputtag", you can add your own chatbox bind without any script functions. Thats not so special yet, but if you unbind that key again, the bind is gone. If you bound several custom chatbox inputs, you can actually unbind them one by one. Therefore, I think this is a problem thats still not fixed.
  23. Wasn't it like you can only unbind all custom chatbox keys? bindKey("g", "down", "chatbox", "Global") bindKey("c", "down", "chatbox", "Clan") bindKey("l", "down", "chatbox", "Language") unbindKey("g", "down", "chatbox") --unbinds them all?
  24. First of all, you should not use the same name for functions and variables.
×
×
  • Create New...