Jump to content

botder

MTA Team
  • Posts

    524
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by botder

  1. You might have a powerful machine like I do, which might not show any huge performance impact when running some code in each render call, but there are other players, which will suffer from "bad code", because the scripter couldn't invest a little bit time to keep that code to a minimum (your code advise). Sorry if I sound arrogant in your eyes, but your care for performance optimization is low.
  2. Why take it to the extreme? I merely suggested what I use for my own needs, there are obviously ways to optimize it. So it doesn't necessarily render what won't be shown on screen. Did I claim it to be the best way to do it? No, there are many different ways to find a solution to this problem. All in all, it comes down to the way you prefer making things. It suits my needs perfectly, and it's easy to work with. I haven't had and I sincerely doubt I will encounter any performance issues. How about actually contributing to my suggestion rather than to try to bash it with arrogance? Nice wall of text to bash me back. Anyway, you give him an example how to write bad code and it will decrease performance of the client (FPS drop) when the message count increases. You could have told him how to actually show only the neccessary lines, which will be seen on the screen instead of (again) leading him to bad coding (which you should have maybe learned to avoid from your experience).
  3. Good idea Dealman. Taking your example to the extreme - render 200 lines to show show only 15 makes sense.
  4. https://wiki.multitheftauto.com/wiki/FindRotation angle = findRotation(cursorX, cursorY, imageX, imageY)
  5. You have to calculate the angle for the pictures, not the cursor.
  6. You have to use getControlState to sync the movement of the following car with the leading car. The problem is that you can't apply the control states right then when they happen - you need to delay it.
  7. Should the following car be driven by a player or ped?
  8. Is the following car server- or clientside?
  9. You could trigger an event everytime you create a 'NPC' ped and then add create an instance for that ped. Note: The ped might not exist clientside when the event arrives at clientside - you should mark the ped as NPC on serverside (e.g. setElementData(ped, "npc", true)) and then loop the event until the ped is valid.
  10. You should rather use setElementVelocity and setVehicleTurnVelocity
  11. The read-ability might be better, but performance-wise it's crap. Here is the code: local seconds = 330 local time = ("%02d:%02d"):format(math.floor(seconds / 60), seconds % 60)
  12. I guess that it will happen before May ends, but I am sure it will be released before 2016.
  13. botder

    Delete

    Without looking at the source code, which parts are compiled, which you are going to sell?
  14. This resource is probably not necessary, because Jusonex added a webbrowser to the default resource package today. But trying new functions is always a good way to learn them. https://github.com/multitheftauto/mtasa ... b4faccc36d
  15. botder

    callRemote

    loadCountriesCallback is nil (not even a function).
  16. botder

    one question

    That requires more work and MATHS. You can use a clientside event when the cursor moves to change the degree around the hydra. Not going to explain that
  17. botder

    one question

    viewtopic.php?p=721951#p721951
  18. Do you change your resolution by restarting MTA or do you use some kind of resize hack? The second option will not work.
  19. http://bugs.multitheftauto.com/view.php?id=8828 Take this bug into account when dealing with latent events.
  20. Sorry, but what did you not understand?
  21. You can use getElementsByType for your custom elements.
  22. The variable check is a boolean value. Using the operator '#' on it is illegal. That operator tries to get the length of strings and tables. #check This won't work - the error tells you that. if ( #check > 0 ) then In conclusion this will not work at all with 'check' as a boolean value.
  23. setElementDimension 'Dimensions' are seperated GTA worlds. If you are in dimension 1 (e. g. Deathmatch Arena) you can't see objects/players/vehicles/.. from other dimensions.
  24. https://wiki.multitheftauto.com/wiki/DbExec Returns true unless the connection is incorrect, in which case it returns false.
  25. Guessing: Either this happens when you don't return anything in that function or that function does not exist (maybe overriden?)
×
×
  • Create New...