TheMOG

Members
  • Content count

    328
  • Joined

  • Last visited

Community Reputation

19 Decent

1 Follower

About TheMOG

  • Rank
    Prankster
  • Birthday 14/05/98

Details

  • Occupation
    Try yourself, ask for help, but dont leak!

Recent Profile Visitors

937 profile views
  1. Question about setElementData & getElementData

    I'm not using getElementData in render, but its up to you. Im using onClientElementDataChange.
  2. Need help with relative screenW, screenH.

    Thank you. Can you show me something how to use the dxDrawText for relative res? Now its looks like this: Current code: local sX, sY = guiGetScreenSize() local mainWidth,mainHeight = 200, 10 --Main size for everything local mainX, mainY = (sX-250 / 2) - (mainWidth / 2), (sY-1800 / 2) - (mainHeight / 2) --Main position for everything. local healthW, healthH = (mainWidth / 2), (mainHeight / 2) --Work out the sizes for the health bar, based off the main sizes local armorW, armorH = (mainWidth / 2), (mainHeight / 2) --Same for the armor bar local healthX, healthY = mainX, mainY --Work out the position for the health bar, based off the main positions local armorX, armorY = mainX + (mainWidth / 2), mainY --Same for the armor bar local isHud = false local outlineThickness = 1 local outlineTopX, outlineTopY = mainX, mainY-outlineThickness local outlineTopWidth, outlineTopHeight = mainWidth, outlineThickness local outlineBottomX, outlineBottomY = mainX, mainY+mainHeight local outlineBottomWidth, outlineBottomHeight = mainWidth, outlineThickness local outlineLeftX, outlineLeftY = mainX-outlineThickness, mainY local outlineLeftWidth, outlineLeftHeight = outlineThickness, mainHeight local outlineRightX, outlineRightY = mainX+mainWidth, mainY local outlineRightWidth, outlineRightHeight = outlineThickness, mainHeight function drawHUD() dxDrawRectangle(mainX, mainY, mainWidth, mainHeight, tocolor(0,0,0,150)) dxDrawRectangle(healthX, healthY, healthW, healthH+5, tocolor(254, 39, 39, 150)) dxDrawRectangle(armorX, armorY, armorW, armorH+5, tocolor(38, 104, 254, 150)) dxDrawRectangle(outlineTopX, outlineTopY, outlineTopWidth, outlineTopHeight, tocolor(0,0,0,255)) dxDrawRectangle(outlineBottomX, outlineBottomY, outlineBottomWidth, outlineBottomHeight, tocolor(0,0,0,255)) dxDrawRectangle(outlineLeftX, outlineLeftY, outlineLeftWidth, outlineLeftHeight, tocolor(0,0,0,255)) dxDrawRectangle(outlineRightX, outlineRightY, outlineRightWidth, outlineRightHeight, tocolor(0,0,0,255)) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),function() addEventHandler("onClientRender", root, drawHUD) isHud = true end)
  3. Hello. I'm still running into some problems with DX. When others playing lower resoulution, they not seeing the "outlines". Can anybody can please help me, how can i calculate the correct screenW, screenH for all players seeing the correct DXpanels. Also can somebody can give me example dxDrawRectangle and text for something for this just for learning. Currently its looks like this: Learned from one of youtube video, but its still not giving me the right relative value. dxDrawLine(834/aX*x - 1, 438/aY*y - 1, 834/aX*x - 1, 463/aY*y, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1086/aX*x, 438/aY*y - 1, 834/aX*x - 1, 438/aY*y - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(834/aX*x - 1, 463/aY*y, 1086/aX*x, 463/aY*y, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1086/aX*x, 463/aY*y, 1086/aX*x, 438/aY*y - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(834/aX*x, 438/aY*y, 252/aX*x, 25/aY*y, tocolor(0, 0, 0, 150), false) dxDrawText("#FF6600"..exports["serverCore"]:ServerName().."#FFFFFF - Gambling", 833/aX*x, 437/aY*y, 1086/aX*x, 463/aY*y, tocolor(255, 255, 255, 255), 1.00,customFont, "center", "center", false, false, false, true, false)
  4. Logs

    you can create a export for @Tekken script. Simple add these to meta: <export function="log" type="shared" /> and call it like exports["resourceName"]:log("message") If its not working i'll send you mine with export functions.
  5. onElementModelChange

    Working thank you, how can i add more? Like Tried: local skinTable = { --[SKINID] = EXCEPTION [301] = 1 [50] = 2 [49] = 11 } its flooding the message
  6. onElementModelChange

    Hmm.. Now this working without any debug error, but i can still have the skin. Tried to set the skin instant 1, but didnt work. local skinTable = { --[SKINID] = EXCEPTION [301] = 1 } addEventHandler("onElementModelChange", getRootElement(), function(oldModel) local newModel = getElementModel(source) if skinTable[newModel] then if getElementData(source, "acc.accID") ~= skinTable[newModel] then iprint("ez a skinID accountID -re van védve") setElementModel(source,1) end end end)
  7. onElementModelChange

    Yes for accountID. Example: My accountID is 1, and i want to add 303 skinID only for my account. So if anybody have that skin, the script change that to 0
  8. onElementModelChange

    up
  9. Send Money

    you welcome
  10. A little problem

    .
  11. Send Money

    source = player outputChatBox ( "You gave " .. targetPlayer .. " " .. money .. "$", source, 0, 255, 0, true) -- LINE replace with this outputChatBox ( "You gave " .. targetPlayer .. " " .. money .. "$", source, 0, 255, 0, true) -- LINE outputChatBox (player .. "gave you " .. money .. "$", targetPlayer, 0, 255, 0, true ) -- LINE
  12. Send Money

    edit mine addCommandHandler("pay",function(player,cmd,targetPlayer,money) money = tonumber(money) and math.floor(tonumber(money)) or nil if not (targetPlayer) or not (money) then outputChatBox(syntax.." /" .. cmd .. " [Player] [Amount]",player,255,0,0,true) else local targetPlayer = getPlayerFromName (targetPlayer) if targetPlayer then if (targetPlayer==player) then outputChatBox(error.." You cant give money to yourself.",player,255,0,0,true) elseif money <= 0 then outputChatBox(error.." Minimum ammount is 0.",player,255,0,0,true) elseif getPlayerMoney(player) >= money then takePlayerMoney(player,money) givePlayerMoney(targetPlayer,money) else outputChatBox(error.." You dont have enough money.",player,177,9,45,true) end end end end)
  13. blip id 0 shader name

    Hi, how can i get these shader name? I want to replace this too, but i cant find the texture / shader name with shader_tex_names. 0: Marker If higher than player: If lower than player: "
  14. Question

    is there any way to make a script like a default "/refresh" command with listing out what is the new resource which is loaded or failed? like this: addCommandHandler("refreshres",function(player) if tonumber(getElementData(player, "admin")) >= 5 then refreshResources(true) outputChatBox("Loaded new resource(s):",player) outputChatBox(newResources,player) end end)