Jump to content

C0DE

Members
  • Posts

    55
  • Joined

  • Last visited

Everything posted by C0DE

  1. Resolvi ja realmente meu meu server estava desatualizado
  2. Como eu falei eu baixei na internet O problema e que ainda não foi solucionado!
  3. <meta> <info name="Empregos_DNL" author="#DaNiLiN" description="Curta - Danilin Scripter MTA" version="0.1.0" type="script"></info> <script src="Painel_MecC.luac" type="client" cache = "false" /> <script src="Painel_MecS.luac" type="server" cache = "false" /> <script src="Emprego_MecC.luac" type="client" cache = "false" /> <script src="Emprego_MecS.luac" type="server" cache = "false" /> <script src="Edite_S.lua" type="server" cache = "false" /> <script src="Edite_C.lua" type="client" cache = "false" /> <!-- IMAGENS --> <file src="Img/Reparando.png" cache = "false" /> <file src="Img/botao.png" /> <!-- FONT'S --> <file src="font/font1.ttf" /> <file src="font/font.ttf" /> <file src="font/OpenSans-Bold.ttf"/> <file src="font/fontNick.ttf" /> <!-- AUDIOS --> <file src="Sound/sound.mp3" cache = "false" /> <!-- TXD --> <file src="Txd/Furadeira.txd" cache = "false" /> <file src="Txd/Furadeira.dff" cache = "false" /> </meta>
  4. Bom eu baixei um script só que ele não quer iniciar simplesmente ele não inicia tentei iniciar pelo F8 e deu essa mensagem start: Resource '[DNL]Mecanico' start was requested (Not starting resource [DNL]Mecanico as server has come back from the future) Se for preciso do código só pedir
  5. Como eu poderia ta declarando ?
  6. C0DE

    Chat

    Faltou uma coisa ele não cria um blip no mapa eu queria tipo que criasse um blip no mapa com coração
  7. function playerbateu (loss) if (weapon and getElementModel(source) local thePlayer = getVehicleOccupant(source) cancelEvent() end end addEventHandler("onClientVehicleDamage", root, playerbateu)
  8. C0DE

    Algemar

    ------------------------------------------------ ------ Sistema de Policia ------ ------ By:#ROBSON ------ ------------------------------------------------ ------ Colaboração: ------ ------ #DR.VOODKA ------ ------ [B]lack ------ ------ #[S]wag ------ ------ New Age ------ ------ DNL291 ------ ------------------------------------------------ function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function revistar_jogador ( thePlayer, comando, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policia") ) then -- Acl Pra Quem Pode Usar o Comando local player_a_ser_revistado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_revistado ) local nick_do_policial = getPlayerName ( thePlayer ) local estrelas_de_procurado = getPlayerWantedLevel ( player_a_ser_revistado ) local policiax, policiay, policiaz = getElementPosition ( thePlayer ) -- Encontrar posição do policial local revistadox, revistadoy, revistadoz = getElementPosition ( player_a_ser_revistado ) -- Encontrar posição de quem sera revistado local dist = getDistanceBetweenPoints3D ( policiax, policiay, policiaz, revistadox, revistadoy, revistadoz ) -- Calcular a distancia entre os dois elementos if ( dist > 335 ) then -- se a distancia for 335 executara a função a seguir outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Chegue Mais Perto Do Jogador Pra Executar Este Comando!", thePlayer, 255, 255, 255, true) -- Chat Box elseif ( dist < 334 )then -- Caso ao contrario a distancia for 334 executara a função a seguir setPedAnimation( thePlayer, "POLICE", "plc_drgbst_01", 3100, true, false, false, false) outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1O #ff0000Policial #ffffff"..nick_do_policial.." #c1c1c1esta #ff0000Revistando #c1c1c1o #ff0000Suspeito "..nick_do_jogador.."", root, 255, 255, 255, true) -- Chat Box setTimer ( function() outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Nivel de #ff0000Procurado #c1c1c1do #ff0000Suspeito#c1c1c1:"..estrelas_de_procurado.."", thePlayer, 255, 255, 255, true) -- Nivel de procurado do jogador end, 3390, 1 ) triggerClientEvent(thePlayer, "doShowDXProgressBar", thePlayer) -- Chamar evento do client end else outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Você nao tem permissao a este comando!", thePlayer, 255, 255, 255, true) -- Se voce nao for da acl voce nao tera permissao a este comando end end end end addCommandHandler ( "revistar", revistar_jogador ) function algemar_jogador ( thePlayer, _, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policia") ) then -- Acl Pra Quem Pode Usar o Comando local player_a_ser_algemado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_algemado ) local nick_do_policial = getPlayerName ( thePlayer ) setElementData(player_a_ser_algemado,"algemado", nick_do_jogador) -- Elemento Data setPedAnimation( player_a_ser_algemado, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) -- Animação de algemar setElementFrozen( player_a_ser_algemado, true ) -- Freezar jogador toggleControl(player_a_ser_algemado, "fire", false) -- retirar função de atirar outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1O #ffffff"..nick_do_jogador.." #c1c1c1Foi #ff0000Algemado #c1c1c1Pelo #ff0000Policial "..nick_do_policial.."", root, 255, 255, 255, true) -- Chat Box outputChatBox("#000000[#ff0000POLICIA#000000] #ff0000Voce #c1c1c1Foi #ff0000Algemado#c1c1c1! ", player_a_ser_algemado, 255, 255, 255, true) -- Chat Box end else outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Você nao tem permissao a este comando!", thePlayer, 255, 255, 255, true) -- Se voce nao for da acl nao tera permissao a este comando end end end addCommandHandler("algemar", algemar_jogador) function algemar_jogador ( thePlayer, _, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policia") ) then local player_a_ser_desalgemado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_desalgemado ) local nick_do_policial = getPlayerName ( thePlayer ) if getElementData (player_a_ser_desalgemado, "algemado") then -- vai verificar se o jogador estiver com os algemas setPedAnimation( player_a_ser_desalgemado ) -- desativara animaçao setElementFrozen( player_a_ser_desalgemado, false ) -- desativara o freeze toggleControl(player_a_ser_desalgemado, "fire", true ) -- ativara a função de atirar outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1O #ffffff"..nick_do_jogador.." #c1c1c1Foi #ff0000Desalgemado #c1c1c1Pelo #ff0000Policial "..nick_do_policial.."", root, 255, 255, 255, true) -- Chat Box outputChatBox("#000000[#ff0000POLICIA#000000] #ff0000Voce #c1c1c1Foi #ff0000Desalgemado#c1c1c1! ", player_a_ser_desalgemado, 255, 255, 255, true) -- Chat Box removeElementData ( player_a_ser_desalgemado, "algemado" ) -- remover algemar else outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1O #FF0000Suspeito #c1c1c1Nao #c1c1c1Foi #ff0000Algemado #c1c1c1Para Executar Este Comando! ",thePlayer, 255, 255, 255, true) -- chat box se o jogador nao estiver algemado end else outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Você nao tem permissao a este comando!", thePlayer, 255, 255, 255, true) -- Acl Pra Quem Pode Usar o Comando end end end end addCommandHandler("desalgemar", algemar_jogador)
  9. C0DE

    Algemar

    Como eu poderia fazer isso ?
  10. Bom eu peguei um script de /algemar na internet só que o pessoal esta reclamando que os policiais estão algemando de longe então eu pensei em criar um script de algemar com cassetete alguém poderia me falar como eu posso fazer isso?
  11. C0DE

    Scripter

    Estou a procura de um scripter para meu servidor de MTA quem estiver interessado me adiciona no discord ou entre no meu servidor ------------------------------------------------------------ informações discord: ------------------------------------------------------------ Discord: QS .sXe Bypass Capivara.dll#5472 Discord ------------------------------------------------------------ Informações servidor: ------------------------------------------------------------ Servidor de RP/RPG Brasileiro Apenas 4 Staff Não foi aberto ainda por falta de script ------------------------------------------------------------
  12. Bom eu baixei um mod de cinto de segurança que quando a pessoa não colocar a pessoa poderia perder 10 de Hp mais quando ela não ta com cinto de segurança se alguém bater no carro tipo soco e tiro a pessoa perde Hp e eu não queria isso código abaixo MensagemSaiuVeiculoComCinto = "Você saiu do veiculo, e seu cinto foi retirado" MensagemRetirarCinto = "Você retirou seu cinto com sucesso ! Cuidado!!" MensagemColocarCinto = "Cinto colocado, agora já pode dirigir com segurança!" MensagemBaterSemCinto = "Você bateu e estava sem cinto, então tomou dano ! coloque o cinto usando o comando /" MensagemEntrouVeic = "Aperte a tecla X para colocar o cinto e garantir sua segurança" MensagemSairComCinto = "Retire o cinto pressionando a tecla X Para poder sair do veiculo." function bateusemcinto (loss) local thePlayer = getVehicleOccupant(source) if(thePlayer) then if not getElementData ( thePlayer, "Cinto", true ) then setElementHealth ( thePlayer, getElementHealth(thePlayer) - 10 ) -- Vida perdida ao bater sem cinto exports.Scripts_Dxmessages:outputDx(thePlayer, MensagemBaterSemCinto ..Comando, "info") else --exports.Scripts_Dxmessages:outputDx(thePlayer, "Você bateu porem estava com cinto e não levou dano! ", "info") end end end addEventHandler("onVehicleDamage", getRootElement(), bateusemcinto) function colocarcinto(source) if ( isPlayerInVehicle ( source ) ) then if not getElementData ( source, "Cinto", true ) then setElementData (source, "Cinto", true ) exports.Scripts_Dxmessages:outputDx(source, MensagemColocarCinto , "success") else setElementData (source, "Cinto", false ) exports.Scripts_Dxmessages:outputDx(source, MensagemRetirarCinto , "success") end else exports.Scripts_Dxmessages:outputDx(source, "Entre em um carro para colocar ou retirar o cinto!" , "error") end end function restart() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "X" , "down", colocarcinto) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), restart) function entrar() bindKey(player, "X" , "down", colocarcinto) end addEventHandler("onPlayerJoin", getRootElement(), entrar) function fechar(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player,"X", "down", colocarcinto) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), fechar) function entrouv (thePlayer, seat, jacked) exports.Scripts_Dxmessages:outputDx(thePlayer, MensagemEntrouVeic , "info") end addEventHandler ( "onVehicleEnter", getRootElement(), entrouv ) function saiuv (thePlayer, seat, jacked) if getElementData ( thePlayer, "Cinto", true ) then cancelEvent() exports.Scripts_Dxmessages:outputDx(thePlayer, MensagemSairComCinto , "error") end end addEventHandler ( "onVehicleStartExit", getRootElement(), saiuv )
  13. Bom eu tenho um script que baixei de chats Para RP só que o chatlocal e no U e eu queria substituir ele e colocar no t so que quando eu vou mandar um comando exemplo /admin ele não vai ele simplesmente aparece no chat /admin print abaixo bom também percebi que quando vai no F8 e digita say "mensagem" fala no chat normal - Print1 - - Print2 - chat_range=70 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"t","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"t","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("᠉ #00ff00 ChatLocal - #ffffff"..nick.."#00ff00 - #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat) function MensagemTwitter(source, cmd, ...) local MessagemT = table.concat ( { ... }, " " ) local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do outputChatBox("᠉ #00BFFFTwitter - #ffffff"..name.."#00BFFF - #FFFFFF"..MessagemT,v, 255, 255, 255, true) end end addCommandHandler("twitter", MensagemTwitter) function Mensagemfrp(source, cmd, ...) local Messagemr = table.concat ( { ... }, " " ) local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do outputChatBox("᠉ #87CEFAFora do RP - /frp - #ffffff"..name.."#00BFFF - #FFFFFF"..Messagemr,v, 255, 255, 255, true) end end addCommandHandler("frp", Mensagemfrp) function Mensagemrp(source, cmd, ...) local Messagemp = table.concat ( { ... }, " " ) local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do outputChatBox("᠉ #1E90FFDentro RP - /rp - #ffffff"..name.."#00BFFF - #FFFFFF"..Messagemp,v, 255, 255, 255, true) end end addCommandHandler("rp", Mensagemrp) addCommandHandler( "deepweb", function ( source, cmd, ... ) local message2 = #{...} > 0 and table.concat({...}," ") or nil if message2 then for _, p in ipairs (getElementsByType("player")) do if hasObjectPermissionTo(p, "command.mute", true) then outputChatBox("᠉ #696969 DeepWeb - #ffffff"..getPlayerName(source).."#696969 - #696969"..message2, p, 255, 255, 255, true) else outputChatBox("᠉ #696969 DeepWeb - #696969"..message2, p, 255, 255, 255, true) end end else end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "y", "down", "chatbox", "twitter") end ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"y", "down", "chatbox", "twitter") end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "i", "down", "chatbox", "frp") end ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"i", "down", "chatbox", "frp") end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "o", "down", "chatbox", "rp") end ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"o", "down", "chatbox", "rp") end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "u", "down", "chatbox", "deepweb") end ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"u", "down", "chatbox", "deepweb") end end )
  14. C0DE

    Chat

    Eu queria criar um chat para fazer chamadas exemplo /190 mensagem só que eu queria apenas as pessoas que tiverem na ACL Policial poder visualizar não preciso do código já feito só me mandar o link da wiki que eu aprendo
  15. Codigo do scripter Banco cVazern.lua local dxfont0_fonte = dxCreateFont("font/fonte.ttf", 11) local dxfont1_fonte = dxCreateFont("font/fonte.ttf", 13) atmTxd = engineLoadTXD("models/atm/kmb_atmx.txd") engineImportTXD(atmTxd, 2942) bankTxd = engineLoadTXD("models/bank/lanblokd.txd") engineImportTXD(bankTxd, 4005) local bankBot = createPed(150, 359.71246, 173.56975, 1008.38281, -90) local atm1 = createObject(2942, 359.86437, 188.99635, 1008.04281) local atm2 = createObject(2942, 360.86437, 188.99635, 1008.04281) local atm3 = createObject(2942, 361.86437, 188.99635, 1008.04281) local atm4 = createObject(2942, 1928.58215, -1768.56689, 13.14688, 0, 0, 90) local atm5 = createObject(2942, 1815.18152, -1557.53162, 13.08579, 0, 0, 70) local atm6 = createObject(2942, 1682.24341, -1272.46252, 14.41477, 0, 0, 0) local atm7 = createObject(2942, 1051.96143, -1131.20642, 23.42813, 0, 0, 0) local atm8 = createObject(2942, 537.36407, -1740.75659, 11.87771, 0, 0, 180) setElementInterior(atm1, 3) setElementDimension(atm1, 2) setElementInterior(atm2, 3) setElementDimension(atm2, 2) setElementInterior(atm3, 3) setElementDimension(atm3, 2) setElementInterior(bankBot, 3) setElementDimension(bankBot, 2) setElementFrozen(bankBot, true) 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 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 function dxDrawLinedRectangle( x, y, width, height, color, _width, postGUI ) _width = _width or 1 dxDrawLine ( x, y, x+width, y, color, _width, postGUI ) -- Top dxDrawLine ( x, y, x, y+height, color, _width, postGUI ) -- Left dxDrawLine ( x, y+height, x+width, y+height, color, _width, postGUI ) -- Bottom return dxDrawLine ( x+width, y, x+width, y+height, color, _width, postGUI ) -- Right end local szx,szy = guiGetScreenSize() local tx, ty, tz = 1411.80339, -1699.87390, 13.53949 local sz = tz-2.5 local marker = createMarker (tx, ty, sz, "cylinder", 1, 241, 155, 0, 0) local screenW, screenH = guiGetScreenSize() local resW, resH = 1360,768 local x, y = (screenW/resW), (screenH/resH) local l_0_1 = false local l_0_2, l_0_3 = guiGetScreenSize() local l_0_4 = dxCreateScreenSource(l_0_2, l_0_3) grid = Grid(x*497, y*400, x*325, y*162) colum = grid:addColumn("Jogadores", x*200) grid:setVisible(false) function playersGrid() grid:clear() for i, player in pairs(getElementsByType("player")) do if (player ~= localPlayer) then grid:addItem(colum, getPlayerName(player):gsub("#%x%x%x%x%x%x", "")) end end end addEventHandler("onClientPlayerQuit", root, playersGrid) addEventHandler("onClientPlayerJoin", root, playersGrid) addEventHandler("onClientResourceStart", resourceRoot, playersGrid) addEventHandler("onClientPlayerChangeNick", root, playersGrid) addEventHandler("onClientRender", root, function() if l_0_1 then dxUpdateScreenSource(l_0_4) dxDrawImage(0, 0, l_0_2, l_0_3, l_0_4) end end ) addEventHandler ( "onClientRender", root, function ( ) vx, vy, vz = getElementPosition(marker) scX, scY = getScreenFromWorldPosition(vx, vy, vz+3.5) cx,cy,cz,clx,cly,clz,crz,cfov = getCameraMatrix() dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz+3.5) if scX then largura, altura = 626, 350 Tx = scX-(5000/dist)*szx/626/largura*cfov Ty = scY-(100/dist)*szy/350/altura*cfov Tw = (5000/dist)*szx/400/largura*cfov Th = (5000/dist)*szy/400/altura*cfov if dist < 80.0 then if (isLineOfSightClear(cx, cy, cz, vx, vy, vz+1.5, true, false, false)) then if not isElementWithinMarker(localPlayer, marker) then --dxDrawText("$", Tx, Ty, Tw, Th + 40, tocolor(255, 255, 255, math.abs(math.sin(getTickCount()/700))*200), 1.00, dxfont1_fonte, "left", "top", false, false, true, true, false) --dxDrawText("Loja de #f19b00vida #ffffffe #f19b00colete", Tx, Ty + 120, Tw, Th + 40, tocolor(255, 255, 255, math.abs(math.sin(getTickCount()/700))*200), 1.00, dxfont2_fonte, "left", "top", false, false, true, true, false) dxDrawImage ( Tx, Ty, Tw, Th, "gfx/joinIcon.png",0,0,0,tocolor(255,255,255,255)) end end end end end) function cancelPedDamage(attacker) cancelEvent() end addEventHandler("onClientPedDamage", bankBot, cancelPedDamage) function caixaUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768, isCursorOnElement(x*464, y*366, x*93, y*95) and "gfx/ui/t_button2.png" or "gfx/ui/t_button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768, isCursorOnElement(x*625, y*366, x*93, y*95) and "gfx/ui/d_button2.png" or "gfx/ui/d_button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768, isCursorOnElement(x*778, y*366, x*93, y*95) and "gfx/ui/r_button2.png" or "gfx/ui/r_button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function acessingUI() exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function depositUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bgd.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*564, x*540, y*56, isCursorOnElement(x*502, y*564, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) createEditBox("2", 0.379, 0.443, 0.22, 0.06, true, "", false, 7, "arial", false, 1, {0, 0, 0, 127 }, true, { 0, 0, 0, 55 }, 1, true, 60, true, "Digite o valor", { 0, 0, 0, 127 }, true, 1, "arial", true, true, {0, 0, 0}, false) dxDrawText(" Cancelar", x*619, y*580, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*480, x*540, y*56, isCursorOnElement(x*502, y*480, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) dxDrawText(" Depositar", x*619, y*497, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function sacUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bgr.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*564, x*540, y*56, isCursorOnElement(x*502, y*564, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) createEditBox("3", 0.379, 0.443, 0.22, 0.06, true, "", false, 7, "arial", false, 1, {0, 0, 0, 127 }, true, { 0, 0, 0, 55 }, 1, true, 60, true, "Digite o valor", { 0, 0, 0, 127 }, true, 1, "arial", true, true, {0, 0, 0}, false) dxDrawText(" Cancelar", x*619, y*580, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*480, x*540, y*56, isCursorOnElement(x*502, y*480, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) dxDrawText(" Retirar", x*619, y*497, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function transUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bgt.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*564, x*540, y*56, isCursorOnElement(x*502, y*564, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) createEditBox("1", 0.379, 0.443, 0.22, 0.06, true, "", false, 7, "arial", false, 1, {0, 0, 0, 127 }, true, { 0, 0, 0, 55 }, 1, true, 60, true, "Digite o valor", { 0, 0, 0, 127 }, true, 1, "arial", true, true, {0, 0, 0}, false) dxDrawText("Transferir", x*619, y*580, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function render() local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, worldx, worldy, worldz ) local tx, ty, tz = getElementPosition(localPlayer) local rx, ry, rz = getElementPosition(atm1) local rx2, ry2, rz2 = getElementPosition(atm2) local rx3, ry3, rz3 = getElementPosition(atm3) local rx4, ry4, rz4 = getElementPosition(atm4) local rx5, ry5, rz5 = getElementPosition(atm5) local rx6, ry6, rz6 = getElementPosition(atm6) local rx7, ry7, rz7 = getElementPosition(atm7) local rx8, ry8, rz8 = getElementPosition(atm8) local distancia = getDistanceBetweenPoints3D(tx, ty, tz, rx, ry, rz) local distancia2 = getDistanceBetweenPoints3D(tx, ty, tz, rx2, ry2, rz2) local distancia3 = getDistanceBetweenPoints3D(tx, ty, tz, rx3, ry3, rz3) local distancia4 = getDistanceBetweenPoints3D(tx, ty, tz, rx4, ry4, rz4) local distancia5 = getDistanceBetweenPoints3D(tx, ty, tz, rx5, ry5, rz5) local distancia6 = getDistanceBetweenPoints3D(tx, ty, tz, rx6, ry6, rz6) local distancia7 = getDistanceBetweenPoints3D(tx, ty, tz, rx7, ry7, rz7) local distancia8 = getDistanceBetweenPoints3D(tx, ty, tz, rx8, ry8, rz8) if not isEventHandlerAdded("onClientRender", root, caixaUI) then if (distancia <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm1 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia2 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if hit then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if elementHit == atm2 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia3 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm3 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia4 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if hit then if elementHit == atm4 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia5 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if hit then if elementHit == atm5 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia6 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if hit then if elementHit == atm6 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia7 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm7 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia8 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm8 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end end end addEventHandler("onClientClick", root, render) local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local maxrange = 20 function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font, ...) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getCameraMatrix() local distance = distance or 20 local height = height or 1 local value1 = 2 local value2 = 2 if (isLineOfSightClear(x, y, z+2, x2, y2, z2, ...)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+value1, sy+value2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center", false, false, false, true, false) end end end end function wolrdTexts() dxDrawTextOnElement(bankBot,"Atendente #1066e7(BOT)",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm1,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm2,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm3,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm4,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm5,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm6,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm7,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm8,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") end addEventHandler("onClientRender",rootElement, wolrdTexts) function closePanel(_,state) if isEventHandlerAdded("onClientRender", root, caixaUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) showChat(true) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) end end end if isEventHandlerAdded("onClientRender", root, transUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(true) playSound("sfx/hit.mp3", false) grid:setVisible(false) removeEventHandler("onClientRender", root, transUI) changeVisibility("1", false) end end end if isEventHandlerAdded("onClientRender", root, depositUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) showChat(true) playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) changeVisibility("2", false) removeEventHandler("onClientRender", root, depositUI) end end end if isEventHandlerAdded("onClientRender", root, sacUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(true) playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, sacUI) changeVisibility("3", false) end end end if isEventHandlerAdded("onClientRender", root, sacUI) then if state == "down" then if isCursorOnElement(x*502, y*564, x*320, y*56) then playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, sacUI) addEventHandler("onClientRender", root, caixaUI) changeVisibility("3", false) end end end if isEventHandlerAdded("onClientRender", root, depositUI) then if state == "down" then if isCursorOnElement(x*502, y*564, x*320, y*56) then playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, depositUI) addEventHandler("onClientRender", root, caixaUI) changeVisibility("2", false) end end end end addEventHandler("onClientClick", root, closePanel) function uiButtons(_,state) if isEventHandlerAdded("onClientRender", root, caixaUI) then if state == "down" then if not isEventHandlerAdded("onClientRender", root, transUI) or isEventHandlerAdded("onClientRender", root, depositUI) or isEventHandlerAdded("onClientRender", root, sacUI) then if isCursorOnElement(x*464, y*366, x*93, y*95) then -- trans playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) addEventHandler("onClientRender", root, transUI) grid:setVisible(true) changeVisibility("1", true) end end if not isEventHandlerAdded("onClientRender", root, depositUI) or isEventHandlerAdded("onClientRender", root, sacUI) or isEventHandlerAdded("onClientRender", root, transUI) then if isCursorOnElement(x*625, y*366, x*93, y*95) then -- deposit playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) addEventHandler("onClientRender", root, depositUI) changeVisibility("2", true) end end if not isEventHandlerAdded("onClientRender", root, sacUI) or isEventHandlerAdded("onClientRender", root, depositUI) or isEventHandlerAdded("onClientRender", root, transUI) then if isCursorOnElement(x*778, y*366, x*93, y*95) then -- sac playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) addEventHandler("onClientRender", root, sacUI) changeVisibility("3", true) end end end end end addEventHandler("onClientClick", root, uiButtons) function depositButton(_,state) if isEventHandlerAdded("onClientRender", root, depositUI) then if state == "down" then if isCursorOnElement(x*502, y*480, x*320, y*56) then if getText("2") then if tonumber(getText("2")) < getPlayerMoney(localPlayer) or tonumber(getText("2")) == getPlayerMoney(localPlayer) then playSound("sfx/hit.mp3", false) addEventHandler("onClientRender", root, caixaUI) changeVisibility("2", false) removeEventHandler("onClientRender", root, depositUI) setElementData(localPlayer, "Bank:Royal", getElementData(localPlayer, "Bank:Royal") + tonumber(getText("2"))) setElementData(localPlayer, "Notification", false) triggerServerEvent("onDepositMoney", localPlayer, localPlayer, tonumber(getText("2"))) setElementData(localPlayer, "Notification:S", "Depósito de R$ "..tonumber(getText("2")).." feito!") setTimer(setElementData, 7000, 1, localPlayer, "Notification:S", false) else playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Você não possui este valor!") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end end end end end end addEventHandler("onClientClick", root, depositButton) function saqueButton(_,state) if isEventHandlerAdded("onClientRender", root, sacUI) then if state == "down" then if isCursorOnElement(x*502, y*480, x*320, y*56) then if getText("3") then if tonumber(getText("3")) == getElementData(localPlayer, "Bank:Royal") or tonumber(getText("3")) < getElementData(localPlayer, "Bank:Royal") then playSound("sfx/hit.mp3", false) addEventHandler("onClientRender", root, caixaUI) removeEventHandler("onClientRender", root, sacUI) changeVisibility("3", false) setElementData(localPlayer, "Bank:Royal", getElementData(localPlayer, "Bank:Royal") - tonumber(getText("3"))) setElementData(localPlayer, "Notification", false) triggerServerEvent("saqueBankMoney", localPlayer, localPlayer, tonumber(getText("3"))) setElementData(localPlayer, "Notification:S", "Retirada de R$ "..tonumber(getText("3")).." feito!") setTimer(setElementData, 7000, 1, localPlayer, "Notification:S", false) else playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Você não possui este valor!") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end end end end end end addEventHandler("onClientClick", root, saqueButton) function transButton(_,state) local gridItem = grid:getSelectedItem() local item = grid:getItemDetails(colum, gridItem) if isEventHandlerAdded("onClientRender", root, transUI) then if state == "down" then if isCursorOnElement(x*502, y*564, x*320, y*56) then -- if getPlayerFromName(item) then if getText("1") then if tonumber(getText("1")) == getElementData(localPlayer, "Bank:Royal") or tonumber(getText("1")) < getElementData(localPlayer, "Bank:Royal") then playSound("sfx/hit.mp3", false) addEventHandler("onClientRender", root, caixaUI) grid:setVisible(false) changeVisibility("1", false) removeEventHandler("onClientRender", root, transUI) setElementData(localPlayer, "Bank:Royal", getElementData(localPlayer, "Bank:Royal") - tonumber(getText("1"))) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", "Transferência de R$ "..tonumber(getText("1"))..", para "..item.." feito!") setTimer(setElementData, 7000, 1, localPlayer, "Notification:S", false) triggerServerEvent("transMoney", localPlayer, tonumber(getText("1")), item) else playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Você não possui este valor!") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end end --[[else setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Jogador não encontrado! Verifique se ocorreu mudança no nome.") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end]] end end end end addEventHandler("onClientClick", root, transButton) function isCursorOnElement( posX, posY, width, height ) if isCursorShowing( ) then local mouseX, mouseY = getCursorPosition( ) local clientW, clientH = guiGetScreenSize( ) local mouseX, mouseY = mouseX * clientW, mouseY * clientH if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then return true end end return false end sVazern.lua --[[ ################################################ # # # SCRIPT PRODUZIDO POR: # # FACEBOOK.COM/VAZERNMTA # # # # # ################################################ ]] -- ########### VARIÁVEIS ########### local markerJoin = createMarker(1411.80339, -1699.87390, 13.53949, "cylinder", 1, 16, 102, 231, 0) local inutil2 = createMarker(1411.80339, -1699.87390, 12.23949, "cylinder", 1, 16, 102, 231, 50) local exitLS1 = createMarker(390.45071, 173.79091, 1008.38281, "cylinder", 1, 16, 102, 231, 0) local inutil = createMarker(390.45071, 173.79091, 1007.18281, "cylinder", 1, 16, 102, 231, 50) createBlip(1411.80339, -1699.87390, 13.53949, 52) createBlip(1928.58215, -1768.56689, 13.14688, 52) createBlip(1815.18152, -1557.53162, 13.08579, 52) createBlip(1682.24341, -1272.46252, 14.41477, 52) createBlip(1051.96143, -1131.20642, 23.42813, 52) createBlip(537.36407, -1740.75659, 11.87771, 52) -- ########### VARIÁVEIS ########### setElementInterior(exitLS1, 3) setElementDimension(exitLS1, 2) setElementInterior(inutil, 3) setElementDimension(inutil, 2) function saveData4(conta) if conta then local source = getAccountPlayer(conta) if isElement(source) then local bank = getElementData(source,"Bank:Royal") or 0 setAccountData(conta, "Bank:Royal",tonumber(bank)) end end end function loadData4(conta) if not (isGuestAccount (conta)) then if (conta) then local source = getAccountPlayer(conta) if isElement(source) then local bank = getAccountData(conta,"Bank:Royal") if type(bank) == "boolean" or "Bank:Royal" == nil then bank = 0 end setElementData(source, "Bank:Royal", tonumber(bank)) end end end end addEventHandler("onPlayerLogin", root, function(_, acc) setTimer(loadData4,1000,1,acc) end ) function saveOnStartScript(res) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then loadData4(acc) end end end end addEventHandler("onResourceStart", getRootElement(), saveOnStartScript) function saveOnStopScript(res) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then saveData4(acc) end end end end addEventHandler("onResourceStop", getRootElement(), saveOnStopScript) function saveOnQuit(quitType) local acc = getPlayerAccount(source) if not (isGuestAccount(acc)) then if acc then saveData4(acc) end end end addEventHandler("onPlayerQuit", getRootElement(), saveOnQuit) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function fadeCameraDelayed(player) if (isElement(player)) then fadeCamera(player, true, 0.5) end end function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end function entrarLS1(thePlayer) setElementDimension(thePlayer, 2) fadeCamera(thePlayer, false, 1.0, 0, 0, 0) setTimer(fadeCameraDelayed, 1000, 1, thePlayer) setTimer(function() setElementInterior(thePlayer, 3, 386.85941, 173.74263, 1008.38281) end, 1000, 1) end addEventHandler("onMarkerHit", markerJoin, entrarLS1) function sairLS1(thePlayer) if getElementDimension(thePlayer) == 2 then setElementDimension(thePlayer, 0) fadeCamera(thePlayer, false, 1.0, 0, 0, 0) setTimer(fadeCameraDelayed, 1000, 1, thePlayer) setTimer(function() setElementInterior(thePlayer, 0, 1414.01062, -1700.99475, 13.53949) end, 1000, 1) end end addEventHandler("onMarkerHit", exitLS1, sairLS1) function onDepositMoney(thePlayer, money) takePlayerMoney(thePlayer, money) end addEvent("onDepositMoney", true) addEventHandler("onDepositMoney", root, onDepositMoney) function saqueBankMoney(thePlayer, money) givePlayerMoney(thePlayer, money) end addEvent("saqueBankMoney", true) addEventHandler("saqueBankMoney", root, saqueBankMoney) function transMoney(money, item) if grid == "" then return end local bankPlayer = getPlayerFromPartialName(item) setElementData(bankPlayer, "Bank:Royal", getElementData(bankPlayer, "Bank:Royal") + money) end addEvent("transMoney", true) addEventHandler("transMoney", root, transMoney) Codigo do scripter Hud --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # Down by neverz # # # # ################################################ --]] local screenW, screenH = guiGetScreenSize ( ) local resW, resH = 1366, 768 local x, y = ( screenW/resW ), ( screenH/resH ) function AirNewSCR_Hud ( ) local Nivel = getElementData ( localPlayer, "Level" ) or 0 local Dinheiro_Mao = getPlayerMoney ( localPlayer ) local Dinheiro_Banco = getElementData ( localPlayer, "bankbalance" ) or 0 local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second if (hours >= 0 and hours < 10) then hours = "0"..time.hour end if (minutes >= 0 and minutes < 10) then minutes = "0"..time.minute end if (seconds >= 0 and seconds < 10) then seconds = "0"..time.second end dxDrawRectangle(x*1220, y*4, x*140, y*25, tocolor(0, 0, 0, 100), false) dxDrawRectangle(x*1076, y*4, x*140, y*25, tocolor(0, 0, 0, 100), false) dxDrawText("$"..Dinheiro_Mao.."", x*1220, y*4, x*1360, y*29, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false) dxDrawRectangle(x*1220, y*33, x*140, y*25, tocolor(0, 0, 0, 100), false) dxDrawText("$"..Dinheiro_Banco.."", x*1220, y*33, x*1360, y*58, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false) dxDrawLine(x*1220, y*58, x*1358, y*58, tocolor(255, 255, 255, 255), x*1, false) dxDrawLine(x*1220, y*29, x*1358, y*29, tocolor(255, 255, 255, 255), x*1, false) dxDrawLine(x*1076, y*29, x*1214, y*29, tocolor(255, 255, 255, 255), x*1, false) dxDrawRectangle(x*932, y*4, x*140, y*25, tocolor(0, 0, 0, 100), false) dxDrawText("Nivel: "..Nivel.."", x*932, y*4, x*1072, y*29, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false) dxDrawText(""..hours..":"..minutes..":"..seconds.." Horas", x*1076, y*4, x*1216, y*29, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false) dxDrawLine(x*932, y*29, x*1070, y*29, tocolor(255, 255, 255, 255), 1, false) dxDrawImage(x*1232, y*7, x*19, y*19, "Arquivos/Cifrao.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1230, y*37, x*23, y*17, "Arquivos/CartaoCredito.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler ( "onClientRender", getRootElement(), AirNewSCR_Hud ) function toggleRadar() if isVisible then addEventHandler("onClientRender", root, AirNewSCR_Hud ) else removeEventHandler("onClientRender", root, AirNewSCR_Hud ) end isVisible = not isVisible end bindKey ("F11", "down", toggleRadar) local hudTable = { "ammo", "armour", "clock", "health", "money", "weapon", "wanted", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end ) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end )
  16. Bom eu adicionei uma hud para um servidor de RPG e nesse hud tem dinheiro na mão e dinheiro no banco adicionei um mod de caixa de banco só que quando eu coloquei dinheiro no banco não apareceu na hud então eu pensei e claro que eu tenho que configurar a hud com o scripter mais eu não consegui achar nem se que um fórum para isso alguém poderia me ajudar ?
  17. Bom eu tava fazendo uma base de códigos de chat com isso eu fiz o chat local que substituiria o chat normal só que ele ta bugado ele esta mandando 2 mensagens ao mesmo tempo o chat local e o chat normal ai eu pensei tenho que desativar o chat normal só que não estou conseguindo
  18. Quando tá com a resource ativado e alguma function que eu esqueci de colocar
  19. Antes de criar este tópico eu mexia com servidores de MTA só pra esclarecer mais fico recebendo notificações aí eu vi você perguntando se era eu então resolvir responder
  20. Não copiei de nenhum tópico
  21. Não sou ele pois parei de mexer com MTA a mt tempo
  22. Tentei de tudo mais ainda esta bugando quando eu tento da qualquer comando ele não vai chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"t","down","chatbox","Say") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"t","down","chatbox","Say") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,msg) local px,py,pz=getElementPosition(player) local nick=getPlayerName(player) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("#BEBEBELocal* #FFFAFA"..nick..": #DCDCDC"..msg,v,30,30,200,true) end end end addCommandHandler("t",onChat)
  23. Eu tentei usar setElementHealth so que não funcionou script abaixo function vehicleHPVerify (loss) local thePlayer = getVehicleController (source) if (getElementHealth (source) < 300) then setVehicleDamageProof (source, true) setVehicleEngineState (source, false) setElementHealth( vehicle, 300 ) if (thePlayer) then outputChatBox ("Seu veículo quebrou o motor. Chame um mecânico.", thePlayer) end end end addEventHandler ("onVehicleDamage", root, vehicleHPVerify) function vehicleEngineDisable (thePlayer, seat, jacked) if (getElementHealth (source) < 300) then if (seat == 0) then setVehicleDamageProof (source, true) setVehicleEngineState (source, false) setElementHealth( vehicle, 300 ) end else setVehicleDamageProof (source, false) end end addEventHandler ("onVehicleEnter", root, vehicleEngineDisable) function antiVehicleEngine (cmd) if (cmd == "motor") then local theVehicle = getPlayerOccupiedVehicle (source) if (theVehicle) then if (getPedOccupiedVehicleSeat (source) == 0) then if (getElementHealth (theVehicle) < 300) then cancelEvent() outputChatBox ("O motor falhou.", source) setVehicleEngineState (theVehicle, false) setElementHealth( vehicle, 300 ) end end end end end addEventHandler ("onPlayerCommand", root, antiVehicleEngine)
×
×
  • Create New...