Jump to content

Turbesz

Members
  • Posts

    245
  • Joined

  • Last visited

1 Follower

Details

  • Gang
    Honor of Darkness
  • Occupation
    asd
  • Interests
    asd

Recent Profile Visitors

4,232 profile views

Turbesz's Achievements

Red-Headed Stepchild

Red-Headed Stepchild (19/54)

9

Reputation

  1. I using an custom download screen, and the setTransferBoxVisible thing was worked before, but now does not hide the box... code: function downloadComplete() showCursor(false) --if percentage == -0 then return end if getElementData(localPlayer,"logined") == true then return end if not isTransferBoxActive() then stopSound(zene) --c = nil setTransferBoxVisible(true) removeEventHandler("onClientRender", root, downloadingScreen) else setTimer(downloadComplete,500, 1) end end addEventHandler("onClientResourceStart", resourceRoot, function() showCursor(false) if percentage == -0 then percentage = 0 end if getElementData(localPlayer,"logined") == true then return end setTransferBoxVisible(false) addEventHandler("onClientRender", root, downloadingScreen) zene = playSound("files/zene.mp3", true) -- Play song --setSoundVolume(c.song, c.vol) showChat(false) setTimer(downloadComplete, 500, 1) end) I tried with server trigger, and with everything but nothing... what wrong, how to fix?
  2. 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?
  3. Use "CHRISTMASDLS" coupon code for extra 20% off!
  4. Use "CHRISTMASHAND" coupon code for extra 35% off!
  5. 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
  6. 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
  7. 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
  8. 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)
  9. 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?
  10. 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?
  11. 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.
  12. 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?
  13. i found a solution, this topic can be locked/moved
  14. 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?
×
×
  • Create New...