Gallardo9944

Members
  • Content Count

    455
  • Joined

  • Last visited

Everything posted by Gallardo9944

  1. First thing to do is to create a texture shader. Just a simple one which will store your interface (dxCreateShader). Then, you should make a render target (dxCreateRenderTarget) and draw all your interface in it (dxSetRenderTarget) After that, calculations come in. Your 0;0 position is mid-screen. Specify how hard you want to rotate the shader: like -15 to 15 degrees. Do some math for degrees calculation: local ox,oy = 0,0 -- We will use it for current offset local mx,my = 15,15 -- 15 degrees for x and y position local rt = dxCreateRenderTarget(sx,sy,true) --replace sx,sy with the size of the box local shader = dxCreateShader(shaderfile) -- replace shaderfile with path to your texture shader function updateRotation() dxSetRenderTarget(rt) -- Draw your interface here dxSetRenderTarget() dxSetShaderValue(shader,"texture",rt) -- Pass the render target to the shader local px,py = getCursorPosition() ox,oy = (px-0.5)*mx,(py-0.5)*my -- mid screen (0.5) will make 0 for ox,oy values. Others are relative dxSetShaderTransform(shader,ox,oy) -- Here goes your main magic -- And just draw your shader mid-screen here with dxDrawImage end addEventHandler("onClientRender",root,updateRotation) -- We wanna do it each frame, right?
  2. Another solution could be pre-creating textures and then drawing them. It would cause a short lag when the resource starts, but at least drawing should be completely smooth as it's already in GPU memory.
  3. This can be achieved by using onClientExplosion event to determine whether a rocket exploded in a player radius and then get the creator from the projectile. Then, if a player dies, check if any rocket exploded within a certain radius for last ### seconds
  4. Clientside function returns latent events triggered from the client, serverside - from the server. Trigger client with information to know server data.
  5. lol. It is easier to make some dummy invisible object in the place of 3d browser and create the browser only if that object streams in. Destroy it when it streams out, of course.
  6. INSERT INTO serverdata.userdata (member_name) SELECT member_name FROM smf.smf_members WHERE member_name=`??` AND NOT EXISTS(SELECT member_name FROM serverdata.userdata WHERE member_name=`??`); This is how my one works. It clones name from another database & table if it exists and inserts row only if it doesn't exist (check last part).
  7. Room icons are mine, for instance. Please remove.
  8. One connection is obviously much easier to take care of. You may create as many connections as you want, of course, but keep in mind that making a ton of connections might slow down your server (+ avoid reopening connections frequently as it may cause slowdowns).
  9. Make sure that the element data is not in sync mode otherwise it will generate a lot of traffic when a lot of players die.
  10. Thanks, will try it soon. What's recommended OS for running MTA in VMWare?
  11. Gallardo9944

    error U01?

    Hello. Have you managed to make CEF work? Thanks.
  12. Sadly CEF doesn't want to work in Wine. It's simply blank without any data: http://er-mta.net/screenshots/cloud/150525202135.png I tried installing IE libs and nothing really helps as for now. Has anyone managed to make it work?
  13. Hello. I'm a developer of a server and currently I'm busy making another gamemode which is almost ready for public release. I haven't done the interface yet (won't take long though), so I'm thinking about waiting for 1.5 in order to make an HTML-based one. Is it worth waiting by delaying the gamemode release? I know asking for ETAs is not polite, but in this case I think it's an exception. Are there approximate dates? Thanks. Also, lel. http://resources.mtasa.com
  14. Updated the github repo again. Changes: * Added more comments * Added /debugmode (to add a debug hook to a particular resource) (supports excluded functions) A little note: this is not really the way I want it to work because it doesn't get serverside functions. It will be remade a little bit later (but may affect server performance) * Added an option to pause the debug line with F2 * Added a small gap between left side of the screen and the messages (so error counter shows properly) * Added welcome message FIXED A TYPO IN THIS COMMIT: https://github.com/Gallardo994/codebugg ... a378dfeb00 Please make sure to redownload it if you got it before seeing this message.
  15. It still has some minor issues I'm willing to fix. Sadly many of them can't be fixed at the moment, e.g. several missing errors which don't go through for some reason.
  16. Updated the github repo. Changes: * Moved to the left side of the screen (in case you want to use it together with MTA debugscript) * Added F1 longpress to show faded out lines * Added comments to all functions for easier reading
  17. If this is added, the system will be able to catch user colour in debug messages in further versions.
  18. Will you push it to github? I may contribute time to time.
  19. Hello. When you're making a very big project and make a simple mistake, the code fails to work and it may see a huge list of errors spamming your debugstring. This small debugger is made to see errors counter instead of a huge spamlist of those. The latest version can always be found here: https://github.com/Gallardo994/codebugger (Licenced under GPL, you must provide sources if you modify the resource) How to use: 1. Add it as a resource 2. Add command.debug to your ACL 3. /debug This is far not the final version and more than that, it has been made for several minutes because the original debugscript kept annoying me. Colours can be switched to your needs, same with everything else like lines amount, positioning and more. Currently it doesn't support many things like wordwrapping, scrolling, etc and I'm not really planning to add that as for now. It's my first public work and if you're not planning to use it, please don't make a mess in the comments. If you're planning to contribute, you can send your pull requests, that's always welcome.
  20. You can trigger client with your desired timer length and use getTickCount to check how much time passed since the trigger
  21. There is "end" missing to close the function though.
  22. That's completely normal. Sometimes a mapping server uses up to 1gb of ram (after some weeks of uptime), then I have to restart it. That's with standard map editor.
  23. You have to detach the window from the door model in DFF and use it as a component. Then just set component position whenever you want to move it
  24. Technically, making a custom scriptloader is easier than the method you want. It doesn't take a lot of effort
  25. If some data isn't required to be displayed / synced all the time for every client, it's more efficient to save that stuff into tables and trigger to client when required. If you're scared of a lot of MySQL requests, don't worry, the server is made to work properly under high load. Sites poll MySQL very often though work absolutely fine