Jump to content

filsk

Members
  • Posts

    2
  • Joined

  • Last visited

Details

  • Location
    Brasil

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

filsk's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Fiz esse código da hud mas não da erro nem nada, ela só não aparece in-game local screenW, screenH = guiGetScreenSize() local resW, resH = 1600,900 local x, y = (screenW/resW), (screenH/resH) local components = { "area_name", "radio", "vehicle_name" } function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1.%2') if ( k==0 ) then break end end return formatted end function complexohud() local vida = math.floor(getElementHealth(getLocalPlayer())) local money = convertNumber(getPlayerMoney(getLocalPlayer())) local bank = convertNumber(getElementData(localPlayer, "TS:Bancobb") or "0") local fome = getElementData(getLocalPlayer(), "hunger") or 100 local sede = getElementData(getLocalPlayer(), "sede") or 100 dxDrawRectangle(x*356, y*-435, x*86, y*86, tocolor(214, 58, 86, 255), false) dxDrawRectangle(x*470, y*-436, x*86, y*86, tocolor(206, 107, 35, 255), false) dxDrawRectangle(x*584, y*-436, x*86, y*86, tocolor(89, 186, 207, 255), false) dxDrawRectangle(x*698, y*-436, x*86, y*86, tocolor(148, 216, 63, 255), false) dxDrawImage(x*379, y*-412, x*39, y*39, "files/heart.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*493, y*-412, x*39, y*39, "files/escudo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*607, y*-412, x*39, y*39, "files/garrafa.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*721, y*-412, x*39, y*39, "files/hamburguer.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end -- IGNORAR function dxDrawRoundedRectangle(x, y, rx, ry, color, radius) rx = rx - radius * 2 ry = ry - radius * 2 x = x + radius y = y + radius if (rx >= 0) and (ry >= 0) then dxDrawRectangle(x, y, rx, ry, color) dxDrawRectangle(x, y - radius, rx, radius, color) dxDrawRectangle(x, y + ry, rx, radius, color) dxDrawRectangle(x - radius, y, radius, ry, color) dxDrawRectangle(x + rx, y, radius, ry, color) dxDrawCircle(x, y, radius, 180, 270, color, color, 7) dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7) dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7) dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7) end end function setHud() addEventHandler("onClientRender", getRootElement(), complexohud) setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), setHud) function removeHud() setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), removeHud)
  2. unction give1() if getPlayerMoney(source) >= 34 then setElementData (source, "1", (getElementData(source, "1") or 0) + 1) triggerClientEvent (source, "addBox", source, "Você está comprou (+1)!", "success") else triggerClientEvent (source, "addBox", source, "Você está sem dinheiro!", "error") end end addEvent("give1",true) addEventHandler("give1", root, give1) tá esse código no menu de compra, mas quando compra a comida ou o objeto, não gasta dinheiro somente compra, como eu poderia fazer para quando eu clicasse lá no preço o dinheiro fosse cobrado
×
×
  • Create New...