Jump to content

Overkillz

Members
  • Content Count

    527
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Overkillz

  1. Inside pumps table there isn't another sub-table or at least not as first array element. What does it mean ? Might you have an structure which looks like this one local pumps = { anyData = false, -- You can not get the lenght of this one subTable = {} -- However You CAN get the lenght of this one } Regards.
  2. Are u getting an array from the user ? Might there is your problem. You are using an ID instead of Name. I have not experienced with this, but as far as I could read at discord documentation, you should be getting an Array.
  3. Hello dear community, Im working with renderTargets since is a way that losing a bit of quality you can get an incredible performance. However, today I have faced an issue while drawing some text. Well, I have like 4k maps and obyously, each one has his own name. Well, while using renderTargets, I can't draw more than 1000 text I tried it while using a custom font and few stuffs more. If you think that my code is wrowng, here I left you the way Im working local sX,sY = guiGetScreenSize() local sizeX,sizeY = sX/2,sY/2 local fontHeight = dxGetFontHeight(1,"default-bo
  4. Might you can apreciate the difference due to you are using default fonts or not thing fonts, but look As you can see, the second image is clearer. Due to the image cut, might you cant difference the quality, but, if you would see the full tab, the quality lost is appreciable. Anyways, I have done several test and ways to make it work, but nothing, texture shader doesn't work too ...etc So, maybe I will be forced to use module_add arg instead of add only. Regards.
  5. Probably you are getting the seconds. If you want to get the minutes you have to convert the seconds in minutes ...etc Regards.
  6. I already test it, but it doesn't reach the quality like using only add
  7. Hello dear community, Im having an issue with renderTargets. Well, my problem is simple. Im trying to apply a fade effect to a renderTarget. Well, I want to have a decent quality while drawing stuffs on it, so, Im forced to se the function dxSetBlendMode. However, If I use it, I can't make fade animation. Here is the wiki example with the fade animation local myRenderTarget = dxCreateRenderTarget(500, 500, true) local alpha = 0 function updateRenderTarget() dxSetRenderTarget(myRenderTarget, true) dxSetBlendMode("modulate_add") dxDrawRectangle(0,0,500,500,to
  8. NOT TESTED I just build my own method due to I don't feel confortable with your way. Here you have local showImage = 1 local switchTick = getTickCount() local interval = 3000 --Image duration (Including fade) local images = { {path = "image1", alpha = 0}, {path = "image2", alpha = 0}, {path = "image3", alpha = 0}, {path = "image4", alpha = 0}, } function drawImages() if getTickCount() - switchTick > interval then showImage = showImage + 1 if showImage > #images then showImage = 1 end switchTick = getTickCount() end for i,k in ipairs(images) do if i ==
  9. Alright, thats the other way I supposed to use. However, whats the efficence of using that way ? Is there another efficent way? (Not adding all the content in the same file) Thanks in advance and best regards.
  10. Hello dear community, First of all, I know that i can solve my problem with a simple trigger, but Im a bit curious and I would like to know why this is not working or which one is the best way to call it. Well, I have done a template to use it multiple times in the same resource but just changing a variable, so, some of them uses the same fucntion name but i just used local (This should prevent interaction issues) So I realized the is only executed the last one added in meta.xml I know that Im explaining very very bad, but I have done an example that it understable (I thi
  11. @IIYAMA Thanks for your suggestion, but, Im not going to reach the effect that Im looking for cuz I think the effect will be notable and not fancy while reaching the corners and the effect im looking for is that a circle over draw the "Rounded rectangle" I think i have explained pretty bad so I just made a quicky image to take it as reference. As you can see, some parts of the circle already left the rectangle (It won't be visible). Otherwise, is there a way to load .svg on MTA ? Thanks in advance, best regards.
  12. Hello dear community, I would like to ask if there is a way to limit the draw size to a texture ? What do I mean, well, I have a texture (A rectangle with rounded corners) well, I want to create an animation. A circle that becomes to a rectangle with BORDER CORNERS I think I luckily did this script like 4 years ago, but no idea how I did it (I know trat it sounds absurd.) If im not wrong, I used a shader, and I think it was the HUD Mask Shader: http://nightly.mtasa.com/files/shaders/shader_hud_mask.zip I would like to get any tip or suggestion to start to code the an
  13. Hello dear community, today I have a simple question. Is there a way to insert a table with dbExec ? I know I can use a loop and insert them one by one, but Im worried about the impact that it could cause. Thanks for reading, best regards.
  14. Well, you probably will need to use the following functions since you are going to connect your server to your web-server dbConnect() dbQuery() dbExec() In case that mybb uses a hash system to encrypt the account passwords (Highly posible) this method is not going to work for you unless you know which kind of encryption method uses. Best regards.
  15. Well, looks like creating renderTargets while you are minimized it fully bugs the renderTarget element. I just added some functions to avoid the creation of renderTargets while the players is minimized ...etc Also, while restoring, Im destroying the renderTarget element to create it again just to ensure that everything its ok. Just to clear one thin. I thought that using the argument (didClearRenderTargets) provided by onClientRestore would be usefull, but I really have just tested it and it didn't work for me, so, restoring wasnt working at all since this argument doesn't work
  16. @Bonsai First of all, thanks for answering. Well, creating renderTarget again might could cause the issue. About calling drawTopTime() iinside render function the CPU Usage fires depending of the amount inside the table. The reason why Im creating again the renderTarget is due to the size changes depending of the amount inside the table. I need to clear out that I've already tried to destroy the renderTarget element and setting the variable as nil. Any suggestions ? @IIYAMA I've just commented about what you told I had already tried to destroy the eleme
  17. Hey there dear community, today Im having an issue with renderTargets as the title says. Well, In fact it happens me when I minimize (not all the times) I thought that using properly the function onClientRestore it would be solved and I wouldn't have any problem, but no. Well the problem is that the renderTarget is not drawn or dissapear when minimizeing and restoring. The code is too long and there are useless functions that are innecessary, so, here goes a simple version how am I using renderTargets. Im sure that it is the right way to use and restore it. NOTE:
  18. @Zango Thats it ! Well, I have the last question, how could I select the angle to start. For example, the angle starts at the red line, but I want that it starts at green line. I know that when I use the angle while drawing images or whatever i can use the angle argument, but, I just would like to know whats the right math application in this case Thanks for reading, best regards.
  19. Hello dear community, today Im having a math issue. Well, Im just trying to get the mouse angle with the center at the middle on the screen. The code is almost done, but it only works 180 degrees. It only detects the half part of the circle. top side with negatives value and top with positive values. I know I can use conditions to make it work with 360 degrees, however Im here to know if there is a way to get a perfect angle without appealing to conditions if isCursorShowing() then local px,py = getCursorPosition() local mx,my = sX*px,sY*py local distY = math.abs(my-centerY)
  20. You dont need to use killTimer due to setTimer function already has an argument which allow you to execute the same function x times. myTimer = setTimer(function() outputChatBox("only one time") end, 1000, 1) --HERE IT IS, The las value '1' are the times that it is going to be executed. For future cases, if you want to use killTimer function, be aware that you have to check first if the timer exists using the function. isTimer() Regards.
  21. @IIYAMA It is something weird. Here it is the current full code. local sX,sY = guiGetScreenSize() local radarSize = sY*0.2 local posX,posY = sX*0.02, sY*0.93-radarSize local blipsize,lpsize,range = radarSize/22,radarSize/12,180 local centerleft,centertop = posX+radarSize/2,posY+radarSize/2 local lp = getLocalPlayer() local scaleValue = sY / (1080) scaleValue = math.max(scaleValue, 0.85) -- < IIYAMA's scale limit local fontList = { [9] = dxCreateFont( "files/font/globalFont.ttf", 9*scaleValue ), [10] = dxCreateFont( "files/font/globalFont.ttf", 10*scaleValue ), [11] = dxCreat
  22. @IIYAMA Im not using renderTarget. Im just dealing with dxCreateTexture. Previously I tried it with renderTargets and I've got the same issue. Does dxSetShaderTransform use or must use renderTargets ? Thanks for answering, best regards.
  23. Hello dear community. Today I've decided to recode my Radar script using some public shaders from resource like "Hud mask". Well, the problem is that Im trying to use dxSetShaderTransform to flip the image and give it a negative increase value. But when I use this function, another shader that I've created is affected by this function. For example: I want to apply dxSetShaderTransform only to speedShader, but, gtaMapShader is affected to. Code function drawRadar() --#EMPTY CIRCLE TEXTURE emptyCirclerTxt = dxCreateTexture("files/img/EmptyCircle_Thickness.png") --#GT
  24. Looks like it is being updated many times in few seconds. Anyways. It shouldnt give you fps drops or something like that since it isnt in a render Event. Otherwise. I would update the system to be updated when a player needs it or reducing the timer that it probably has. Regards
  25. Try to use a simpler one texture ScreenTexture; technique tech { pass p0 { Texture[0] = ScreenTexture; } } Regards.
×
×
  • Create New...