Jump to content

Karuzo

Members
  • Posts

    1,213
  • Joined

  • Last visited

Everything posted by Karuzo

  1. Thank you for your reply. But how do i know what 720 is in relative ? Btw, isn't x-720/2 not the same as x*0.720 ?
  2. Hey Guys, so i have again a question about my scoreboard. I have this code : dxDrawImage((x- 720)/2, (y-460) /2, 720, 460, "images/back.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Name", (x - 110) / 2.3, (y - 29) / 3.7, 110,29, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(getPlayersOnline().."/50" ,(x - 101) / 1.25, (y - 27) / 4.3, ((x - 101) / 1.25) + 101, ( (y - 27) / 4.3) + 27, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Germain Kaff Reillife by Blackpotato", (x - 168) / 1.7, (y - 23) / 4.2, ((x - 168) / 1.7) + 168, ( (y - 23) / 3.-- s8) --> + 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("Ping", (x - 110) / 1.25, (y - 29) / 3.7, ((x - 110) / 1.25) + 10, ( (y - 29) / 3.7) + 29, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("Money", (x - 110) / 1.78, (y - 29) / 3.7, ((x - 110) / 1.78) + 110, ( (y - 29) / 3.7) + 29, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) Ok. so whats my question ? The dxText's aren't in that place where they should be . So i searched a little bit in the forum, i've found out that i need to do them in relative. But wiki says: I should give the coordinates in absolute. So what's right now ?
  3. Sorry for the late reply. Here's my code : local playheight = 2 local players = getElementsByType ( "player" ) local playas = 0 for amt, player in pairs(players) do playas = playas + 1 if (playas <= 20) then local ping = getPlayerPing(player) if (ping >= 250) then r,g,b = 200,20,25 elseif (ping >= 120) then r,g,b = 255,149,4 else r,g,b = 50,200,50 end dxDrawText(getPlayerName ( player ), (screenW- 2)/3.15,(screenH + 12)+ playheight, screenW/2,screenH/4, tocolor(255,255,255), 1 , "default","center", "center",false, false,true,true)
  4. Karuzo

    need help

    Team: createTeam Makin leader of his team: with elementDatas setElementData getElementData Panel, just simply with GUIs. The other things, idk.
  5. Good Evening, so me and my colleague are makin a scoreboard but we have a big problem with drawing the names. So i want it that every new name it counts +1 just 5 units under the first name. Here's my code : local players = getElementsByType ( "player" ) local playas = 0 for amt, player in pairs(players) do playas = playas + 1 if (playas <= 20) then local ping = getPlayerPing(player) if (ping >= 250) then r,g,b = 200,20,25 elseif (ping >= 120) then r,g,b = 255,149,4 else r,g,b = 50,200,50 end dxDrawText(getPlayerName ( player ), screenW/2.3,screenH/4*amt/5, screenW/1.9,screenH/4, tocolor(255,255,255), 1.2 , "sans","center", "center",false, false,true,true) end end Hope you could help us.
  6. https://wiki.multitheftauto.com/wiki/GetPedBonePosition Bone number 6.
  7. The p-spawn script has what you want.
  8. Theres no function like 'getSetVisible' . You have to use guiSetVisible.
  9. Sorry for the stupid question but , which coordinates do you mean ?
  10. I don't really understand what you're trying to tell me. Could you explain please what you mean ?
  11. Hey Guys, i'm trying to make my Rectangle more beautiful, so i used dxDrawAnimWindow. Ok, the Window works and is animated. So whats the problem ? I have a text , i want that the text makes also the animation. But don't know how.. Could you help me ? Code: local gRoot = getRootElement() local screenW, screenH = guiGetScreenSize() function dxDrawAnimWindow(text,height,width,color,font,anim) local x,y = guiGetScreenSize() btwidth = width btheight = height/20 local now = getTickCount() local elapsedTime = now - start local endTime = start + 1500 local duration = endTime - start local progress = elapsedTime / duration local x1, y1, z1 = interpolateBetween ( 0, 0, 0, width, height, 255, progress, anim) local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btwidth, btheight, btheight/11, progress, anim) posx = (x/2)-(x1/2) posy = (y/2)-(y1/2) dxDrawRectangle ( posx, posy-y2, x2, y2, color ) dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) ) dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,"center","center") end function content() local color = tocolor ( 0, 0, 0, 255 ) dxDrawAnimWindow ( "ExampleWindow",500,600, color, "default-bold", "OutBounce") dxDrawText("Example", (screenW - 190) / 2, (screenH - 75) / 4, ((screenW - 190) / 2) + 190, ( (screenH - 75) / 4) + 75, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) end function open() opened = not opened if opened == true then start = getTickCount() addEventHandler ( "onClientRender", gRoot, content ) else removeEventHandler("onClientRender", gRoot, content ) end end bindKey("F2","down",open)
  12. Karuzo

    Race times

    What ? Why sould he reinstall his server ? Micka, could you show us a screenshot of your debugscript 3 when you die ? And the code were the error appears ?
  13. Karuzo

    onmarkhit

    You have to use "onClientMarkerHit", cause it is cientside. try this : local x=1984.3034 local y=-2316.9780 local z=13.5468 shmal_v=createMarker(x,y,z, "Cylinder", 1.5, 255,255,0,240) function scriptCreatesmal (hitPlayer) local x, y, z = getElementPosition (hitPlayer) createVehicle (519, x, y, z ) end addEventHandler( "onClientMarkerHit",shmal_v,scriptCreatesmal)
  14. Thank you pa3ck, but i have another question, would this work with images also ? Cause i don't think so.
  15. Hey Guys, so i have a dximages with some buttons and dx images. Everythings works perfectly, but i wanted to make it more 'special'. So i have a question. How do i let my images fly in ? I mean , it comes from the bottom of the screen to the middle. I hope you understand me and could help me regards, KRZO.
  16. Karuzo

    delete

    You put them in the guieditor folder and meta.xml of the guieditor.
  17. A watermark? Hmm . That's a good idea probably.i think im gonna do that.
  18. lol , and now? He's making it on his own. That's good enough.
  19. Hey Guys, i have a problem. I have a script which gives people who are downloading Godmode. So, my problem is , they don't get godmode ._. Client.lua : addEventHandler ( "onClientPlayerDamage",root, function () if getElementData(source,"invincible") then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",localPlayer, function (targetPlayer) if getElementData(targetPlayer,"invincible") then cancelEvent() end end) Server.lua function checkTransfer() if isTransferBoxActive() == true then setTimer(checkTransfer,2000,1) setElementData(localPlayer,"invincible",true) outputChatBox("Download ediorsun, sana Godmode verildi!!",0,255,0) else setElementData(localPlayer,"invincible",false) outputChatBox("Download bitti, Godmodun alindi!",0,255,0) end end addEventHandler("onClientResourceStart",resourceRoot,checkTransfer) addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) outputChatBox( "Script by Porno: " .. getResourceName( startedRes ) ); end );
  20. Karuzo

    HELP!

    https://forum.multitheftauto.com/viewtopic.php?f=108&t=35828 Nice step-by-step-tutorial for noobs.
  21. Oh god, what a stupid mistake. Now it works. Thank you very much.
×
×
  • Create New...