Jump to content

Forrest

Members
  • Posts

    174
  • Joined

  • Last visited

Everything posted by Forrest

  1. I'm working on my own handling editor at the moment as a small project, and I'm currently setting up the limits. I'm probably just being stupid here, but whenever the GUI edit is empty, I get debug errors of trying to compare a number with nil, on line 4, which makes sense. However how do I check whether the edit is empty and not to run the check? function checkValues() for k, v in pairs(handlingValues) do if name == tostring(v[1]) then if tonumber(guiGetText(source)) > v[2] and tonumber(guiGetText(source)) < v[3] then guiSetEnabled(finishEdit, true) else guiSetEnabled(finishEdit, false) end end end end Thanks.
  2. dxDraw functions are only drawn for ONE frame, thus needing to work in conjunction with an event such as onClientRender or onClientPreRender in order to draw them every frame. Check the wiki for an example @ https://wiki.multitheftauto.com/wiki/DxDrawText
  3. God damn you Castillo, beat me to it lol. Was then posting it and got the notification for your post.
  4. createColPolygon Would be better. So that you aren't restricted to just rectangles.
  5. We already explained to you, a dxDraw item is not an ELEMENT, so you cannot "destroy" it. You just stop drawing it, you can do this by using variables. If you're unwilling to listen and learn then don't post. I would hate to see what your debug looks like with that script, no wonder it's lagging.
  6. You just stop drawing it. Use variables to choose where and when they display.
  7. First thing is to remove the comma from the vehicleIDS table after 597.
  8. Because that doesn't sound like you've stolen a client-side script.
  9. Thanks for the help lads, just got in and booted up my dev server and gave it a shot, worked it all out etc.
  10. Yeah, I understand that part. But how is the screen position INSIDE the rectangle worked out? Thanks for your help.
  11. What I posted already works, but I'm wondering how the maths is worked out and what is what. But thanks.
  12. I've been contemplating learning how to script interactive dX GUI's for a while due to the better customization than the original MTA GUI's. I found a small snippet floating around on the forum and decided to check it out, however the mathematic equation to check whether the cursor is within the rectangle has slightly confused me, if someone could help, that would be great. local sX, sY = guiGetScreenSize() dxDrawRectangle(sX/4, sY/4, sX/8, sY/8, tocolor(0,255,0,255), false) local checkX = ( x > sX/4 and x < 2*sX/4-sX/8 ) local checkY = ( y > sY/4 and y < 2*sY/4-sY/8 ) The checkX and checkY math equations are what I'm having trouble with, if someone could explain how it works that would be great, thanks.
  13. Remove the event handler. removeEventHandler
  14. Sarcasm will get you no where here, just because we won't write your scripts for you it doesn't mean you have to be an ass.
  15. Why don't you stop acting like you're top shit? You ruined it by trying to correct his script the first time around and getting it wrong.
  16. No problem, I do my fair share of modding too. I too used to be confused with the material settings at one point.
  17. Wrong place to ask? I thought that I can ask here when I make mods for MTA (as scripters). I turned it to 0.08 and its still same. This forum is to talk about resources for MTA. The section you're looking for is > https://forum.multitheftauto.com/viewforum.php?f=67 Try copying the material settings from the primary material onto the second.
  18. Wrong place to ask, this is not a GTA modding forum. But turn your Specular and Reflection blend from 0.1 to 0.08 or so, should fix it.
  19. ALL of them, unfortunately. This is something that also bugs me.
  20. Are you even trying to learn? All I've seen so far from you since you started posting is you basically asking people to write the scripts for you.
  21. Not possible, you were already told. You can replace ONE with ONE, but you can't use two models on one ID.
  22. function HandleTheRendering ( ) setTimer(function() addEventHandler("onClientRender", getRootElement(), renderDisplay) end, 50000, 1) end addEventHandler("onClientPlayerJoin", getRootElement(), HandleTheRendering) Try this, should work I think.
×
×
  • Create New...