Jump to content

darhal

Members
  • Posts

    582
  • Joined

  • Last visited

Everything posted by darhal

  1. I know already this function it work only for dx and I try it already It dont work of course . I need to know how to convert for GUIs to use it to gui create windows etc
  2. Hello, I need to know how to convert absolute values for GUIs to relative ones ? I see function in guieditor do smthg like this but the resource is too huge and I cant find this function out can anyone help me ? thx all
  3. Hello all, Can anyone tell my how to reduce resource cpu usage ? thx all
  4. Ok thank you i like it but the sub domain doesnt work
  5. I m using 000webhosting and I think the problem from there because I dont know how to configure it can any one help me ?
  6. like this ? <?php include( "mta_sdk.php" ); $input = mta::getInput(); $to = $input[0]; $subject = $input[1]; $message = $input[2]; $header = $input[3]; $mail = $subject; if (!preg_match("#^[a-z0-9._-]+@(hotmail|live|msn).[a-z]{2,4}$#", $mail)) { // your code here $sent = mail($to, $subject, $message, $header); mta::doReturn($input[0], $sent); } ?> Edit : it dont work now for both gmail and hotmail
  7. <?php include( "mta_sdk.php" ); $input = mta::getInput(); $to = $input[0]; $subject = $input[1]; $message = $input[2]; $header = $input[3]; $sent = mail($to, $subject, $message, $header); mta::doReturn($input[0], $sent); ?>
  8. Hello, I made system that send email for account recovery but the email sent only to gmail accounts and not other providers like hotmail idk why ?
  9. darhal

    GUI problem

    on all GUI elements That what I m looking for thx bro
  10. darhal

    GUI problem

    Hi all, I want a GUI to have the same x, y height width with all resolutions ! How to do it ? Thx
  11. darhal

    Sloved

    Hello guys see how the cursor display when I click on an edit box ? http://imgur.com/TaX2N74 is it MTA bug or I made a mistake ? also how to fix it ?
  12. function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end
  13. Oh My God this was the greatest version ever respect
  14. darhal

    file

    read this viewtopic.php?f=108&t=86587 thanks to god there is someone called xxMadeXx made it
  15. showCursor(true) local sx, sy = guiGetScreenSize() angle = 0 addEventHandler("onClientRender", root, function() --showCursor(true) local x, y = getCursorPosition() angle = findRotation(x*sx, y*sy, 358, 276) outputChatBox(angle) dxDrawImage(358, 100, 100, 100, ":CUPvehicles/files/lock.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(140, 276, 100, 100, ":CUPvehicles/files/engine.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(537, 276, 100, 100, ":CUPvehicles/files/lights.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(358, 276, 100, 100, ":CUPvehicles/files/switch.png", angle, 0, 0, tocolor(255, 255, 255, 255), true) end ) function findRotation( x1, y1, x2, y2 ) local t = -math.deg( math.atan2( x2 - x1, y2 - y1 ) ) return t < 0 and t + 360 or t end
  16. I already asked about this and this may help viewtopic.php?f=91&t=87924
  17. darhal

    help dxdraw

    You are welcome mate
  18. darhal

    help dxdraw

    function drawWindow () dxDrawRectangle(289, 214, 471, 295, tocolor(255, 0, 0, 132), false) dxDrawRectangle(342, 265, 132, 42, tocolor(72, 1, 253, 168), false) dxDrawRectangle(556, 265, 132, 42, tocolor(72, 1, 253, 168), false) dxDrawRectangle(556, 380, 132, 42, tocolor(72, 1, 253, 168), false) dxDrawRectangle(342, 380, 132, 42, tocolor(72, 1, 253, 168), false) dxDrawRectangle(462, 465, 104, 34, tocolor(6, 215, 247, 168), false) dxDrawText("Close", 461, 464, 566, 499, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Health And Armour", 343, 263, 474, 307, tocolor(255, 255, 255, 255), 1.20, "default", "center", "center", false, false, false, false, false) dxDrawText("GodMod", 557, 263, 688, 307, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Player Visible", 557, 378, 688, 422, tocolor(255, 255, 255, 255), 1.40, "default", "center", "center", false, false, false, false, false) dxDrawText("Vehucle GodMod", 343, 378, 474, 422, tocolor(255, 255, 255, 255), 1.20, "default", "center", "center", false, false, false, false, false) end isWndShowing = nil function onClientKey(btn, press) if btn ~= "F3" then return end if press and not isWndShowing then addEventHandler("onClientRender", root, drawWindow) isWndShowing = true elseif press and isWndShowing then isWndShowing = false removeEventHandler("onClientRender", root, drawWindow) end end addEventHandler("onClientKey", root, onClientKey)
  19. Nope you are welcome
  20. darhal

    DxDrawText

    EDIT : code has been edited --- Use render event here please ! speedx,speedy,speedz = getElementVelocity(getPedOccupiedVehicle(localPlayer)) kmh = math.floor(((speedx^2 + speedy^2 + speedz^2) ^ (0.5)) * 180) dxDrawText (""..tostring(kmh).." km/h" , 1080,700,correctResolutinX(x),correctResolutinY(y),tocolor(255,255,0,255),2,"pricedown") -- local screenWidth, screenHeight = guiGetScreenSize() cResolutionY = 768-- put your current resoultion Y here cResolutionX = 1360 -- put your current resoultion X here function correctResolutinY(y) if y then return (y/cResolutionY )*screenHeight end end function correctResolutinX(x) if x then return (x/cResolutionX)*screenWidth end end It should work now I forget to correct the position x and y
  21. darhal

    DxDrawText

    I edited the code test it
×
×
  • Create New...