Snow-Man

Members
  • Content Count

    338
  • Joined

  • Last visited

Community Reputation

1 Neutral

2 Followers

About Snow-Man

  • Rank
    Fool
  • Birthday 15/02/1998

Details

  • Gang
    USC
  • Location
    Tunisia
  • Occupation
    Scripter

Recent Profile Visitors

1,195 profile views
  1. Snow-Man

    working on new server

    Any suggestions about design of login and the rest things as you said
  2. Snow-Man

    housing problem

    Just interiors and exteriors positions on Database
  3. Snow-Man

    working on new server

    I mean suggestions to work on them
  4. Snow-Man

    housing problem

    i have made house system with full house entrace positions tooks me 2 weeks and file size 30MB, is there any solution to make house interior easier more than mine?
  5. Snow-Man

    hwo to use ajax

    i have got problem to use ajax, i'm trying to link my server to my forum any help? full details
  6. Snow-Man

    working on new server

    i'm working on my new server and i need good suggestions to make them for my rpg server please any suggestions to help?
  7. Snow-Man

    dx List

    help?
  8. Snow-Man

    full sql info

    help?
  9. Snow-Man

    dx List

    i have posted full script again. offs = 45 opened = false event = addEventHandler remove = removeEventHandler smX, smY = 1280, 1024 sX, sY = guiGetScreenSize( ) selected = 1 move = 0 moved_up = 0 local ammunationWeapons = { {16,3000, 5}, {22,500, 30}, {23,600, 30}, {24,1200, 15}, {25,600, 15}, {26,800, 12}, {27,1000, 10}, {28,500, 60}, {29,2000, 90}, {30,3500, 120}, {31,4500, 150}, {32,300, 60}, {33,600, 20}, {34,5000, 10}, {46,800, 1}, } setposition = 250 function dxDrawAmmuShop() if opened == true then return false end DxDrawBorderedRectangle(64, 186, 313, 411, tocolor(0, 0, 0, 150), false) dxDrawBorderedText("USC ~ Weapons Shop", 66, 185, 377, 212, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Weapons", 66, 212, 269, 236, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) for i, v in ipairs ( ammunationWeapons )do name = i r2, g2, b2, size2 = ItemsHower() dxDrawBorderedText("Price", 269, 212, 377, 236, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(getWeaponNameFromID(v[1]), 66, (210+(i*offs)), 269, 270, tocolor(r2, g2, b2, 255),size2, "bankgothic", "left", "center", false, false, false, false, false) dxDrawText(tocomma(v[2]).."$", 269, 210+(i*offs), 377, 270, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) end dxDrawFixedLine(64, 240, 377, 240, tocolor(255, 255, 255, 255), 3, false) dxDrawFixedLine(269, 212, 269, 597, tocolor(255, 255, 255, 255), 3, false) dxDrawFixedLine(64, 212, 377, 212, tocolor(255, 255, 255, 255), 3, false) r, g, b, size = buttonHover() r1, g1, b1, size1= closeHover() DxDrawBorderedRectangle(64, 603, 313, 32, tocolor(0, 0, 0, 200), false) dxDrawBorderedText("Purchase", 64, 602, 221, 635, tocolor(r, g, b, 255), size, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Close", 221, 602, 378, 635, tocolor(r1, g1, b1, 255), size1, "bankgothic", "center", "center", false, false, false, false, false) if #ammunationWeapons ~= i then dxDrawFixedRectangle(64, setposition, 312, 23, tocolor(0, 0, 0, 100), false) end end function buttonHover() if isMouseInPosition(64, 602, 221, 635) then r,g, b, size= 200, 200, 0, 0.9 else r,g, b, size = 255, 255, 255, 0.8 end return r,g, b, size end function closeHover() if isMouseInPosition(221, 602, 378, 635) then r1, g1, b1, size1= 200, 200, 0, 0.9 else r1, g1, b1, size1= 255, 255, 255, 0.8 end return r1, g1, b1, size1 end function ItemsHower() if isMouseInPosition(66, (210+(name*offs)), 269, 270) then r2, g2, b2, size2= 200, 200, 0, 0.7 else r2, g2, b2, size2= 255, 255, 255, 0.6 end return r2, g2, b2, size2 end addEvent("setAmmuGUIVisible", true) function setAmmuGUIVisible() if opened == false then toggleAllControls( false) event("onClientRender", root,dxDrawAmmuShop) showCursor(true) event("onClientKey", root, onPlayerDxHit) event("onClientKey", root, onPlayerChooseWep) end end event("setAmmuGUIVisible", root, setAmmuGUIVisible) function onPlayerDxHit(key, pressed) if not key == "mouse1" then return false end if isMouseInPosition(sX*(221/smX), sY*(602/smY), sX*(378/smX), sY*(635/smY)) then close() end end function close() opened = false showCursor(false) --toggleAllControls( true) setTimer(toggleAllControls, 50, 1, true) remove("onClientRender", root, dxDrawAmmuShop) remove("onClientKey", root, onPlayerDxHit) remove("onClientKey", root, onPlayerChooseWep) end function isMouseInPosition(x1,y1,x2,y2, type) if not isCursorShowing() then return false end local cx,cy = getCursorPosition() cx,cy = cx*sX,cy*sY if cx >= sX*(x1/smX) and cx <= (type == true and sX*(x2/smX) + sX*(x1/smX) or sX*(x2/smX)) and cy >= sY*(y1/smY) and cy <= (type == true and sY*(y2/smY) + sY*(y1/smY) or sY*(y2/smY)) then return true,cx,cy else return false end end function onPlayerChooseWep(key, press) if not key or not key=="mouse1" and not press then return false end if not (name) then return false end cx, cy = getCursorPosition( ) cy = (cy*sY)-21 cx = cx*sX if cy >= sY*(560/smY) or cy <= sY*(235/smY) then return false end if cx <= sX*(66/smX) or cx >= sX*(377/smX) then return false end setposition = cy+(name) end addEventHandler( "onClientPlayerWasted", localPlayer, function() close() end )
  10. Snow-Man

    full sql info

    i have tried your code and i got result -> table:2482C1F8 my code is works good but i only get one data
  11. Snow-Man

    Vehicle hud

    i don't mean that, i tried to do speed meter with x movements to bar, that's code it's working fine but i think it's got alot of problems,
  12. Snow-Man

    dx List

    i need help little bit in cursor selection and make item selection that's all i'm not forcing anyone to write full script
  13. Snow-Man

    dx List

    offs = 45 opened = false event = addEventHandler remove = removeEventHandler smX, smY = 1280, 1024 sX, sY = guiGetScreenSize( ) selected = 1 move = 0 moved_up = 0 local ammunationWeapons = { {16,3000, 5}, {22,500, 30}, {23,600, 30}, {24,1200, 15}, {25,600, 15}, {26,800, 12}, {27,1000, 10}, {28,500, 60}, {29,2000, 90}, {30,3500, 120}, {31,4500, 150}, {32,300, 60}, {33,600, 20}, {34,5000, 10}, {46,800, 1}, } setposition = 250 function dxDrawAmmuShop() if opened == true then return false end DxDrawBorderedRectangle(64, 186, 313, 411, tocolor(0, 0, 0, 150), false) dxDrawBorderedText("USC ~ Weapons Shop", 66, 185, 377, 212, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Weapons", 66, 212, 269, 236, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) for i, v in ipairs ( ammunationWeapons )do name = i r2, g2, b2, size2 = ItemsHower() dxDrawBorderedText("Price", 269, 212, 377, 236, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(getWeaponNameFromID(v[1]), 66, (210+(i*offs)), 269, 270, tocolor(r2, g2, b2, 255),size2, "bankgothic", "left", "center", false, false, false, false, false) dxDrawText(tocomma(v[2]).."$", 269, 210+(i*offs), 377, 270, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) end dxDrawFixedLine(64, 240, 377, 240, tocolor(255, 255, 255, 255), 3, false) dxDrawFixedLine(269, 212, 269, 597, tocolor(255, 255, 255, 255), 3, false) dxDrawFixedLine(64, 212, 377, 212, tocolor(255, 255, 255, 255), 3, false) r, g, b, size = buttonHover() r1, g1, b1, size1= closeHover() DxDrawBorderedRectangle(64, 603, 313, 32, tocolor(0, 0, 0, 200), false) dxDrawBorderedText("Purchase", 64, 602, 221, 635, tocolor(r, g, b, 255), size, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Close", 221, 602, 378, 635, tocolor(r1, g1, b1, 255), size1, "bankgothic", "center", "center", false, false, false, false, false) if #ammunationWeapons ~= i then dxDrawFixedRectangle(64, setposition, 312, 23, tocolor(0, 0, 0, 100), false) end end function buttonHover() if isMouseInPosition(64, 602, 221, 635) then r,g, b, size= 200, 200, 0, 0.9 else r,g, b, size = 255, 255, 255, 0.8 end return r,g, b, size end function closeHover() if isMouseInPosition(221, 602, 378, 635) then r1, g1, b1, size1= 200, 200, 0, 0.9 else r1, g1, b1, size1= 255, 255, 255, 0.8 end return r1, g1, b1, size1 end function ItemsHower() if isMouseInPosition(66, (210+(name*offs)), 269, 270) then r2, g2, b2, size2= 200, 200, 0, 0.7 else r2, g2, b2, size2= 255, 255, 255, 0.6 end return r2, g2, b2, size2 end addEvent("setAmmuGUIVisible", true) function setAmmuGUIVisible() if opened == false then toggleAllControls( false) event("onClientRender", root,dxDrawAmmuShop) showCursor(true) event("onClientKey", root, onPlayerDxHit) event("onClientKey", root, onPlayerChooseWep) end end event("setAmmuGUIVisible", root, setAmmuGUIVisible) function onPlayerDxHit(key, pressed) if not key == "mouse1" then return false end if isMouseInPosition(sX*(221/smX), sY*(602/smY), sX*(378/smX), sY*(635/smY)) then close() end end function close() opened = false showCursor(false) --toggleAllControls( true) setTimer(toggleAllControls, 50, 1, true) remove("onClientRender", root, dxDrawAmmuShop) remove("onClientKey", root, onPlayerDxHit) remove("onClientKey", root, onPlayerChooseWep) end function isMouseInPosition(x1,y1,x2,y2, type) if not isCursorShowing() then return false end local cx,cy = getCursorPosition() cx,cy = cx*sX,cy*sY if cx >= sX*(x1/smX) and cx <= (type == true and sX*(x2/smX) + sX*(x1/smX) or sX*(x2/smX)) and cy >= sY*(y1/smY) and cy <= (type == true and sY*(y2/smY) + sY*(y1/smY) or sY*(y2/smY)) then return true,cx,cy else return false end end function onPlayerChooseWep(key, press) if not key or not key=="mouse1" and not press then return false end if not (name) then return false end cx, cy = getCursorPosition( ) cy = (cy*sY)-21 cx = cx*sX if cy >= sY*(560/smY) or cy <= sY*(235/smY) then return false end if cx <= sX*(66/smX) or cx >= sX*(377/smX) then return false end setposition = cy+(name) end addEventHandler( "onClientPlayerWasted", localPlayer, function() close() end )
  14. Snow-Man

    full sql info

    how to get all data from sql, in my script it's show me only recent data function getTransactionBankLog(player) if (player) then local transaction = exports.USCsql:query( "SELECT * FROM bank_transaction WHERE accName = ?", getAccountName(getPlayerAccount(player))) if transaction and transaction['log'] and transaction['date'] then local tran, date = transaction['log'] ,transaction['date'] return tran, date else return false end end end
  15. Snow-Man

    dx List

    i have started with new script, i have got some problems on it, it's about weapon shops with dx functions how can i make weapon selected, i have made table of weapons using one dxDrawText here's my code offs = 45 valid_key = {["mouse1"] = true} opened = false event = addEventHandler remove = removeEventHandler smX, smY = 1280, 1024 sX, sY = guiGetScreenSize( ) local ammunationWeapons = { {16,3000, 5}, {22,500, 30}, {23,600, 30}, {24,1200, 15}, {25,600, 15}, {26,800, 12}, {27,1000, 10}, {28,500, 60}, {29,2000, 90}, {30,3500, 120}, {31,4500, 150}, {32,300, 60}, {33,600, 20}, {34,5000, 10}, {46,800, 1}, } setposition = 250 function dxDrawAmmuShop() if opened == true then return false end DxDrawBorderedRectangle(64, 186, 313, 411, tocolor(0, 0, 0, 150), false) dxDrawBorderedText("USC ~ Weapons Shop", 66, 185, 377, 212, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Weapons", 66, 212, 269, 236, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) for i, v in ipairs ( ammunationWeapons )do name = i r2, g2, b2, size2 = ItemsHower() dxDrawBorderedText("Price", 269, 212, 377, 236, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(getWeaponNameFromID(v[1]), 66, (210+(i*offs)), 269, 270, tocolor(r2, g2, b2, 255),size2, "bankgothic", "left", "center", false, false, false, false, false) dxDrawText(tocomma(v[2]).."$", 269, 210+(i*offs), 377, 270, tocolor(255, 255, 255, 255), 0.70, "bankgothic", "center", "center", false, false, false, false, false) end dxDrawFixedLine(64, 240, 377, 240, tocolor(255, 255, 255, 255), 3, false) dxDrawFixedLine(269, 212, 269, 597, tocolor(255, 255, 255, 255), 3, false) dxDrawFixedLine(64, 212, 377, 212, tocolor(255, 255, 255, 255), 3, false) r, g, b, size = buttonHover() r1, g1, b1, size1= closeHover() DxDrawBorderedRectangle(64, 603, 313, 32, tocolor(0, 0, 0, 200), false) dxDrawBorderedText("Purchase", 64, 602, 221, 635, tocolor(r, g, b, 255), size, "bankgothic", "center", "center", false, false, false, false, false) dxDrawBorderedText("Close", 221, 602, 378, 635, tocolor(r1, g1, b1, 255), size1, "bankgothic", "center", "center", false, false, false, false, false) if #ammunationWeapons ~= i then dxDrawFixedRectangle(64, setposition, 312, 23, tocolor(0, 0, 0, 100), false) end end i have posted half of it but it's working fine just need to know how to get item selected and select it