Sucrilhex

Members
  • Content Count

    30
  • Joined

  • Last visited

  • Days Won

    1

Sucrilhex last won the day on June 26

Sucrilhex had the most liked content!

Community Reputation

5 Neutral

1 Follower

About Sucrilhex

  • Rank
    Rat

Recent Profile Visitors

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

  1. uhh, verdade, esqueci de por não entendi, tem algum exemplo?
  2. realmente existe o arquivo help.xml na pasta do script? se não existir apague essa parte do meta
  3. tente: local Dinheiro = (getPlayerMoney(getLocalPlayer())) local DinheiroF = formatNumber(Dinheiro) local Banco = getElementData(localPlayer,"Banco") or 0 local DinheiroB = formatNumber(Banco) local procurado = getPlayerWantedLevel(getLocalPlayer()) dxDrawText(Empregos, screenW - 140 - 10, 15 + 200, screenW - 328 - 10 + 315, 30, tocolor(255, 255, 255, 255), 0.9, Fonte, "center", "center", false, false, false, false, false) dxDrawText(DinheiroF, screenW - 328 - 10, 10 + 183, screenW - 350 - 10 + 190, 20, tocolor ( 255, 255, 255, 255 ), 0.7, Fonte, "right", "top", false, false, false, true ) dxDrawText(DinheiroB, screenW - 328 - 10, 10 + 183, screenW - 321 - 10 + 312, 20, tocolor ( 255, 255, 255, 255 ), 0.7, Fonte, "right", "top", false, false, false, true )
  4. me fale para qual propósito você está usando "local veiculo", geralmente deve usar um getElementData ou algo parecido depois do local veiculo, exemplo local veiculo = getElementData(veh,"status:motor")
  5. tente mudar a resolução do mta, sempre quando donos de servidores fazem os dxs utilizam a resolução: 1366x768
  6. use if getVehicleType(source) == "Bike" or getVehicleType(source) == "BMX" then return end
  7. fala de um save system !, copie o código abaixo ou baixe pelo link de download. download: http://www.mediafire.com/file/md5awpshorc79du/Res_SaveSystem.zip/file codigo (server) function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "funmodev2-money") if (accountData) then local playerMoney = getAccountData (theCurrentAccount, "funmodev2-money") local playerSkin = getAccountData (theCurrentAccount, "funmodev2-skin") local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health") local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor") local R = getAccountData (theCurrentAccount, "funmodev2-R") local G = getAccountData (theCurrentAccount, "funmodev2-G") local B = getAccountData (theCurrentAccount, "funmodev2-B") local playerX = getAccountData (theCurrentAccount, "funmodev2-x") local playerY = getAccountData (theCurrentAccount, "funmodev2-y") local playerZ = getAccountData (theCurrentAccount, "funmodev2-z") local playerInt = getAccountData (theCurrentAccount, "funmodev2-int") local playerDim = getAccountData (theCurrentAccount, "funmodev2-dim") local playerWanted = getAccountData (theCurrentAccount, "funmodev2-wantedlevel") local playerWeaponID0 = getAccountData (theCurrentAccount, "funmodev2-weaponID0") local playerWeaponID1 = getAccountData (theCurrentAccount, "funmodev2-weaponID1") local playerWeaponID2 = getAccountData (theCurrentAccount, "funmodev2-weaponID2") local playerWeaponID3 = getAccountData (theCurrentAccount, "funmodev2-weaponID3") local playerWeaponID4 = getAccountData (theCurrentAccount, "funmodev2-weaponID4") local playerWeaponID5 = getAccountData (theCurrentAccount, "funmodev2-weaponID5") local playerWeaponID6 = getAccountData (theCurrentAccount, "funmodev2-weaponID6") local playerWeaponID7 = getAccountData (theCurrentAccount, "funmodev2-weaponID7") local playerWeaponID8 = getAccountData (theCurrentAccount, "funmodev2-weaponID8") local playerWeaponID9 = getAccountData (theCurrentAccount, "funmodev2-weaponID9") local playerWeaponID10 = getAccountData (theCurrentAccount, "funmodev2-weaponID10") local playerWeaponID11 = getAccountData (theCurrentAccount, "funmodev2-weaponID11") local playerWeaponID12 = getAccountData (theCurrentAccount, "funmodev2-weaponID12") local playerWeaponAmmo0 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo0") local playerWeaponAmmo1 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo1") local playerWeaponAmmo2 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo2") local playerWeaponAmmo3 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo3") local playerWeaponAmmo4 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo4") local playerWeaponAmmo5 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo5") local playerWeaponAmmo6 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo6") local playerWeaponAmmo7 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo7") local playerWeaponAmmo8 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo8") local playerWeaponAmmo9 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo9") local playerWeaponAmmo10 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo10") local playerWeaponAmmo11 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo11") local playerWeaponAmmo12 = getAccountData (theCurrentAccount, "funmodev2-weaponAmmo12") spawnPlayer (source, playerX, playerY, playerZ +1, 0, playerSkin, playerInt, playerDim) setPlayerMoney (source, playerMoney) setTimer (setElementHealth, 50, 1, source, playerHealth) setTimer (setPedArmor, 50, 1, source, playerArmor) setTimer (setPlayerWantedLevel, 50, 1, source, playerWanted) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) setCameraTarget (source, source) fadeCamera(source, true, 2.0) setPlayerNametagColor (source, R, G, B) else spawnPlayer (source, 1481.677734375,-1766.314453125,18.795755386353, 5.3092346191406,0,0,0) -- Caso o jogador logue pela primeira vez sera spawnado aqui ! setPlayerMoney (source, 1000) -- valor que vai ganhar na primeira vez ! setCameraTarget (source, source) fadeCamera(source, true, 2.0) setPlayerNametagColor (source, 255, 255, 255) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then local x,y,z = getElementPosition (source) local r,g,b = getPlayerNametagColor (source) setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source))) setAccountData (account, "funmodev2-skin", tostring (getPedSkin (source))) setAccountData (account, "funmodev2-health", tostring (getElementHealth (source))) setAccountData (account, "funmodev2-armor", tostring (getPedArmor (source))) setAccountData (account, "funmodev2-R", r) setAccountData (account, "funmodev2-G", g) setAccountData (account, "funmodev2-B", b) setAccountData (account, "funmodev2-x", x) setAccountData (account, "funmodev2-y", y) setAccountData (account, "funmodev2-z", z) setAccountData (account, "funmodev2-int", getElementInterior (source)) setAccountData (account, "funmodev2-dim", getElementDimension (source)) setAccountData (account, "funmodev2-wantedlevel", getPlayerWantedLevel (source)) setAccountData (account, "funmodev2-weaponID0", getPedWeapon (source, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (source, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (source, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (source, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (source, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (source, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (source, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (source, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (source, 8)) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (source, 9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (source, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (source, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (source, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (source, 8)) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (source, 12)) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then fadeCamera (source, false) setTimer (spawnPlayer, 1000, 1, source, 1172.9189453125,-1323.7041015625,15.398872375488, 272.04486083984, getPedSkin (source), 0, 0) -- Para onde vai quando morrer ! setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted)
  8. addEvent("progress", true) addEventHandler("progress", getRootElement(), function(client) if (db) then local Drogas = getElementData(client, "Drogas") or 0 setElementFrozen(client, true) setPedAnimation(client, ajuste.animation.animList, ajuste.animation.animDance, ajuste.animation.timePlant, true, false, false, false) outputChatBox(ajuste.texts.plant, client, 255, 255, 255, true) setTimer(function() setElementData(client, "Drogas", Drogas+10) outputChatBox(ajuste.textos.plantarEnd, client, 255, 255, 255, true) --dbFree(dbQuery(db, "INSERT INTO plantacao (ID, nick, marker_id) VALUES (?, ?, ?) ", getElementData(client, "ID"), getPlayerName(client), tonumber(markerTraf), 0)) end,30000, 1) setTimer (setElementFrozen, 30000, 1, client, false) end end) não vi que tinha o respondido, perdão : )
  9. use getElementData e setElementData, se quiser ajuda entre em contato comigo no discord: twtDaniel#7134
  10. setElementFrozen ( source, false) setElementFrozen ( source, true)
  11. eu posso te ajudar se explicar melhor, você pretende por um /staff para cada cargo? explique-me
  12. local screenW,screenH = guiGetScreenSize() local resW,resH = 1366,768 local x,y = (screenW/resW), (screenH/resH) DGS = exports.Res_dgs local Font_1 = dxCreateFont("font/font.ttf", y*11) local Font_2 = dxCreateFont("font/font1.ttf", y*11) local Font_3 = dxCreateFont("font/fontNick.ttf", y*11) local Font_4 = dxCreateFont("font/OpenSans-Bold.ttf", y*14) function Abrir_Garagem() if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then if not isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then showCursor(true) DGS:dgsSetVisible(SeusCarros, true) addEventHandler("onClientRender", root, Dx_Garagem) end end end addEvent("DNL:Abrir(Garagem)", true) addEventHandler("DNL:Abrir(Garagem)", root, Abrir_Garagem) function Fechar_Garagem() if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then showCursor(false) DGS:dgsSetVisible(SeusCarros, false) removeEventHandler("onClientRender", root, Dx_Garagem) end end end addEvent("DNL:Fechar(Garagem)", true) addEventHandler("DNL:Fechar(Garagem)", root, Fechar_Garagem) --=============================-- ---------- Dx Garagem ----------- --=============================-- function Dx_Garagem() -- exports["Ad-Blur"]:dxDrawBluredRectangle(x*500, y*193, x*366, y*450, tocolor(255, 255, 255, 255)) dxDrawRectangle(x*500, y*193, x*366, y*450, tocolor(200, 200, 200, 180), false) dxDrawRectangle(x*500, y*193, x*366, y*58, tocolor(0, 0, 0, 222), false) dxDrawLine(x*500, y*251, x*866, y*251, tocolor(0, 60, 160, 200), 2, false) dxDrawLine(x*500, y*482, x*866, y*482, tocolor(0, 60, 160, 200), 2, false) contornoRetangulo(x*500, y*193, x*366, y*450, tocolor(0, 0, 0, 222), x*1) -- Line enfeite dxDrawText("Garagem", x*643, y*210, x*724, y*234, tocolor(255, 255, 255, 255), 1, Font_4, "left", "top", false, false, false, false, false) dxDrawImage(x*602, y*493, x*162, y*40, "Img/botao.png", 0, 0, 0, CorPuxar, false) dxDrawText("Puxar", x*665, y*503, x*702, y*521, tocolor(0, 0, 0, 255), 1, Font_3, "left", "top", false, false, false, false, false) CorPuxar = tocolor(0, 60, 160, 200) if isCursorOnElement(x*602, y*493, x*162, y*40) then CorPuxar = tocolor(0, 60, 160, 255) end dxDrawImage(x*602, y*543, x*162, y*40, "Img/botao.png", 0, 0, 0, CorGuardar, false) dxDrawText("Guardar", x*658, y*553, x*710, y*571, tocolor(0, 0, 0, 255), 1, Font_3, "left", "top", false, false, false, false, false) CorGuardar = tocolor(0, 60, 160, 200) if isCursorOnElement(x*602, y*543, x*162, y*40) then CorGuardar = tocolor(0, 60, 160, 255) end dxDrawImage(x*602, y*593, x*162, y*40, "Img/botao.png", 0, 0, 0, CorSpawnar, false) dxDrawText("Spawnar", x*657, y*603, x*713, y*621, tocolor(0, 0, 0, 255), 1, Font_3, "left", "top", false, false, false, false, false) CorSpawnar = tocolor(0, 60, 160, 200) if isCursorOnElement(x*602, y*593, x*162, y*40) then CorSpawnar = tocolor(0, 60, 160, 255) end dxDrawText("X", x*835, y*210, x*724, y*234, CorClose, 1, Font_4, "left", "top", false, false, false, false, false) CorClose = tocolor(100, 100, 100, 255) if isCursorOnElement(x*835, y*210, x*17, y*17) then CorClose = tocolor(255, 0, 0, 255) end end --addEventHandler("onClientRender", root, Dx_Garagem) --=============================-- ---------- AddCar_List ---------- --=============================-- SeusCarros = DGS:dgsCreateGridList(x*500, y*231, x*366, y*232,false) DGS:dgsGridListAddColumn(SeusCarros,"", 1) DGS:dgsSetVisible(SeusCarros, false) function Refresh_Lista() local data = getElementData(localPlayer, "VehicleInfo") if data then DGS:dgsGridListClearRow(SeusCarros) for i, data in ipairs (data) do -- local = getVehicleNameFromModel(data["Model"]) local ID = data["ID"] local NameCarro = Lista_Veiculos:GetItemDetails(1, Lista_Veiculos:GetSelectedItem()) local row = DGS:dgsGridListAddRow(SeusCarros) DGS:dgsGridListSetItemText(SeusCarros, row, 1, NameCarro, false, true) DGS:dgsGridListSetItemData(SeusCarros, row, 1, ID) end end end addEventHandler("onClientElementDataChange", root, function(dd) if getElementType(source) == "player" and source == localPlayer and dd == "VehicleInfo" then local data = getElementData(source, dd) if data then Refresh_Lista() end end end) --=============================-- ---------- ClickListCar --------- --=============================-- function Clicks_Garagem ( _,state ) local id = DGS:dgsGridListGetSelectedItem(SeusCarros) local ID = DGS:dgsGridListGetItemData(SeusCarros, id, 1) if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then if isCursorOnElement ( x*835, y*210, x*17, y*17 ) then playSoundFrontEnd(8) Fechar_Garagem () end if state == "down" then if (id ~= -1) then if isCursorOnElement ( x*602, y*493, x*162, y*40 ) then playSoundFrontEnd(2) triggerServerEvent("DNL:Trazer_Veh", root, localPlayer, ID) elseif isCursorOnElement ( x*602, y*543, x*162, y*40 ) then playSoundFrontEnd(2) triggerServerEvent("DNL:Guardar_Veh", root, localPlayer, ID) elseif isCursorOnElement ( x*602, y*593, x*162, y*40 ) then playSoundFrontEnd(2) triggerServerEvent("DNL:Spawnar_Veh", root, localPlayer, ID) end end end end end addEventHandler ( "onClientClick", root, Clicks_Garagem ) --=============================-- ------------- IGNORA ------------ --=============================-- AllKeys = { "arrow_l", "arrow_u", "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "num_enter", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "escape", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } addEventHandler("onClientKey", root, function(button, press) for index, keys in pairs(AllKeys) do if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then if button == keys then cancelEvent() end end end end ) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y, w - 1, h, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end function contornoRetangulo(absX, absY, sizeX, sizeY, color, ancho) dxDrawRectangle(absX, absY, sizeX, ancho, color) dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color) dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color) dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho*2, color) end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end local x,y = guiGetScreenSize() function isCursorOnElement(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local fullx, fully = guiGetScreenSize() cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end o nome fica duplicado na garagem da concessionária, linha 85 até 99 quando eu pego um veiculo o nome funciona normal, porem quando pego outro, todos ficam o mesmo nome do veiculo que peguei por ultimo
  13. Use if id == 597 or id == 598 then return end mude 597 e 598 para o id de seus veiculos : ) se quiser por mais de 2 veiculos siga o exemplo abaixo. local vehicle = getPedOccupiedVehicle(source) local id = getElementModel ( vehicle ) if id == 597 or id == 598 or id == 596 or id == 525 or id == 523 then return end
  14. Olá, estou mexendo em um mini sistema de logs para uns mods, eu estou tentando deixar um unico arquivo para todos os mods que guardam logs, é possivel? fileOpen (":Res_Logs/Logs.txt")
  15. valor é 2000, só que na loja contem varios itens, e todos vão pra mesma função do lado server e lá verifica se a pessoa tem o item escolhido if getElementData(source, item) then e a mesma coisa pro money, cada item tem um valor.