Jump to content

Bonsai

Members
  • Posts

    1,031
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Bonsai

  1. https://wiki.multitheftauto.com/wiki/OnResourceStart doesn't have a player parameter. It only provides the resource that started. Also instead of "getResourceRootElement(getThisResource())" you can write "resourceRoot".
  2. Bonsai

    [HELP] How

    Where do you always find these codes? And why are they never working.. That code doesn't make much sense like that. The distance would be always 0?! Also its unlikely to hit exactly 100 or 1000.
  3. You didn't even search https://wiki.multitheftauto.com/wiki/Ge ... RotorSpeed
  4. It should be: addEventHandler ( "onClientMouseMove", getRootElement( ), tooltipHandler)
  5. Are you sure you know where the box ends? dxDrawText takes the start and end coordinates, unlike dxDrawRectangle that takes start coordinates and width/height. Also clipping doesn't work when using colorcodes. For that you would have to manually clip it.
  6. Everything that doesn't change over time should be outside of the render function. If it only changes sometimes, it should be set somewhere else and the render function should only use those values, not calculate them itself.
  7. 1.5.2 I just copied your code and put it into a clientside script. It didn't show that warning.
  8. Hmm, it works for me.
  9. If you want to create a script, its your job to do some research what you might need. Then you can come here and ask the people if e.g. those are the right functions/events to use. Asking for an "example" happens to much around here. You would only copy and paste it anyway. Start with drawing a simple text, then think about other stuff.
  10. YOU want to make that. So start and come back when you have a problem.
  11. Goooooooooogle! https://forum.multitheftauto.com/viewto ... 3&p=648320
  12. getRootElement() or root will trigger that event, and therefore call the function when any player changes his nick, as all players are childs of the root element. (Check the Element Tree in wiki) If you set the localPlayer as source, it will only trigger if the localPlayer changes his nick. You only have to be careful and checking the wiki what the source of an event will be. (players, vehicles, markers..) Usually its best not to set root, especially when working with ResourceStart events. Bonsai
  13. It doesn't. That function has nothing do with how its counted. "#" simply gets the length of a string.
  14. Bonsai

    DUP Output

    Alright, thank you.
  15. Bonsai

    DUP Output

    Hey there, I just tried something and it works so far but it sometimes outputs something weird. http://puu.sh/mOloC/f6875e9557.jpg I have never seen that before and Google wasn't that helpful. Does anyone know what that means? I thought it might be duplicate output grouped since there is a little delay when that happens. Bonsai
  16. What do you mean by not being able to use triggerClientEvent? You can trigger client events from clientside using triggerEvent. Same for server. Bonsai
  17. Bonsai

    Server list spam

    FFS used to do this crap? That's so pathetic..
  18. I feel like you are trolling. Kinda regret answering at all. MTA doesn't have that much players and even less that care about scripting and such stuff. And from the few that do, only a very small part is above beginner level. So who is gonna do all the stuff you request? You are free to improve the wiki until it meets your standards.
  19. https://forum.multitheftauto.com/viewtopic.php?f=91&t=96181
  20. Are you talking about something like this? if getTickCount() - startTime > 2000 then Also, you should use <= 0 for that alpha thing as it is unlikely to reach exactly 0, depending on the value you are using to decrease it.
  21. The wiki is pretty good in my opinion. You might be using it wrong Also there is this forum where you can ask for help or use the search.
  22. Bonsai

    not work

    That seems to be as wrong. Why would there be a source outside of a function.
  23. I doubt anyone outside of MTA would steal MTA scripts. I guess you could write a little function that handles the compiling using the API if there is no better way. https://luac.multitheftauto.com/api/
×
×
  • Create New...