Jump to content

Gallardo9944

Members
  • Posts

    442
  • Joined

  • Last visited

1 Follower

Details

  • Gang
    Empire of Riders

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Gallardo9944's Achievements

Hustler

Hustler (26/54)

3

Reputation

  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.
×
×
  • Create New...