• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team
    • jhxp

      Multi Theft Auto: San Andreas 1.5.4 is out!   21/04/17

      Click the link in the announcement for more details.  


  • Content count

  • Joined

  • Last visited

Community Reputation

11 Decent

1 Follower

About 3aGl3

  • Rank


  • Gang
  1. I guess that either the render target could not be created successfully or that rr is used somewhere else. Since you never set the scope of rr it's a global variable for the entire client side. To eliminate that possibility just add this to the top of the script: local rr, rr2 If that doesn't fix the error it's likely that the creation of the render target failed, you can't do anything about that. Edit: Just to clarify, "you can't do anything about that" means that render target creation fails because of hardware limitations. So if you can reduce memory usage that could possibly fix the problem.
  2. So if I understand you correctly you want a row of ten consecutive numbers between 10 and 100. I'd just get a number between 10 and 90, that way the random and the following 9 numbers make up your ten consecutive numbers.
  3. They are probably all private, at least I don't know of a public one. It's been a bit but I did search for one too...
  4. The script would be quite lengthy for a full system like the one in your example. You will need to create a shader for every paintjob and apply the texture as a variable to it. Then apply the shader to all vehicles that have the paintjob. To make it usable on a server you probably want to destroy and create the elements as needed, when vehicles stream in and out.
  5. It's done by applying shaders to the vehicle when it's spawned.
  6. Hm, my getAngle function works with y, then x: function getAngle( x1, y1, x2, y2 ) local x = x2 - x1 local y = y2 - y1 return math.deg( math.atan( y, x ) ) end
  7. Well, it really depends on what you want to do. Let's just assume you want to make a dxGUI with scroll areas, I'd go about it something like this: function createDxScrollPane( x, y, parent ) local pane -- create an element, a table or whatever -- save x, y, apply parent bla bla bla -- try to create a render target for smooth scrolling local render_target = dxCreateRenderTarget( x, y, true ) if render_target then -- save the render target end return pane end -- for render event function drawDxScrollPane() local scroll_x, scroll_y = getScrollPos( pane ) if render_target then -- draw to the render target else -- we scroll line by line and char by char local line_h = 15 local pos_y = line_h * scroll_y * y for k, v in ipairs(children) -- draw only text that is below pos_y -- draw only parts of images that are visible below pos_y -- etc. end end end Note that I made all that up on the fly but it should get the point accross.
  8. If the memory is full it's full, not much you can do. You could delete unused things. If the render target wasn't set successfully the function returns false, if the render target wasn't even created successfully dxCreateRenderTarget will return false too. If you want to clip of parts of a texture then yes, dxDrawImageSection is there. Otherwise you could probably work with some smart scripting.
  9. So I'm working on a gamemode/server that I plan to possibly host on a larger scale. The project is only for my own amusement and may never be hosted on a large scale, or even finished, however I'd still like to prepare for that. While player interactions on a small scale can be tested easily by using a laptop, virtual pc etc. I was also wondering how one would test load specific things. For example what happens when a player enters a populated area and has to stream in many elements that require shaders or similar. What happens to per player dxDraws like nametags or chat bubbles? Does anyone have any experience with such things and would share? Can peds be used instead of actual players? (I imagine some extra script would be possible but that shouldn't be to big a problem)
  10. help

    Well, not to be like that but... Are you sure it's the LOD model? After what I pointed out already everything seems fine...maybe the --irelevant code removed hides something that also spawns the base object multiple times.
  11. help

    Are you sure it's the LOD model? You are creating a bunch of LODs for each object due to the second loop, it should be removed. You're not even using the k or v variables...
  12. I guess you could do that. The hash returned is for any further API requests from that user and thus probably irrelevant for you.
  13. Hm, sorry I can't make much of that. It gets a writer class of some sort...that then writes to the database.
  14. I imagine that a race server is as vulnerable as any other server, however if you never had any problems with cheaters the first answer that comes to mind very well be no. You should keep in mind however, once someone wrote a cheat/hack of some sort for your server it is to late. Especially a highly competitive server like race can be destroyed by a hacker within hours. Imagine someone writes a code injection that completely overwrites his vehicles handling to something way over the top (high speed, acceleration, grip and control), how fun will it be for the other players? Yup, sucks. On a freeroam server one might say people can do pretty much anything anyway but the server might want to block the minigun, hydra and hunter. I've seen that or similar on a bunch of freeroam servers, for reasons obvious. Cheats you still give those things to players, etc. So all that being said the obvious answer is yes, an anti cheat makes total sense. However I just also thought of another side, if you have a private server for instance and you are absolutely sure only trusted people have access you could probably ommit anti cheat. Same if you have an absolutely reliable team, good overall security and there is always someone who can take a look at the server and ban/kick any cheaters.
  15. If you could give me more of the PHP I can probably tell you. Is there something like a register function of some sort?