Jump to content

Snow-Man

Members
  • Posts

    350
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Snow-Man

  1. i have made login with dx and when i use normal screen positions for dx function works good after that i have added function guiGetScreenSize() to dx got wrong positions and wrong hover colors for dx Text here's my code help local msX, msY = 1280,1024 local sX, sY = guiGetScreenSize() function isMouseWithinRangeOf(x1,y1,x2,y2,type) if not isCursorShowing() then return false end local cx,cy = getCursorPosition() cx,cy = cx*sX,cy*sY if cx >= x1 and cx <= (type == true and x2 + x1 or x2) and cy >= y1 and cy <= (type == true and y2 + y1 or y2) then return true,cx,cy else return false end end function renderDxLogin() if isTransferBoxActive() then return end if isPlayerLoggedin() then hideLoginDX() return end if isPanelVisible then if not isCursorShowing() then showCursor(true) end if isChatVisible() then showChat(false) end end if isMouseWithinRangeOf(324, 485, 182, 57, true)then r, g, b = 255, 100, 100 elseif isMouseWithinRangeOf(sX-713, sY-539, 748, 541, true) then r1, g1, b1 = 255, 100, 100 elseif isMouseWithinRangeOf(sX-489, sY-539, 972, 541) then r2, g2, b2 = 255, 100, 100 else r, g, b = 255, 255, 255 end dxDrawRectangle(sX-956, sY-773, 658, 220, tocolor(0, 0, 0, 150), false) dxDrawBorderedText(welcomemsg, sX-958, sY-828, 982, 247, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Username : ", sX-951, sY-730, 500, 325, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Password :", sX-951, sY-682, 500, 373, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "left", "top", false, false, false, false, false) DxDrawBorderedRectangle(sX-956, sY-539, 181, 56, tocolor(0, 0, 0, 150), false) DxDrawBorderedRectangle(sX-713, sY-539, 181, 56, tocolor(0, 0, 0, 150), false) DxDrawBorderedRectangle(sX-489, sY-539, 181, 56, tocolor(0, 0, 0, 150), false) --dxDrawBorderedText("Login", sX-956, sY-539, 505, 541, tocolor(r,g, b, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Login", (323 / msX) * sX, (539 / msY) * sY, 505, 541, tocolor(r,g, b, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Register", sX-713, sY-539, 748, 541, tocolor(r1,g1, b1, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Updates", sX-489, sY-539, 972, 541, tocolor(r2,g2, b2, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) --(567 / nX) * sX, (433 / nY) * sY 323, 485 end addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY) if not isPanelVisible then return end if button ~= "left" then return end if state ~= "down" then return end if isMouseWithinRangeOf((323 / msX) * sX, (539 / msY) * sY, 505, 541, true) then triggerServerEvent("onPlayerLoginSuccess", localPlayer , guiGetText(edit[1]),guiGetText(edit[2])) elseif isMouseWithinRangeOf(sX-713, sY-539, 748, 541, true) then triggerServerEvent("onPlayerRegisterSuccess", localPlayer, guiGetText(edit[1]),guiGetText(edit[2])) end end) i know i didn't put all variables of my script almost of them are true
  2. i'm trying to make dxDrawRectangle bordered like dxDrawText one but i didn't make it correct, anyone help my last work function dxDrawBorderedRectangle( x, y, w, h, color) dxDrawLine ( x - 1, y - 1, x - 1, w+15, tocolor ( 0, 0, 0, 100 ),3 ) dxDrawLine ( x+200 , y - 1, x-1, y - 1, tocolor ( 0, 0, 0, 100 ),3) dxDrawLine ( x , y + 15, x + 200, y+15, tocolor ( 0, 0, 0, 100 ),3) dxDrawLine ( x+200 , y + 20, x+200, y + 1, tocolor ( 0, 0, 0, 100 ),3) dxDrawRectangle ( x, y, w, h, color) end
  3. great job i have liked the Dx Design
  4. Yes, that's Exactly What I Mean I Know Functions But I Need Help With Table
  5. i think it should be here Servers
  6. how to sort weapon table exactly to save it i think it's seems like this local weapons = { weapon={}, ammos={}}
  7. can you help me to add the function, end {} line finishs like in lua, i have tried to add it in settings
  8. Snow-Man

    ban system

    thank you, that's works
  9. Thank you, Happy new Year
  10. Chech his Topic about NG resources I can't give you, because he don't want to share his fbk and skype PM Him
  11. As far as I know there is no support to people using leaked scripts. NG resources, if you need help about it ask xXMADEXx
  12. try this table.insert(t, {id, ids, price, ...})
  13. Snow-Man

    ban system

    i just want to get if player banned then draw text and cancel login
  14. Snow-Man

    ban system

    i have made function to check if player banned or no is it incorrect idea about coding?
  15. Snow-Man

    ban system

    The Rest Server Side Is Exports And About Client I Have Added Dxtext To Draw Ban
  16. <meta> <setting name="*StreamMethod" value="[0]" /> </meta> then you use createZombie function
  17. Snow-Man

    ban system

    i know man, i made client side before because to draw ban if player banned with events addEvent, addEventHandler, and event "onClientRender" for dx texts
  18. Snow-Man

    ban system

    the same thing doesn't work and there's no debug message
  19. Snow-Man

    ban system

    when i ban someone it doesn't work, i mean when someone join to server function checkPIFBanned() if isPlayerBanned(getPlayerIP(source)) then local ban = exports.USCsql:queryData("SELECT `admin`,`player`,`reason`,`duration` FROM `bans` WHERE `IP`=?", getPlayerSerial(source)) triggerClientEvent(source, "drawDXBanScreen", source, ban.admin, ban.player, ban.reason, ban.duration) end end addEventHandler("onPlayerJoin", root, checkPIFBanned)
  20. Good Job, i have loved your works it's seems like GTA vice city just you need to add more skins mods of vice city to your server
×
×
  • Create New...