Overkillz

Members
  • Content Count

    384
  • Joined

  • Last visited

Community Reputation

11 Decent

About Overkillz

  • Rank
    Street Cat

Recent Profile Visitors

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

  1. Hello dear community today Im trying to work with renderTargets to make a list with some rows. However, I want to limit it with the sizeY by screenSizeY *0.5, It is allow me to not to draw all the rows. But I want that if the player press some keys he is allowed to slide it up/down. Sadly, while sliding it up/down, due to the renderTarget it causes a some draw problems. Just see the images. I tried to create the renderTarget again inside the drawFunction, but I already know that it will cause performance issues. So, thats why Im asking for the best way to fix it I already tried to use dxSetBlendMode("modulate_add") dxSetBlendMode("blend") local sX,sY = guiGetScreenSize() local sizeX,sizeY,maxSizeY = sX*0.6,sY*0.25,sY*0.95 local font = "default-bold" local fontHeight = dxGetFontHeight(1,font) + 5 local myRenderTarget = dxCreateRenderTarget(sizeX,maxSizeY) local fakePlayersTable = {} local posY = 0 for i=1,50 do table.insert(fakePlayersTable,"FakePlayer_"..i) end function drawTest() if getKeyState( "lshift" ) == true then posY = posY + 3 elseif getKeyState( "lctrl" ) == true then posY = posY - 3 end dxSetRenderTarget( myRenderTarget ) local n = 0 for id,player in ipairs(fakePlayersTable) do dxDrawText(player,0,posY + fontHeight*(n) ) n = n + 1 end dxSetRenderTarget() dxDrawImage( sX/2-sizeX/2, sY/2 - maxSizeY / 2, sizeX, maxSizeY, myRenderTarget ) end addEventHandler("onClientRender",root,drawTest) Thanks for reading, bets regards.
  2. Overkillz

    get some CEF properties

    Edit: I just change few things from your code to reach the goal function downloadCallback2(data,err) if err == 0 then local videoLengthData = fromJSON(data) if videoLengthData then iprint(videoLengthData.items[1].contentDetails.duration) end else outputDebugString("API: Unable to connect to Google APIs") end end local apiKey = "myCustomAPIKey" local videoID = "ZRG5oOL5WO0" fetchRemote("https://www.googleapis.com/youtube/v3/videos?part=contentDetails&id="..videoID.."&key="..apiKey,downloadCallback2,"",true) But, Im still asking, Is there a way to get current video minute, buffer stored ... aswell ? Regards.
  3. Overkillz

    get some CEF properties

    Nice, but for a reason I can't get it. I have just created a new YouTube Data API v3 and It always drops me: API: Unable to connect to Google APIs Otherwise. Is there a way to get current video minute, buffer stored ... aswell ? Regards.
  4. Overkillz

    get some CEF properties

    Hey there lovely community. Today I started to do some research about CEF and I would like to know if there is a way to get youtube video length withou using an api or external websites. What do i mean ? I mean if is possible to reach it by using some of the followings functions I have just tried getBrowserProperty by typing some keys words but without success. Thanks for reading. Regards.
  5. Overkillz

    Calculate delay time while triggering

    Alright, well, I have a simple idea but idk if it is going to alter the client cpu. What about of checking something onClientRender ? In that case, start the tick for the toptime and when the player hit a colshape then stop it and trigger the time. But Im a bit worried about checking that condition every frame ... Regards.
  6. Overkillz

    Calculate delay time while triggering

    Does it work with trigger-Server/Client-event ? I see on the wiki that it only works with triggerLatentEvents Does it work with trigger-Server/Client-event ? I see on the wiki that it only works with triggerLatentEvents
  7. Overkillz

    Calculate delay time while triggering

    I know, but I wont follow this way. I need to keep some functions on the serverside due x reasons.
  8. Hello dear community, well, Im currently coding a toptime and I would like to know if there is a way to calculate the delay time while triggering from server to client or reverse. Might getting the player ping, bandwidth or idk. I know that the trigger delay time is minimum but those miliseconds are so important for the toptime list. Thanks for reading, regards.
  9. Overkillz

    Get sub table name and table count

    Alright, got it, but what about to get the name of those objects wihtout adding any thing inside each table. EDIT: GOT IT. Looping it using pairs gives me the name. Thanks matte
  10. Overkillz

    setTimer help

    We can not bring a fully help due to we can see more of your code. We don't even know if you are triggering the element correct, if you are using hex on your nickname or whatever If you need help via discord here is mine SheDontGiveAFvck#9362
  11. Overkillz

    Get sub table name and table count

    Hey there community, Im here again with a little problem that is giving me headache. Well, Im going to be clear, is there some way to get the sub table name and get the table count using this method: local tableTest = { ["Room1"] = {}, ["Room2"] = {}, ["Room3"] = {}, ["Room4"] = {} } outputChatBox("Table Count: "..#tableTest or 0) for i, roomName in ipairs(tableTest) do outputChatBox(roomName) end It always drops me that the Table Count is 0 and it doesn't output the Sub Table Names I want to get the table count and get the sub table names: Room1, Room2, Room3, Room4 I hope you can help me. Regards.
  12. Overkillz

    Not overdraw shader over dx-UIs

    Problem solved, You can close the topic
  13. Overkillz

    Not overdraw shader over dx-UIs

    Im talking about a custom UI made by dX's. Not default GTA/MTA UI.
  14. Overkillz

    Not overdraw shader over dx-UIs

    I want to blur the UI too
  15. Overkillz

    Not overdraw shader over dx-UIs

    Hello dear community, Im not an expert with shader so I have been looking for a blur shader over the MTA Community resource. I found one that its pretty simple to use, however, when I draw it, it overdraw my current dx UI. I don't want to use Ren's resource, I know that it is very usefull but I want to learn how to deal with my problem I hope you can bring me a solution to work with it. local sX, sY = guiGetScreenSize() local myScreenSource = dxCreateScreenSource(sX, sY) function drawBlurScreen() dxUpdateScreenSource(myScreenSource) dxSetShaderValue(blurShader, "ScreenSource", myScreenSource) dxSetShaderValue(blurShader, "BlurStrength", 6) dxSetShaderValue(blurShader, "UVSize", sX, sY) dxDrawImage(0, 0, sX, sY, blurShader,0,0,0) end addEventHandler("onClientResourceStart", resourceRoot, function() blurShader, blurTec = dxCreateShader("files/shader/blur.fx") if blurShader then addEventHandler("onClientRender",root,drawBlurScreen) end end) texture ScreenSource; float BlurStrength; float2 UVSize; sampler TextureSampler = sampler_state { Texture = <ScreenSource>; MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; static const float2 poisson[16] = { float2(-0.326212f, -0.40581f), float2(-0.840144f, -0.07358f), float2(-0.695914f, 0.457137f), float2(-0.203345f, 0.620716f), float2(0.96234f, -0.194983f), float2(0.473434f, -0.480026f), float2(0.519456f, 0.767022f), float2(0.185461f, -0.893124f), float2(0.507431f, 0.064425f), float2(0.89642f, 0.412458f), float2(-0.32194f, -0.932615f), float2(-0.65432f, -0.87421f), float2(-0.456899f, -0.633247f), float2(-0.123456f, -0.865433f), float2(-0.664332f, -0.25680f), float2(-0.791559f, -0.59771f) }; float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0 { float4 color = tex2D(TextureSampler, TextureCoordinate); for(int i = 0; i < 16; i++) { float2 coord= TextureCoordinate.xy + (poisson[i] / UVSize * BlurStrength); color += tex2D(TextureSampler, coord); } return(color/17); } technique BlurShader { pass Pass1 { PixelShader = compile ps_2_0 PixelShaderFunction(); } } Thanks for reading, best regards.