Jump to content


  • Posts

  • Joined

  • Last visited

1 Follower


  • Gang
    Honor of Darkness
  • Occupation
  • Interests

Recent Profile Visitors

3,238 profile views

Turbesz's Achievements

Red-Headed Stepchild

Red-Headed Stepchild (19/54)



  1. My dx elements appear perfectly on my FHD resolution, but on smaller resolutions they do not look very good This is my problem: On my resolution: On a smaller (1366x768) resolution: The dx elements slip a little... this is my code: local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/1920, sy_/1080 local scale = sy function teszt() dxDrawRectangle(140*sx, 200*sy, 500 * scale, 685 * scale,tocolor(0,0,0,145)) dxDrawRectangle(150*sx, 235*sy, 480 * scale, 600 * scale,tocolor(0,0,0,145)) dxDrawImage(595*sx, 845*sy, 30 * scale, 30 * scale,"kuld.png",0,0,0,(isMouseInPosition(595*sx, 845*sy, 30 * scale, 30 * scale) and tocolor(255,181,64,255) or tocolor(255,255,255,255))) dxDrawText("Lobby Chat",283*sx, 205*sy, 500 * scale, 700 * scale,tocolor(255,255,255,255),0.7*sy,vekony,"center") local x = 0 for k, v in ipairs(uzenetek) do x = x + 1 if getElementData(getPlayerFromPartialName(v[2]),"adminrang") == false then dxDrawText(v[1],160*sx, 210*sy+(x*30), 500 * scale, 700 * scale,tocolor(255,255,255,255),0.7*sy,vastag,"left",_,_,_,_,true) else dxDrawImage(160*sx, 209*sy+(x*30), 20 * scale, 20 * scale,"moderator.png",0,0,0,tocolor(255,255,255,255)) dxDrawText(v[1],190*sx, 210*sy+(x*30), 500 * scale, 700 * scale,tocolor(255,255,255,255),0.7*sy,vastag,"left",_,_,_,_,true) end end end addEventHandler("onClientRender",root,teszt) What wrong with the calculations? How to fix this?
  2. Use "CHRISTMASDLS" coupon code for extra 20% off!
  3. Use "CHRISTMASHAND" coupon code for extra 35% off!
  4. Hi! This is a new handling editor for your server. This panel has the standard handling settings with some extra function. You can save your handlings, and you can remove too if you don't want use anymore. In addition you can add your handling to the shop to get some money if someone buys your handling. Feel free to ask if you have any questions, or you found a bug after buying it. I will help you anytime. Contact me on discord: Turbesz#9644 Some pictures of the script: https://imgur.com/a/HLElpLQ Link to buy: https://payhip.com/b/S6nVY
  5. This script is a simple downloadscreen for your server with background, profile links, music and a logo which moves to the rythm of the music. https://payhip.com/b/7EGkw
  6. thank you very much! now I understand that. but what wrong with my dxDrawText? i tried this: dxDrawText("ezegynagyonnagyonhosszúszövegleszmost",283*sx, 205*sy, 500 * scale, 700 * scale,tocolor(255,255,255,255),scale*1,customfont,"center") the text position the position of the text is perfect, but the font size too high for some resolutions, therefore, it does not fit in the rectangle and sticking out
  7. i tried now this way, up to 1920x1080, it displays well the rectangle at all resolutions, but too thick on mine resolution (2560x1080). Why? local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/2560, sy_/1080 function teszt() dxDrawRectangle(140*sx, 200*sy, 700*sx, 700*sy,tocolor(0,0,0,165)) end addEventHandler("onClientRender",root,teszt)
  8. What is the best calculation for dx elements? I want all the elements to be in the same place with same scale on every resolution. But I haven’t found a really good solution to this in years. So anyone can help me? Which calculation worked for you?
  9. I created a jail system. And i added a command which prints out how much time is left out of jail. If I'll put myself in jail the command prints good value, but if i'll put another player in jail, the command prints the other player's time to me as well... My code parts: -- This is the jail part with the setTimer: local bortonzottek = { } local timer = {} timer[getPlayerSerial ( target )] = setTimer ( unJailoz, milliseconds, 1, target ) bortonzottek [ getPlayerSerial ( target ) ] = { milliseconds, timer[getPlayerSerial(target)] } --And this is the command: function teszt(thePlayer) local serial = getPlayerSerial ( thePlayer ) local jailed = bortonzottek [ serial ] local hatra = getTimerDetails(jailed [ 2 ]) or 0 local string = string.format("%02d ", hatra/60) outputChatBox((math.floor ( hatra/60000 ) + 1)) end addCommandHandler("bido",teszt) The timer works fine, so let me out from the jail when my time is up and the other player when her timer expires, but the getTimerDetails does not work well... What wrong? How to fix this?
  10. I made a nametag system. And i have these calculations in the code: local width, height = 400*scale, 400*scale local sx, sy = sx-width/2.2, sy-height The debugscript sometimes spam a error message with the "local sx, sy..." line.. "Attempt to perform arithmetic on a boolean value". But the code works fine... Wth? What wrong? These calculations needed for the script.
  11. I use "onClientTransferBoxProgressChange" in my script, and i don't know, how to convert the totalSize argument (bytes) to megabytes. I tried this way without success: addEventHandler("onClientTransferBoxProgressChange", root, function(downloadedSize, totalSize) megabytes = math.floor(totalSize / 1024) end) anyone can help me?
  12. i found a solution, this topic can be locked/moved
  13. i use xmldata script to save datas to xml file, but now does not work... the file was created successfully, but i cant load the datas from the xml file. local xml = exports.xmldata function save() local veh = getPedOccupiedVehicle(localPlayer) local hand = getVehicleHandling(veh) xml:xmlSaveData("asd", hand, false,true) end addCommandHandler("test",save) function loadx () local saved = xml:xmlLoadData ( "asd", false, true) for k, v in ipairs(saved) do outputChatBox(v) end end addCommandHandler("load",loadx) And i want to save more than one handling to xml file, but i can insert only 1 to the file, when i try to save another one then overwrites the previous one... what wrong? how can i load the data, and insert more handling to the file?
  14. then if I understand correctly i have to change 'sx' to 'positionX' in my code? local scale = interpolateBetween(0.7, 0, 0, 0, 0, 0, progress, "OutQuad") local width, height = dxGetTextWidth(getPlayerName(v),scaleF,settings.font,true) - 350 * scale, 2*scale local sx, sy = sx-width/2, sy-height dxDrawImage(sx, sy, 40, 40, "files/typing.png",0,0,0,tocolor(255,181,64,255))
  • Create New...