EW1611

Members
  • Content Count

    67
  • Joined

  • Last visited

Community Reputation

2 Neutral

About EW1611

  • Rank
    Snitch

Recent Profile Visitors

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

  1. Olá, to ajudando em um servidor, dps de um tempo começou a dar alguns erros: "Download error: HTTP server file mismatch" e "External HTTP file mismatch (Retrying this file with internal HTTP)" o servidor é de host, como poderia fazer para arrumar isso?
  2. Essa é uma parte do código da hud que estou usando, o código inteiro é esse: local screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) local components = { "area_name", "radio", "vehicle_name" } local font = dxCreateFont('files/fonts/font.ttf', 10, false); local font2 = dxCreateFont('files/fonts/font.ttf', 14, false); function f_hud( ... ) if (not isPlayerMapVisible()) then local money = convertNumber(getPlayerMoney(getLocalPlayer())) local bank = convertNumber(getElementData(localPlayer, "Bank:Royal") or "0") local realName = math.floor(getElementHealth(localPlayer)) local level = getElementData(getLocalPlayer(), "Level") or 0 local Cargo_Atual = getElementData(localPlayer, "DNL:Cargo") exports["blur"]:dxDrawBluredRectangle(x*1180, y*50-25, x*180, y*35, tocolor(255, 255, 255, 255)) exports["blur"]:dxDrawBluredRectangle(x*1180, y*100-25, x*180, y*35, tocolor(255, 255, 255, 255)) exports["blur"]:dxDrawBluredRectangle(x*1180, y*150-25, x*180, y*35, tocolor(255, 255, 255, 255)) exports["blur"]:dxDrawBluredRectangle(x*1180, y*200-25, x*180, y*35, tocolor(255, 255, 255, 255)) exports["blur"]:dxDrawBluredRectangle(x*1000, y*50-25, x*160, y*35, tocolor(255, 255, 255, 255)) exports["blur"]:dxDrawBluredRectangle(x*1040, y*100-25, x*120, y*35, tocolor(255, 255, 255, 255)) dxDrawRectangle(x*1180, y*50-25, x*180, y*35, tocolor(0, 0, 0, 150), false) dxDrawRectangle(x*1180, y*100-25, x*180, y*35, tocolor(0, 0, 0, 150), false) dxDrawRectangle(x*1180, y*150-25, x*180, y*35, tocolor(0, 0, 0, 150), false) dxDrawRectangle(x*1180, y*200-25, x*180, y*35, tocolor(0, 0, 0, 150), false) dxDrawRectangle(x*1000, y*50-25, x*160, y*35, tocolor(0, 0, 0, 150), false) dxDrawRectangle(x*1040, y*100-25, x*120, y*35, tocolor(0, 0, 0, 150), false) dxDrawText(" "..(getElementData(localPlayer,"fome") or 0),x*1015+5, y*60-25, x*1470+5, y*30, tocolor(255, 255, 255, 230), 1.05, font, "left", "top", false, false, false, true, false) dxDrawText(" "..(getElementData(localPlayer,"sede") or 0),x*1085+10, y*60-25, x*1540+10, y*30, tocolor(255, 255, 255, 230), 1.05, font, "left", "top", false, false, false, true, false) dxDrawLine(x*1360, y*85-25, x*1180, y*85-25, tocolor(255, 0, 0, 150), 3, false) dxDrawLine(x*1360, y*135-25, x*1180, y*135-25, tocolor(255, 0, 0, 150), 3, false) dxDrawLine(x*1360, y*185-25, x*1180, y*185-25, tocolor(255, 0, 0, 150), 3, false) dxDrawLine(x*1360, y*235-25, x*1180, y*235-25, tocolor(255, 0, 0, 150), 3, false) dxDrawLine(x*1000, y*85-25, x*1160, y*85-25, tocolor(255, 0, 0, 150), 3, false) dxDrawLine(x*1040, y*135-25, x*1160, y*135-25, tocolor(255, 0, 0, 150), 3, false) dxDrawImage(x*1185+20, y*57-25, x*22, y*22, "files/img/name.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1185+90, y*57-25, x*22, y*22, "files/img/colete.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1185, y*108-25, x*20, y*20, "files/img/maleta.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1184, y*155-25, x*25, y*25, "files/img/money.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1185, y*205-25, x*25, y*25, "files/img/card.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1005+5, y*55-25, x*27, y*27, "files/img/exp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1015+70, y*55-25, x*27, y*27, "files/img/sede.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1042, y*105-25, x*27, y*27, "files/img/level.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("R$: "..money, x*1210, y*160-25, x*1132, y*37, tocolor(255, 255, 255, 230), 1.00, font, "left", "top", false, false, false, true, false) dxDrawText("R$: "..bank, x*1215, y*210-25, x*150, y*23, tocolor(255, 255, 255, 230), 1.00, font, "left", "top", false, false, false, true, false) dxDrawText(" Nivel: " ..(getElementData(getLocalPlayer(), "Level") or 0), x*1050, y*110-25, x*150, y*37, tocolor(255, 255, 255, 255), 0.9, font, "left", "top", false, false, false, true, false) dxDrawText(realName, x*1215+20, y*62-28, x*1220+40, y*30, tocolor(255, 255, 255, 255), 1.05, font, "left", "top", false, false, false, true, false) dxDrawText(getPedArmor(localPlayer), x*1215+90, y*62-28, x*1220+40, y*30, tocolor(255, 255, 255, 255), 1.05, font, "left", "top", false, false, false, true, false) local Encaminhado = getElementData ( localPlayer, "Emprego") or "Desempregado" dxDrawText(""..(getElementData ( localPlayer, "Emprego") or "Desempregado"), x*1215, y*112-25, x*1132, y*37, tocolor(255, 255, 255, 230), x*0.9, font, "left", "top", false, false, false, false, false) end end function toggleF11() if isVisible then addEventHandler("onClientRender", root, f_hud) else removeEventHandler("onClientRender", root, f_hud) end isVisible = not isVisible end bindKey ("F11", "down", toggleF11) function setHud() addEventHandler("onClientRender", getRootElement(), f_hud) setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) setPlayerHudComponentVisible("radar", false) for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), setHud) addEventHandler("onPlayerJoin", getResourceRootElement(getThisResource()), setHud) addEventHandler("onPlayerSpawn", getResourceRootElement(getThisResource()), setHud) addEventHandler("onPlayerWasted", getResourceRootElement(getThisResource()), setHud) addEventHandler("onPlayerJoin", 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) setPlayerHudComponentVisible("radar", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), removeHud) 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 getPedMaxHealth(ped) assert(isElement(ped) and (getElementType(ped) == "ped" or getElementType(ped) == "player"), "Bad argument @ 'getPedMaxHealth' [Expected ped/player at argument 1, got " .. tostring(ped) .. "]") local stat = getPedStat(ped, 24) local maxhealth = 100 + (stat - 569) / 4.31 return math.max(1, maxhealth) end ------------------------------------------------------------------------ [[ RETIRAR HUD ORIGINAL ]] ------------------------------------------------------------------------ --[[function hideall(player) showPlayerHudComponent ( "ammo", false ) showPlayerHudComponent ( "area_name", false ) showPlayerHudComponent ( "armour", false ) showPlayerHudComponent ( "breath", false ) showPlayerHudComponent ( "clock", false ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "money", false ) showPlayerHudComponent ( "vehicle_name", false ) showPlayerHudComponent ( "weapon", false ) showPlayerHudComponent ( "radio", false ) showPlayerHudComponent ( "radar", false ) showPlayerHudComponent ( "wanted", false ) end addEventHandler ( "onClientResourceStart", getRootElement(), hideall ) function showall(player) showPlayerHudComponent ( "ammo", true ) showPlayerHudComponent ( "area_name", true ) showPlayerHudComponent ( "armour", true ) showPlayerHudComponent ( "breath", true ) showPlayerHudComponent ( "clock", true ) showPlayerHudComponent ( "health", true ) showPlayerHudComponent ( "money", true ) showPlayerHudComponent ( "vehicle_name", true ) showPlayerHudComponent ( "weapon", true ) showPlayerHudComponent ( "radio", true ) showPlayerHudComponent ( "radar", true ) showPlayerHudComponent ( "wanted", false ) end addEventHandler ( "onClientResourceStop", resourceRoot, showall ) ]]--
  3. Olá, quando o resource inicia ele esconde a hud original do gta, mas quando o player loga a hud do gta continua sendo mostrada, esse é o codigo local components = { "area_name", "radio", "vehicle_name" } function setHud() addEventHandler("onClientRender", getRootElement(), f_hud) setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) setPlayerHudComponentVisible("radar", false) for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), setHud) addEventHandler("onPlayerJoin", getRootElement(), setHud) addEventHandler("onPlayerSpawn", getRootElement(), setHud) addEventHandler("onPlayerWasted", getRootElement(), setHud) addEventHandler("onPlayerJoin", getRootElement(), 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) setPlayerHudComponentVisible("radar", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), removeHud)
  4. olá, queria q quando abrisse um gui meio q bloqueasse os outros bind, como os de abrir o chat e bloquear veículo, alguem sabe me dizer ql função usar para fazer isso?
  5. Obrigado, funcionou, mas você consegue me explicar melhor como q funciona uma table, ou me recomendar algo para ler?
  6. Fiz algumas mudanças, colocando invés de colCircle, coloquei markers, e por algum motivo não está mais funcionando dff = engineLoadDFF("grassplant01.dff") engineReplaceModel(dff, 3409) addCommandHandler("devmode", function() setDevelopmentMode(true) end ) plantas = { {-1014, -1609.2, 75.36}, {-1010, -1609.242, 75.367}, {-1006, -1609.19, 75.36}, {-1002, -1609.104, 75.36}, {-998, -1609.082, 75.36}, {-994, -1609.037, 75.36}, {-990, -1609.037, 75.36}, {-1014, -1613, 75.36}, {-1010, -1613, 75.367}, {-1006, -1613, 75.36}, {-1002, -1613, 75.36}, {-998, -1613, 75.36}, {-994, -1613, 75.36}, {-990, -1613, 75.36}, {-1014, -1617, 75.36}, {-1010, -1617, 75.367}, {-1006, -1617, 75.36}, {-1002, -1617, 75.36}, {-998, -1617, 75.36}, {-994, -1617, 75.36}, {-990, -1617, 75.36}, {-1014, -1621, 75.36}, {-1010, -1621, 75.367}, {-1006, -1621, 75.36}, {-1002, -1621, 75.36}, {-998, -1621, 75.36}, {-994, -1621, 75.36}, {-990, -1621, 75.36}, } for i, v in ipairs ( plantas ) do plantas = createObject(3409, v[1],v[2],v[3]) colP = createMarker(v[1],v[2],v[3],"cylinder",2.5,0,0,0,0) end function fcm1() if isElementWithinMarker(localPlayer, colP) then setPedAnimation(localPlayer,"INT_HOUSE","wash_up",10000,true,false,true,false,10) setTimer(function () setPedAnimation(localPlayer) givePlayerMoney(math.random(500,1000)) end,10000,1) end end addCommandHandler("colher", fcm1) edit:Não há nenhum erro no debugscript, e o script está no lado client
  7. @Furzy Deu certo, obrigado e @Lord Henry nem percebi que o setPlayerWantedLevel era server-side, obrigado por me avisar
  8. Olá, fiz o seguinte script no lado client, porém, da esse erro de que a função, invés de ser localPlayer ele pega a string do comando, "colher" dff = engineLoadDFF("grassplant01.dff") engineReplaceModel(dff, 3409) addCommandHandler("devmode", function() setDevelopmentMode(true) end ) plantas = { {-1014, -1609.2, 75.36}, {-1010, -1609.242, 75.367}, {-1006, -1609.19, 75.36}, {-1002, -1609.104, 75.36}, {-998, -1609.082, 75.36}, {-994, -1609.037, 75.36}, {-990, -1609.037, 75.36}, {-1014, -1613, 75.36}, {-1010, -1613, 75.367}, {-1006, -1613, 75.36}, {-1002, -1613, 75.36}, {-998, -1613, 75.36}, {-994, -1613, 75.36}, {-990, -1613, 75.36}, {-1014, -1617, 75.36}, {-1010, -1617, 75.367}, {-1006, -1617, 75.36}, {-1002, -1617, 75.36}, {-998, -1617, 75.36}, {-994, -1617, 75.36}, {-990, -1617, 75.36}, {-1014, -1621, 75.36}, {-1010, -1621, 75.367}, {-1006, -1621, 75.36}, {-1002, -1621, 75.36}, {-998, -1621, 75.36}, {-994, -1621, 75.36}, {-990, -1621, 75.36}, } for i, v in ipairs ( plantas ) do plantas = createObject(3409, v[1],v[2],v[3]) colP = createColCircle(v[1],v[2],1.5) end function fcm1(localPlayer, commandname) if isElementWithinColShape(localPlayer, colP) then setPedAnimation(localPlayer,"INT_HOUSE","wash_up",10000,false,false,true,false) setTimer(function () star = getPlayerWantedLevel() setPlayerWantedLevel(localPlayer) setPedAnimation(localPlayer) givePlayerMoney(math.random(500,1000)) end,10000,1) end end addCommandHandler("colher", fcm1) erro: Bad argument @ 'isElementWithinColShape' [Expected element at argument 1,got string 'colher']
  9. Fiz assim e agora está funcionando perfeitamente: addEventHandler("onClientVehicleEnter", root, function (key, keystate) bindKey("accelerate", "up", blowoff) end) function blowoff(commandname) p = getPedOccupiedVehicle(localPlayer) id = getElementModel(p) if id == 562 then x,y,z = getElementPosition(localPlayer) playSound3D("BlowOff.mp3", x,y,z) end end
  10. fiz assim, mas da o mesmo erro " [Expected element at argument 1, got string 'accelerate']" function blowoff(source, localPlayer, accelerate, up) local x,y,z = getElementPosition(localPlayer) playSound3D("BlowOff.mp3", x,y,z) end function bnd() bindKey("accelerate","up",blowoff) end addEventHandler("onClientVehicleEnter", root, bnd) function ubnd() unbindKey("accelerate","up",blowoff) end addEventHandler("onClientVehicleExit", root, ubnd)
  11. function blowoff(localPlayer, accelerate, up) local p = getPedOccupiedVehicle(localPlayer) local id = getElementModel(p) if id == 562 then local x,y,z = getElementPosition(localPlayer) s1 = playSound3D("BlowOff.mp3", x,y,z) setSoundVolume(s1, 1.5) end end function bnd() bindKey("accelerate","up",blowoff) end addEventHandler("onClientVehicleEnter", root, bnd) function ubnd() unbindKey("accelerate","up",blowoff) end addEventHandler("onClientVehicleExit", root, ubnd) Fiz assim e continua dando o mesmo erro na linha 2 e 3
  12. é, ao soltar a tecla que o player usa para acelerar o veículo Erro na linha 2: Bad argument @ 'getElementPosition' [Expected element at argument 1, got string 'accelerate']; linha 3:Bad argument @ 'playSound3D' [Expected vector 3 at argument 2, got boolean]; linha 4: bad 'sound/player' pointer @ 'setSoundVolume'(1)
  13. Olá fiz o seguinte script, para quando o player soltar o acelerador dar play no som, mas não da play e nenhum erro no debugscript, até tentei aumentar o volume, mas ainda não acontece nada: function blowoff(thePlayer) p = getPedOccupiedVehicle(thePlayer) id = getElementModel(p) if id == 562 then pos = getElementPosition(thePlayer) s1 = playSound3D("BlowOff.mp3", pos, true) setSoundVolume(s1, 10) end end function bnd() unbindKey("accelerate","up",blowoff) end addEventHandler("onClientVehicleEnter", root, bnd) function ubnd() unbindKey("accelerate","up",blowoff) end addEventHandler("onClientVehicleExit", root, ubnd) Obs: O áudio tem 1 segundo, não sei se pode ser isso
  14. Olá, queria que quando acontecer um certo evento, ele mostrasse uma mensagem no chat dos players que estivessem em uma acl, alguém sabe me dizer como fazer e explicar como funciona a função?
  15. Olá, fiz um alteração em uma hud, para mostrar a fome,sede e sono, porem, ela só pega os valores qndo o resource inicia, dps qndo é alterada, ela continua mostrando o msm numero, em vez de atualizar local Sono = getElementData ( localPlayer, "Sono" ) local Sede = getElementData ( localPlayer, "Sede" ) local Fome = getElementData ( localPlayer, "Fome" ) addEventHandler("onClientRender", root, function() dxDrawImage(screenW * 0.6332, screenH * 0.0729, screenW * 0.1881, screenH * 0.1068, "images/vida2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.6523, screenH * 0.1146, screenW * 0.0220, screenH * 0.0313, "images/comida.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.7577, screenH * 0.1159, screenW * 0.0220, screenH * 0.0299, "images/sono.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(""..Fome.."", screenW * 0.6772, screenH * 0.1172, screenW * 0.6991, screenH * 0.1458, tocolor(255, 255, 255, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Sede.."", screenW * 0.7255, screenH * 0.1172, screenW * 0.7474, screenH * 0.1458, tocolor(255, 255, 255, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Sono.."", screenW * 0.7826, screenH * 0.1172, screenW * 0.8045, screenH * 0.1458, tocolor(255, 255, 255, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false) dxDrawImage(screenW * 0.7035, screenH * 0.1159, screenW * 0.0220, screenH * 0.0299, "images/sede.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end )