Jump to content

Search the Community

Showing results for tags 'help'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. Gostaria de substituir o som de ignição do motor, já fiz um script em que o player consegue ligar de desligar o motor do veículo apertando determinado botão, mas gostaria de colocar um som para que todos aqueles que estiverem perto do carro do player consigam escutar o som da partida. Segue o link de download do som abaixo: https://drive.google.com/open?id=1ylXf3-E-Gw2wxAeIczvBMdLPduDMvh0p Não sei qual código utilizar, se puderem me ajudar agradeço!
  2. meu mta funciona tudo sertinho mas quandro entro em algum servidor nao aparece nada para escrever exemplo: para me cadastrar em um servidor preciso botar meu nome e senha mas quando aperto e escrevo nao aparece nada escrito mas contabilisa dai se eu conseguir fazer o registro eu voupara o jogo e nao da pra entender nada pois em vez de palavras fica tudo em branco
  3. Estou tentando criar uma função que faça com que a porta do veículo em que o Player estava seja fechada assim que ele deixar o carro. Não sei se isso é possível, mas tentei da seguinte maneira, porém sem sucesso: local theVehicle = getPedOccupiedVehicle ( source ) function SairVeiculo (theVehicle, leftSeat, jackerPlayer) if leftSeat == 0 and not jackerPlayer then setVehicleDoorOpenRatio ( theVehicle, 2, 0, 2500) setVehicleDoorOpenRatio ( theVehicle, 4, 0, 2500) end end addEventHandler("onPlayerVehicleExit", root, SairVeiculo) Se houver alguma maneira e puderem me ajudar, agradeço!
  4. Hello guys, I have a problem with my server and I couldn't solve it so far. I send my resources to the FTP server and when I open the console within the game and update to add the new resources, simply the error. Exemple: [2019-09-11 18:06:34] Could not copy 'mods\deathmatch\resources\[mods-server]\[Teste-Malas]\Blur\shaders/blurH.fx' to 'mods\deathmatch\resource-cache\http-client-files\Blur\shaders\blurH.fx' [2019-09-11 18:06:34] Could not copy 'mods\deathmatch\resources\[mods-server]\[Teste-Malas]\Blur\shaders/blurV.fx' to 'mods\deathmatch\resource-cache\http-client-files\Blur\shaders\blurV.fx' [2019-09-11 18:06:34] Could not copy 'mods\deathmatch\resources\[mods-server]\[Teste-Malas]\Blur\shaders/mta-helper.fx' to 'mods\deathmatch\resource-cache\http-client-files\Blur\shaders\mta-helper.fx' [2019-09-11 18:06:34] Could not copy 'mods\deathmatch\resources\[mods-server]\[Teste-Malas]\Blur\c_blur.Lua' to 'mods\deathmatch\resource-cache\http-client-files-no-client-cache\Blur\c_blur.Lua' [2019-09-11 18:06:34] Loading of resource 'Blur' failed Please... I need help and found no aswer on the internet... PS: Already tried reinstalling the MTA on the server and it didn't work
  5. Editei um script de Prender o jogador que baixei da internet, ele obtém o jogador através do getPlayerFromPartialName. Gostaria de obter o jogador pelo script de ID, assim como no FiveM, aquele ID que aparece na cabeça do Player. Segue o código do script do ID e a função onde gostaria de obter o player pelo ID: function Start_Id ( _, acc ) if eventName == "onPlayerLogin" then setElementData ( source, "ID", getAccountID(acc) or "N/A" ) outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffID: #00ff00( "..(getAccountID(acc) or "N/A") .." )", root, 255,255,255,true) elseif eventName == "onPlayerLogout" then removeElementData( source, "ID" ) outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffDeslogou.", root, 255,255,255,true) elseif eventName == "onResourceStart" then for _, player in pairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then setElementData( source, "ID", getAccountID(acc) or "N/A" ) end end end end addEventHandler("onResourceStart", resourceRoot, Start_Id) addEventHandler("onPlayerLogout", root, Start_Id) addEventHandler("onPlayerLogin", root, Start_Id) function getPlayerID(id) v = false for i, player in ipairs (getElementsByType("player")) do if getElementData(player, "ID") == id then v = player break end end return v end --============================================================================================================================-- --=============================-- ----------- ID PLAYER ------------ --=============================-- function getnick(player, command, id, ...) if(id) then local playerID = tonumber(id) if(playerID) then local Player2 = getPlayerID(playerID) if(Player2) then outputChatBox ( "#00ff00✘ #ffffffINFO #00ff00✘➺ #ffffff Nome do Jogador #00ff00" .. getPlayerName(Player2) .."", player, 255,255,255,true) else outputChatBox ( "#00ff00✘ #ffffffERRO #00ff00✘➺ #ffffff O Jogador(a) de ID: #00ff00( " .. id .. " ) #ffffffNão Foi Encontrado!", player, 255,255,255,true) end else outputChatBox ( "#00ff00✘ #ffffffERRO #00ff00✘➺ #ffffff ID: #00ff00( " .. id .. " ) #ffffffInválido!", player, 255,255,255,true) end else outputChatBox ( "#00ff00✘ #ffffffERRO #00ff00✘➺ #ffffffUse /id #00ff00[#ffffffID#00ff00]", player, 255,255,255,true) end end addCommandHandler("id", getnick) Função onde gostaria de obter o nome do player por ID: function colocanavtr (police, _, name) if hasObjectPermissionTo(police, "function.Prender") then local preso = getPlayerFromPartialName(name) -- Penso que tenha que alterar neste local. local px, py, pz = getElementPosition (police) local bx, by, bz = getElementPosition (preso) local dist = getDistanceBetweenPoints3D (px, py, pz, bx, by, bz) if not preso then return outputChatBox('#bebebe Jogador invalido.', police, 255, 255, 255, true) end if preso == police then return outputChatBox('#bebebe Você não pode prender a si mesmo.', police, 255, 255, 255, true) end if getPlayerWantedLevel(preso) == 0 then return outputChatBox('#bebebe Este jogador não está sendo procurado.', police, 255, 255, 255, true) end if getPedOccupiedVehicle(police) then return outputChatBox('#bebebe Você não pode prender de dentro da viatura.', police, 255, 255, 255, true) end if getPedOccupiedVehicle(preso) then return outputChatBox('#bebebe Você não pode prender um bandido enquanto ele estiver dentro de um veículo.', police, 255, 255, 255, true) end if dist >= 2 then return outputChatBox('#bebebe Você precisa chegar mais perto para prender.', police, 255, 255, 255, true) end setElementData (preso, 'navtr', true) addEventHandler('onPlayerCommand', preso, onCommand) local vtr = carros[police] setElementData (vtr, 'compreso', true) attachElements (preso, vtr, 0.2, -1.5, 0, 0,0,90) setElementFrozen (preso, true) toggleAllControls (preso, false) takeAllWeapons (preso) setPedAnimation (preso, 'ped','CAR_dead_LHS') vrx, vry, vrz = getElementRotation(vtr) setElementRotation(preso, vrx, vry, vrz+83) warpPedIntoVehicle (police, vtr) outputChatBox('#bebebeLeve o preso para a delegacia mais próxima #00ffff(sirenes azuis).', police, 255, 255, 255,true) end end addCommandHandler ('prender', colocanavtr) Se puderem me ajudar, agradeço!
  6. The problem is that I have a weak PC. I used timecyc to reduce the rendering range. And it looks beautiful and FPS +10. But I went to the MTA and noticed that there is no timecyc. I started reinstalling it, it did not help, reinstalling the client did not help. It turned out the problem is that in the new client update (MTA 1.5. 6) removed timecyc. After viewing YouTube, you need to take and install an older version of the client. I took this method, but on the server where I play do not miss with the old client. And so it became interesting to me, why was it removed? If possible, can you add it to the update of the next MTA client? Is there a way to somehow return it to the game / server? <P.S> I apologize for my clumsy English)
  7. Server-Side possui 2 arquivos. 1: factor = 0.03 function createVehicles(player) for i,v in ipairs(getElementsByType("vehicle")) do fuel = math.random(70,80) setElementData(v, "fuel", fuel) end end function processFuel(player) for i,v in ipairs(getElementsByType("vehicle")) do local fuel = getElementData(v, "fuel") or math.random(70,80) if (getVehicleEngineState(v) and fuel > 0 ) then fuel = fuel - factor end if (fuel <= 0.99) then fuel = 0 setVehicleEngineState(v, false) end setElementData(v, "fuel", fuel) end end createVehicles() setTimer(processFuel, 1000, 0) 2: local addingFuel = {} addEvent("onVehicleRefulling", true) function vehicleRefulling(v) if (getPlayerMoney(source) < 5) then outputChatBox("#000000[ #FF0000GASOLINA #000000] #ffffffVocê não tem dinheiro $10", source, 255, 255, 255, true) else setElementData(v, "fuel", getElementData(v, "fuel") + 1) takePlayerMoney(source, 5) end end addEventHandler("onVehicleRefulling", root, vehicleRefulling) addEvent("onVehicleRefullingFull", true) function vehicleRefullingf(v) gabas = 100 - getElementData(v, "fuel") if (getPlayerMoney(source) < tonumber(gabas*5)) then outputChatBox("#000000[ #FF0000GASOLINA #000000] #ffffffVocê não tem dinheiro $"..convertNumber (gabas*5).."", source, 255, 255, 255, true) else setElementData(v, "fuel", getElementData(v, "fuel")+gabas+1) takePlayerMoney(source, tonumber(gabas*5)) end end addEventHandler("onVehicleRefullingFull", root, vehicleRefullingf) 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 Client-Side: local sx,sy = guiGetScreenSize() local px,py = 1366,768 local x,y = (sx/px), (sy/py) function gas() local vehicle = getPedOccupiedVehicle( getLocalPlayer() ) local gasosa = math.floor(getElementData(vehicle,"fuel") or 11) if ( vehicle ) then dxDrawRectangle(x*1125 - 2, y*718 - 2, x*100 + 4, y*27 + 4, tocolor(0, 0, 0, 140), false) dxDrawRectangle(x*1125, y*718, x*100, y*27, tocolor(0, 0, 0, 30), false) if gasosa <= 100 then dxDrawRectangle(x*1125, y*718, x*100/100*gasosa, y*27, tocolor(243, 0, 0, 255), false) else dxDrawRectangle(x*1125, y*718, x*100, y*27, tocolor(243, 0, 0, 255), false) end end end addEventHandler("onClientRender", root, gas) Como posso fazer para que veículos que não possuam motor, como por exemplo a bike não apareça o indicador de Gasolina ? PS: O lado do server-side não foi eu quem fiz.
  8. SERVER: MarkerGuardar = createMarker (359.159, 207.26, 1007.383, "cylinder", 1.5, 255,255,255,50) setElementInterior(MarkerGuardar, 3) setElementDimension(MarkerGuardar, 1) function AbrirPainelGUI(player) triggerClientEvent(player,"showHide", root) end addEventHandler("onMarkerHit", MarkerGuardar, AbrirPainelGUI) CLIENT: GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(773, 341, 369, 442, "Guardar Armas", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) centerGUI(GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(785, 740, 134, 33, "Guardar", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(998, 740, 134, 33, "Fechar", false, GUIEditor.window[1]) GUIEditor.gridlist[1] = guiCreateGridList(781, 370, 351, 362, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Armas", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "Munição", 0.5) end ) function Abrir() if guiGetVisible(GUIEditor.window[1]) == true then guiSetVisible(GUIEditor.window[1],false) showCursor(false) guiGridListClear(GUIEditor.gridlist[1]) elseif guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1],true) showCursor(true) guiGridListClear(GUIEditor.gridlist[1]) triggerServerEvent("getDataFromServer",getLocalPlayer(),getLocalPlayer()) end end addEvent("showHide", true) addEventHandler("showHide", root , Abrir)
  9. iLoveMTASa

    Serial Problem

    Hello MTA Sa STAFF I Need Your Help I Have Problem In My Serial i want join in a servers when i want creat account it's saying you alreadly have account the problem that i don't have account yet so i can't play in the server i hope you change my server because the 90% of servers i can't play in it because the say you areadly have account my old serial : CAC8AC94A7799C062CA8F7FC131789A1
  10. This is in 1440x900 (in my resolution): This is in 1920x1080: I calculate the dx elements position with this: local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/1440, sy_/900 And i draw dx elements like this: dxDrawRectangle(sx / 2 + 290, sy / 2 +240,850,65,tocolor(0,0,0,200)) What wrong??? How can i fix this problem??
  11. This is a cinema Lua. Trying to learn new. How do I make editing necessary? sample directory MvbR{Í® %•h$Ñf ³P;RLÔš/_³+ğÆ°¤E¥E­Õ%¾+d"õğo² ËìHJÅ‚ˆĞ‰\c xµ[®Ö‘qET$N>¥¹MÚ"à(]òÇÇ\Ãø/s¥Aƒõ_{¨ú"öOæaºm'5Ù¸ÖHrW(È„ ÏÀQ1ƒ+‹ãIÅHI%™¨8(@ /‡ø4ÖŒrÒ·×?Vê)0ãñhsü£FjşõØEåˆi_]ꆿcßR(똶»LÀ`fìÊ댹R¥ú‡­ãbÇ4üÌù+8dF´´]ÌN’Æ2åµÑiªõ!é¿ÈU»5Q»äÿ¤N9‘şÖÚBÛA–Â,:H`L¹ }gË8îHm1ü‹ •ú8Çı:K½VöJ÷û.<HÅ€3*äRäÏÇ:Á(ŸŞOè/ê¬É>V^'á€Ì3‡ ë(YÀüm›_綼[êCiıδıôM\N¢î›v d)½%ƒ'üï¿Å©Ï]–Tşú;ڑǘíC¸ˆ‡—Åry¹D~ƒ £H‚İWşWÓ¹>ºßX0@¦†B#ÚÂr`ú;¼RÔQû°[ÆB\ëo90¹*læ°çD)x1cWÿ拤£Cá•Pe)8ê¢ëù4C+" ®¿‘îs’¬¸ÿ^8Wt9o“yK”H..ã<kââ*#Ö%T‘‹£§«?®µúÄ{vÿéË°ÀcY(dóu´¡UŒ©ªßÔdy'ÕÈ pvŞ^§XwŒ}ˆšC<k¼d !¾>ÜÚf¥}şpØ4tŠ­Aoò¨J /.ñÈ\á"ŸRÀá¶ñù!;ÌRI£3`´cóÔb F¾Wš´Ê²@zZµóaóÁ"ë¶Q™G–~¶o^#şğËı+Ac޾“ãsÛ":޲¦àÃkñà‚]C±) #üiب¸E„H¡UÌ6ãs±Î©ˆÊVz2…Ñ8ê?6û÷€¡R¤±lV[lšvk´¢– İbܨ ×vği¯y“ú)/œ–Öq[iÿĞΨ'*¬<CDÿ_Y¹ˆòn§ ²_6n9cmŞÜÒ¹ş‰Ä:HÒó¯Kæ—¤³¼ âm2+K¹<Ş \nn‚µ‹HÁ)Ù|³×f&:àÄê~U¸>WnNB};‹¬ÂPw°I­¥Œ?­DLóû£@Ø+Œÿ“ÌPNa¦6,sÅqŞñ]ìv×~s/²€<Ñ7~”BZä»6–2”EÈ:Íã’ÙÎCm¨ÇìŸI„‰ñ™†Q Y¢Ê_ğ ŒYƒ ¬]yŸí‘ğò@‚h0‘ùÈd'/ÕN‰b:§tHƒ˜#;â4ιÂçG‡í Ó`ßH6ö¯Ï¿Ùzú6‡rœßÑğÎzÍ¿ÿ—Ò:}Ä\s£~Œˆá]._W·ÄÓàìS¥U:ÏFw’5‹@<›¼ÍˆUaÅÖxÔ?‚>á(„å W °ÚNıP`îlëz4"Ö™ÛY_®Jÿõ¸kÔîÏkx Õ6¹—ÈUltê§G{§Ö¢øùïG§Ê• 4ud·û­°ò_í½¡ûؾB°É\7x¤ ÁQﺊ¨ğ¾-Ù‡ãà/(”%ÖÚû ”·ZĞ]{1–İdŸÉ妪8´…Kƒ;\ÄÈÓï÷IN{ØǸpéºd$æŞzŨÔ.Q'8Õà\ìşy-¶Ÿ’܆>¨hÉŞ9Eš.2z.G ÷Ÿ1êš÷ÆíÜ,õjM»äğyG­Xœ"Ø’ñt]G¯¶È¤h÷ú—H`¢šã‹ZcB»èY+Äú°ƒÚ f0MájWõñÃÛ!œS‘GƒbiÀ˜¶i ø9©Ì x ãQ4MùöşO/Bı9ieºY(Ùœ{¼?~¢ĞÖa|B:ÖÒ6Ë0-ìË+kyÍÙ¹¶¼ó“r"ë~İ2ã2.-öSjúğ>¿Ÿ~>Ⱥšô .qOLs‚ÄXœyÜyê¤j‘ #Usz_çc¥¹ß«A‰3‘lñ,ñK !l ƒ1zÔì¨.ì•Ş(7³Îjİ£¯uRŒ¬‹”=Ó6U¢…2µCÍà%òozs·ª= +Ìù”õ96$?ò`M²å7aÄ”ğJ÷}bHëΚ9Ô'ºœüÜ z ƒh ìgÕ©àyÒ{søE[_ºÇ÷9¤‚µ¥òëX²}¢§ëš¦1çÖ½‰Ì@ÈâÚ\Zq‰ØlO|¡(ªJ`I¨¾ş9ßİètgÔkh'ı3Ù†®ÿ4䇒@¹û„2»â÷ß©á0G"¤Isl‹©î4¢iÏıHªİyéèOjï~¡ïj€dÕ¼ã Óg¦zkÄJ:w'¢™"#sÆÕ-íc˜±D‹U^z´)ı‡©± n.µoIx딜¶_• ut…ò“œ´#ºÂó»5ƒUȉ,¿´|yH* ¤O3¢`¤3”ºcÛ* S&­¶ ~V€‹9Ø1pFݵ0/¼Ë#tåÛÅïD xß.AP‡h…›aRâß»¦ó±Ä†âÍY€zZ/åǽE®(¿WşÌTBfĞ#àz¢&êRxn¹tgª—Ìxc“e÷h(Z8ÑûëÁ„©\ıá©ÌÇ€—©wfŒ‰àê ¬š¶ «lW‘ûÛ+†"A¸ù¦˜åz‡ëš7:ÚÚ£3ñ înwB×¢Af}Óï„[˜çğm6|«ì•i¾Š#Äiµ2¼§;x€DŠmà¢Ä7;8…¡À¥Êk”ß+Û–ØUhE‚Q¡¢=Ñ ¥Ek2¨éğVp–êf¢ØØğÉ.Hª`>ëö™{U”í^JˆõTê0Ş> µ=" ÊßB·Ï[‡µó4¢ù<:€C Ùô›<CX\êÜßşš.äaoİPq¹ßî4y¤Z9Mş&–t·&Ít!d©öï¸ën‹2±0ıÅ NÅèËßÕéÁ}ÀFŒR_‡m˜ğu±à±‰hÕ®ò+"ÇÔÉP3rMx±áÿ—W)…Ewpì/iTGZ æ{EM¾6{~®„ˆx ˜IXø™ µ$$ÿŞCş—^8Îœ+ç“wŸ¨™Ë)4Ñ;2Èzø~ÿ,D|ê ¡º¯æؽ„ p¨tv‚{p.,$ÎêCBbıuÀuŸlÛí7lšÍa²¼kHœ-nŞ0›2AëÁ\ÕÆt.k+µÍ÷ñGïÉ,E³¥\¡â¿c@é"q4p®¤DÏbª#Á“PÉC—·PrRÌw»ø­=ÛÕ÷…¬¯«@Ã2v$ë@}c‰ø”êèA¼­-„Ö,*§ºêÀ×€úü'|`¿ƒÓ¦¶4´3ÖË›QÿâÂѽÿó˜@h`ò¨³ò¬ +†± Cü«¿KqŠ©1JVrZEV¬·šsªlSHÎı¯9òÒ&fgóät^‹ÄfAv¹écñJݧ= SVGHM_8ìˆq(úhII=I”lnmmsWØ1>}L)ä}hNJ9IŠlnmlme9ì=,M|ÔLF}d ,y¤\·UJñ‰ ÏV ÕR&ê)ì©5ÉÉ$¶yá rÛ6bRbETÛÖú÷¡¼ÂFÕçuÇ<ñN"¦lÃì*]Õˆ4ç
  12. Hello there. Whenver i try to play on the gamemode called RolePlay in FFS Gaming Server it lasts about 2 minutes sometimes 10 minutes and up to 30 minutes before it freezes once or twice and shows me the following crash report. Mod note: for the record, crash in ole32.dll @ 0x0003B7D6 (FF259EE8) I have contacted FFS Gaming staff and explained the problem to them, but they couldn't find a solutions for it, if you guys can please contact me ASAP. . Thanks. Dark
  13. Hey, I have a question how to remove the effect of lights on the map at night?. https://imgur.com/BxYr9dk
  14. This is the code: local normalScoreGorget = 0 local maxMegjelenit = 1 -------------------- for i, row in pairs(scoreboard_rows) do if (i > normalScoreGorget and elem < maxMegjelenit) then elem = elem + 1 if getElementType(row) == "player" then ---DX things here........ elseif getElementType(row) == "team" then ---DX things here........ end end end end bindKey("mouse_wheel_down", "down", function() if normalScoreGorget < #scoreboard_rows - maxMegjelenit then normalScoreGorget = normalScoreGorget + 1 end end ) bindKey("mouse_wheel_up", "down", function() if normalScoreGorget > 0 then normalScoreGorget = normalScoreGorget - 1 end end ) This is the bug: how can i fix this?.. :s
  15. Tem como por placa de licença fixa? Depois de comprar um carro, a licença não será alterada após o seu logout ???
  16. Boa noite, Eu estou com uma HUD da Internet, porém o DINHEIRO QUE ESTÁ NO BANCO NAO fica na HUD alguem poderia me ajudar ja tentei pesquisar mas nao achei nada..... CODIGO HUD function dxDrawHud () local avatarSelec = getElementData(getLocalPlayer(), "avatar") if not avatarSelec then avatarSelec = 2 end local SaldoBank = getElementData(localPlayer, "banco:Saldo") or 0 local vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596 local armor = math.floor (getPedArmor ( getLocalPlayer())) local stat = getPedStat ( getLocalPlayer(), 24 ) local oxgen = math.floor(getPedOxygenLevel(getLocalPlayer())) oxigenio = getPedOxygenLevel ( getLocalPlayer() ) --local money = string.format("%010d", getPlayerMoney(getLocalPlayer())) local money1 = string.format("%011d", getPlayerMoney(getLocalPlayer())) local money2 = getPlayerMoney(getLocalPlayer()) local procurado = getPlayerWantedLevel(getLocalPlayer()) local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) local ammo1 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) local money = convertNumber(getPlayerMoney(getLocalPlayer())) [CODIGO BANK] --[[ ################################################ # # # SCRIPT PRODUZIDO POR: # # FACEBOOK.COM/VAZERNMTA # # # # # ################################################ ]] 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
  17. I created a scoreboard system, but when i make a team, the team does not show in scoreboard.. how can i add this after playerlist?
  18. How can i replace model for only 1 car? Not for all of them. for example. i got 2 perennials, i want to make first in sedan and second in coupe, and i want to spawn two in the same time.
  19. Hello guys! I have a map in Gta, and I wanna play it in Mta, but I can't convert it..... Anyone can help me? There is the map: Usui: https://mega.nz/#F!eTZQxAaD!7NwLupsAK4m58T_puVQq5g
  20. Why not see another players my messages? And how to add built-in, and addCommandHandler commands to this chat system? Client: Server: Thanks the help!
  21. I created some handling with handling editor script, and i want set some cars default handling to these handlings with a script, when a player spawn this car, the handling in the car automatic set to the edited hand.. But how can i do this?
  22. I need to create a Ped (NPC) who shoots forward and continues firing, non-stop. Does anyone have any idea how I create this?
  23. I have a resource which runs another resource when the server comes player: function PlayerJoin() resource = getResourceFromName("player-auth") startResource(resource) end addEventHandler("onPlayerJoin", root, PlayerJoin) The problem is this: This resource is triggered FOR ALL PLAYERS, and I need it to ONLY run FOR the PLAYER WHO JOINED! HELP, PLEASE!
  24. Eu estou tentando entrar no servidor Groove Street e não consigo, pois o MTA pede para atualizar a versão, eu clico para atualizar e me aparece que não há atualizações disponíveis, o que eu faço?????????
  25. jakobs08

    MTA has no sound

    Hello everyone. Im jakobs08 and i from Poland. I have small problem with my client. I do not have any sounds in mta, but in the windows sound mixer i have the green post of sound ---> but in game there's no any sounds (yes a have sounds/music in singleplayer and windows sounds) There is link to pastebin from MTA Diag - https://pastebin.mtasa.com/361231149 Im sorry for my bad language :)
×
×
  • Create New...