Jump to content

bz_

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

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

bz_'s Achievements

Vic

Vic (3/54)

0

Reputation

  1. bz_

    [HELP] Render Target

    Have tried what you have suggested, but it still does not work as I want (nothing changed)
  2. Hi. I've been trying to create a render target that I will be able to scroll the text and images that are inside of if (like a website). The problem is the image that I want the date to be on is in right position, but the text itself is in top left corner of the screen. (https://imgur.com/a/zJvhnRM) local sx, sy = guiGetScreenSize() local zoom = (sx < 2048) and math.min(2.2, 2048/sx) or 1 font = exports.hv_fonts local changes = { {date = '06/07/2024', text = 'Change 1'}, {date = '06/07/2024', text = 'Change 1'}, {date = '06/07/2024', text = 'Change 1'}, {date = '06/07/2024', text = 'Change 1'}, } local renderTargetWidth = 450 / zoom local renderTargetHeight = 250 / zoom local scrollOffset = 0 local scrollSpeed = 10 local maxScrollOffset = sy/2 - (#changes * 40) - renderTargetHeight/zoom function handleMouseWheel(button) if button == "mouse_wheel_up" then scrollOffset = math.min(scrollOffset + scrollSpeed, 0) elseif button == "mouse_wheel_down" then scrollOffset = math.max(scrollOffset - scrollSpeed, -maxScrollOffset) end end addEventHandler('onClientKey', root, handleMouseWheel) local changesTarget = dxCreateRenderTarget(renderTargetWidth, renderTargetHeight) function drawRender() dxSetRenderTarget(changesTarget, true) dxSetBlendMode("modulate_add") for i, change in ipairs(changes) do local offset = (i - 1) * 40 + scrollOffset dxDrawImage(20 / zoom, offset, 101 / zoom, 20 / zoom, 'data.png', 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(change.date, 130 / zoom, offset, renderTargetWidth, offset + 20 / zoom, tocolor(255, 255, 255, 255), 1 / zoom, font:getFont('Inter-Regular', 12 / zoom), "left", "center", false, false, true, false, false) dxDrawText(change.text, 130 / zoom, offset + 20 / zoom, renderTargetWidth, offset + 40 / zoom, tocolor(255, 255, 255, 255), 1 / zoom, font:getFont('Inter-Regular', 12 / zoom), "left", "center", false, false, true, false, false) end dxSetBlendMode("blend") dxSetRenderTarget() dxDrawImage(sx/2 - renderTargetWidth/2, sy/2 - renderTargetHeight/2, renderTargetWidth, renderTargetHeight, changesTarget) end addEventHandler('onClientRender', root, drawRender) Can anyone suggest what is wrong in this code? Thanks in advance
  3. Hi. I've been using 3ds max for some time now, and I did encounter a problem. When I make a building with windows I can see normally from outside, but when I walk inside the map models like trees and buidlings disappear. I've been suggested by another user to export the windows as saperate object and put them where they are supposed to be in map editor, but then it works from inside, but from outside my model is disappearing behind the windows when I look at it from north. Is there a solution that I have missed? Thanks for help in advance.
  4. bz_

    Cannot join servers

    Hello. Recently I 've been having trouble joing MTA servers. Every time I try to join a server I get CC23 Error. I have reinstalled the game, reinstalled the Os. https://imgur.com/a/OVbJCJw
×
×
  • Create New...