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. مسوي مود مسابقة كتابية وقت يكتب الاجابه ياخد فلوس ، بس المشكل انه يتكرر كل مرا يكتب ياخد فلوس كيف اخلي اني اقدر كل مرا اسوي فيها مسابقة اخد الفلوس بس مرا وحده ومايتكرر اني اقدر اخد الفلوس ولو هتقول لي setElementData فا اعطيني من فضلك مثال لاني جربت وفشلت وتجربتي هيا كالتالي كانت بتنفع معي بالمرا الاولة بس كنت انشئ سؤال مرا تانيه ماكنت اقدر اخد فلوس مرا تانيه تجربتي بالـ setElementData setElementData (thePlayer, "themoney", true) -- كنت احطه تحت اعطاء المال getElementData (thePlayer, "the money", false) -- وهاد كنت واضعه مع كل مرا اضغط فيها علي زر انشاء السؤال بمعني اني كل مرا اضع السؤال تنغلق وكل مرا اجيب علي السؤال يكون بس مفتوح مرا وحده هاد الي فهمته ولو في طريقة تانيه اني اقدر اخلي الشي مرا وحده وفيك تقلي عنه
  2. I was testing the "create character" system I been working on with a friend, and we did not expect this... when we both register our accounts and create our characters we can't see each other, we are invisibles, I don't know how to prevent this or what did I scripted wrong, please, help This is the part that TP our characters and I think here it's the problem: (Client-Side) addEventHandler("onClientGUIClick", btnSeleccionar, function() showCursor(false) guiSetVisible(ventanaElegirSkinsM, false) setElementPosition ( getLocalPlayer(), 1742.9543457031,-1862.6853027344,13.575992584229) setElementDimension( getLocalPlayer(), 0) setElementRotation( getLocalPlayer(), -0, 0, 357.78338623047) setElementInterior( getLocalPlayer(), 0) triggerServerEvent("descongelar", getLocalPlayer(), localPlayer) setPlayerMoney(2500) All the rest of the code runs like I wanted, the money, the triggerevent, the position, etc, but for some reason, the script send us to different "interiors" or "dimensions". And, most important thing is that when we both create our character, we can't see each other new nickname, the skin neither
  3. I made a login menu for my server, I wanted to put some buildings as a background so I used setCameraMatrix, all works perfectly, but when I try to cancel the camera position and the music (I added playSound too) it doesn't work and the camera keeps far from the player, and the music keeps playing Client-Side function fondoLogin(thePlayer) local cancion = playSound("loginSoundtrack.mp3") setSoundVolume(cancion, 0.5) setElementPosition(thePlayer, -1400.2099609375,106.88999938965,1032.2734375) setElementInterior(thePlayer, 1) setCameraMatrix ( 1709.7098388672,-1449.96484375,151.87727355957, 1537.9990234375,-1276.736328125,238.57434082031, 0, 100 ) triggerServerEvent(source, "parartodo", source) end addEvent("posicionar", true) addEventHandler("posicionar", getLocalPlayer(), fondoLogin) ---------Suposed to stops the music and cameraMatrix---------------- function parartodo(thePlayer, cancion) setCameraTarget (thePlayer) stopSound(cancion) end addEvent("pararmusicaycamara", true) addEventHandler("pararmusicaycamara", getLocalPlayer(), parartodo) Server-Side function registroHRP(user, clavecreada) if(addAccount(user, clavecreada))then outputChatBox("Bienvenido") triggerClientEvent(source, "cerrar", source) logIn(source, getAccount(user, clavecreada), clavecreada) setElementPosition(source, 209.41818237305,-33.872188568115,1001.9296875) setElementInterior(source, 1) setElementDimension(source, 1) setPedRotation(source, 180) triggerClientEvent(source, "pararmusicaycamara", source) else outputChatBox("La cuenta ya existe.") end end -----------"triggerClientEvent(source, "pararmusicaycamara", source)" doesn't work--------------
  4. It's me again. I was testing my edited vehicle script and found a error, when the player enters in the vehicle, It's doesnt matter the chair, they can turn on the engine even if they sit down behind the driver position. I was wondering, there is a recourse that could prevent this? I mean, only execute the comand "turn on the vehicle" when player is sitting in the driver's chair
  5. I have been editing a vehicle script to make it work in a RP but I have a problem when executing the command to lock the vehicle, it locks perfectly from the outside, nobody can enter unless the owner unlocks the vehicle, but the problem is that if the owner locks inside, you can still go out. I did some research and found that something could be done with cancelEvent and "onClientVehicleStartExit", I've tried everything but nothing seems to work for me with that command, any advice? This is the code: function setPlayerVehicleLocked(player, vehicle) local vehname = vehicle:getName() if (vehicle:getData("vehicles:locked") == 1) then vehicle:setData("vehicles:locked", 0) vehicle:setLocked(false) player:outputChat("Desbloqueaste tu "..vehname..".", 214, 37, 37) connection:exec("UPDATE vehicles SET locked=? WHERE id=? AND owner=?", 0, vehicle:getData("vehicles:id"), vehicle:getData("vehicles:owner")) elseif (vehicle:getData("vehicles:locked") == 0) then vehicle:setData("vehicles:locked", 1) vehicle:setLocked(true) player:outputChat("Bloqueaste tu "..vehname..".", 141, 229, 22) connection:exec("UPDATE vehicles SET locked=? WHERE id=? AND owner=?", 1, vehicle:getData("vehicles:id"), vehicle:getData("vehicles:owner")) end end function onclientVehicleStartExit() if (vehicle:getData("vehicles:locked") == 0) then cancelEvent(onVehicleStartExit) end end ("onclientVehicleStartExit", root, onVehicleStartExit)
  6. Selamlar Beyler Askeri Rp Sunucum İçin F2 Plugini Gerek Sadece Can Ve Zırh Olcak Yapabilcek Arkadaş Varsa Discorddan İletişime Geçerse Çok İyi Olur TravisSakat#0001
  7. It's always giving this error, causing the download to be very slow. Someone can help me?
  8. Hello everyone, I would like to know how I could enable bind spamming as it was done in the old mta servers, I am creating a new server and I need help to enable bind spamming, since currently it is not possible because the server blocks it
  9. Olá estou aqui com uns mods de empregos que permitem ganhar exp sempre que conclui o trabalho porem estava a funcionar perfeitamente mas depois de colocar o servidor na host começou a aparecer este erro : "ERROR:[Agencia]/ir-lixeiro/Danilin_S.lua:147:attempt to perform arithmetic on a boolean value" e ja nao esta ganhando EXP Alguem sabe resolver? Apenas tem Server-Side local Marker_Emprego = createMarker ( 2182.86792, -1982.49438 +6, 13.55141 -1, "cylinder", 1.5, 16, 111, 231, 50) local Blip_Emprego = createBlipAttachedTo( Marker_Emprego, 11 ) local Veiculo = createVehicle( 408, 2178.33301, -1982.59888 +6, 13.55138 +0.5, 0, 0, 90 ) setBlipVisibleDistance(Blip_Emprego, 150) setElementFrozen( Veiculo, true ) setVehicleDamageProof( Veiculo, true ) setVehicleLocked(Veiculo, true) Marker_Aleatorios = { {2182.49585, -1996.44495, 13.54688}, {2190.50732, -2002.93738, 13.54688}, {2165.94678, -1986.73853, 13.55469}, {2193.5373535156, -2009.6970214844, 13.55469}, -- AS MESMA POS DA DE CIMA (PRA NÃO SAIR O MESMO TODA HORA) {2190.50732, -2002.93738, 13.54688}, {2182.49585, -1996.44495, 13.54688}, {2193.5373535156, -2009.6970214844, 13.55469}, {2165.94678, -1986.73853, 13.55469}, } --[[ ><><><><><><><><><><><><><><><><><><><>< >< Infos Trab >< ><><><><><><><><><><><><><><><><><><><>< --]] local Blip_Marcar = createBlipAttachedTo( Marker_Emprego, 0 ) setElementVisibleTo ( Blip_Marcar, root, false ) function Infos_Emprego ( source ) local Emprego = getElementData ( source, "Emprego" ) if Emprego == "Lixeiro" then if isElementVisibleTo ( Blip_Marcar, source ) then setElementVisibleTo ( Blip_Marcar, source, false ) outputChatBoxInfo ( "Seu Local de Trabalho foi Desmarcado do Mapa!", source, 255, 165, 0, true ) else setElementVisibleTo ( Blip_Marcar, source, true ) outputChatBoxInfo ( "Seu Local de Trabalho foi Marcado no Mapa!", source, 255, 165, 0, true ) end end end addCommandHandler ( "infos", Infos_Emprego ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Carregar Lixo >< ><><><><><><><><><><><><><><><><><><><>< --]] Object_Lixo = {} Marker_Entregar = {} function Pegar_Lixo (source) local Emprego = getElementData ( source, "Emprego" ) local Px, Py, Pz = getElementPosition( Marker_Emprego ) local Lixo = getElementData( source, "Lixo" ) local Random_Pos = math.random ( #Marker_Aleatorios ) if not isPedInVehicle ( source ) then if isElementWithinMarker(source, Marker_Emprego) then if Lixo == false then if Emprego == "Lixeiro" then setPedAnimation( source, "CARRY", "liftup", 1.0, false ) setTimer(function() if isElement( Object_Lixo[source] ) then destroyElement( Object_Lixo[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end setElementData(source, "Recompensa", 0) setPedAnimation( source, nil ) setElementData( source, "Lixo", true ) toggleControl( source, "jump", false ) toggleControl( source, "fire", false ) toggleControl(source, "aim_weapon", false) setPedAnimation( source, "CARRY", "crry_prtial", 4.1, true, true, true ) Object_Lixo[source] = createObject( 1264, Px, Py, Pz ) Marker_Entregar[source] = createMarker ( Marker_Aleatorios[Random_Pos][1], Marker_Aleatorios[Random_Pos][2], Marker_Aleatorios[Random_Pos][3] -2.2, "cylinder", 2.5, 16, 111, 231, 50) setElementVisibleTo ( Marker_Entregar[source], root, false ) setElementVisibleTo ( Marker_Entregar[source], source, true ) addEventHandler("onMarkerHit", Marker_Entregar[source], Fim_Emprego) exports.bone_attach:attachElementToBone(Object_Lixo[source], source, 4, 0, 0.4, - 0.6, -90, 0, 0 ) end, 1000, 1) else outputChatBoxError ( "Apenas lixeiros podem trabalhar aqui!", source, 255, 165, 0, true ) end end end end end addCommandHandler("lixo", Pegar_Lixo) function Mensagem_Aviso (source) local Emprego = getElementData ( source, "Emprego" ) if isPedInVehicle ( source ) then return end if Emprego == "Lixeiro" then if isElementWithinMarker(source, Marker_Emprego) then --outputChatBox ( "Digite /lixo para pegar no lixo!", source, 255, 165, 0, true ) end end end addEventHandler("onMarkerHit", Marker_Emprego, Mensagem_Aviso) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Entregar Lixo >< ><><><><><><><><><><><><><><><><><><><>< --]] function Fim_Emprego (source) local Xp = tonumber(getElementData(source, "minutes")) or 0 local Lixo = getElementData( source, "Lixo" ) local Recompensa = math.random(25, 50) local Recompensaxp = math.random(25, 50) if not isPedInVehicle ( source ) then if isElementWithinMarker(source, Marker_Entregar[source]) then if Lixo == true then setPedAnimation( source, "CARRY", "putdwn", 1.0, false, false, false, true ) setTimer(function() if isElement( Object_Lixo[source] ) then destroyElement( Object_Lixo[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end setElementData( source, "Lixo", false ) toggleControl( source, "jump", true ) toggleControl( source, "fire", true ) toggleControl(source, "aim_weapon", true) setPedAnimation( source, "CARRY", "liftup", 0.0, false, false, false, false ) --if isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(source)), aclGetGroup("Vip2")) then --setElementData(source, "Recompensa", Recompensa *2) --setElementData(source, "minutes", Xp + getElementData(source, "Recompensa")) --givePlayerMoney(source, getElementData(source, "Recompensa")) --triggerClientEvent(source, "addNotification", root, "#106FE7[ #ffffffVIP#106FE7 ] #ffffffVocê entregou o lixo e ganhou: "..getElementData(source, "Recompensa").."$", "sucesso") --elseif isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(source)), aclGetGroup("Vip")) then --setElementData(source, "Recompensa", Recompensa *2) --setElementData(source, "minutes", Xp + getElementData(source, "Recompensa")) --givePlayerMoney(source, Recompensa) --triggerClientEvent(source, "addNotification", root, "#106FE7[ #ffffffVIP#106FE7 ] #ffffffVocê entregou o lixo e ganhou: "..getElementData(source, "Recompensa").."$", "sucesso") if isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then setElementData(source, "Recompensa", Recompensa) givePlayerMoney(source, Recompensa) setElementData(source, "minutes", Xp + getElementData(source, "Recompensaxp")) if ( getElementData(source,"minutes") > 999 ) then setElementData(source,"minutes",0) setElementData(source,"Level",(getElementData(source,"Level") or 0) +1) end end end, 1200, 1) end end end end addEventHandler( "onPlayerQuit", root, function() if isElement( Object_Lixo[source] ) then destroyElement( Object_Lixo[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end end) addEventHandler( "onPlayerWasted", root, function() if isElement( Object_Lixo[source] ) then destroyElement( Object_Lixo[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end setElementData( source, "Lixo", false ) toggleControl( source, "jump", true ) toggleControl( source, "fire", true ) toggleControl(source, "aim_weapon", true) end) function outputChatBoxInfo(text, player, ...) triggerClientEvent(player, "N3xT.dxNotification", root, tostring(text), "info") end function outputChatBoxError(text, player, ...) triggerClientEvent(player, "N3xT.dxNotification", root, tostring(text), "error") end
  10. Client local armoredVehicles = { [432] = true, [601] = true } function warMachineDamage(attacker, weapon, loss, x, y, z, tire) local model = getElementModel(source) if weapon and armoredVehicles[model] then cancelEvent() triggerServerEvent ("damageWarMachine", source, source, attacker, weapon, bodypart ) end end addEventHandler("onClientVehicleDamage", root, warMachineDamage) Server addEvent( "damageWarMachine", true ) function damageWarMachine( vehicle, attacker, weapon, bodypart) local vehicleHealth = getElementHealth(vehicle) setElementHealth(vehicle, vehicleHealth - 250 ) end addEventHandler( "damageWarMachine", root, damageWarMachine ) Não quero que ele leve Hit Kill, e sim tome danos de leve, exemplo: 1 tiro de RPG tira 40% de vida. Más não consigo ?
  11. Good morning everyone. I wanted to show you a bug. I am using Parallels, a program to virtualize Windows on my MacBook Pro M1PRO. I was able to download the MTA, download GTA too. But when, I go to open the mta, it shows the GTA start screen and then crashes. I already installed the mta again, I tried many things. I want help please. This is the bug: Version = 1.5.9-release-21024.0.000 Time = Mon Nov 8 13:42:37 2021 Module = C:\WINDOWS\SYSTEM32\D3D9.DLL Code = 0xC000001D Offset = 0x0004DAA0 EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000000 ESI=00000000 EDI=00000000 EBP=0577FA50 ESP=0577F38C EIP=718FDAA0 FLG=00000000 CS=3A643A64 DS=3A643A64 SS=3A643A64 ES=3A643A64 FS=3A643A64 GS=577F6B0
  12. It's about cambering the cars, but when I use the script and turn on ENBseries, the tires disappear due to a reflection that appears in the script for the tires. I want to remove that reflection from the resource. A video to watch : https://drive.google.com/file/d/1LmfHwTCUimI2Zb9B4CGD9KovExWfb4Cs/view?usp=sharing The resource: https://drive.google.com/file/d/1oUXeCGbVBb8uJbmUoesovndYl3rGumny/view?usp=sharing Help me please
  13. Olá pessoal tou a usar um painel policial que tem aquela opção de colocar o player na viatura, acontece que também deixa colocar na viatura o player que esta a executar o comando do painel ou seja o policial permitindo assim bugar a opção caso o player morra so usar essa opção e é teleportado para a vtr , então eu queria basicamente que o player que desse o comando (policial) não pudesse se colocar a si proprio na vtr Se alguém conseguir ajudar agradecia! Vou deixar o código dessa opção Mas acho que resolveria se não deixasse abrir o painel no proprio ID supondo que sou policial e sou id 1 se der /policial 1 aparecer uma msg erro a dizer que nao posso usar o painel em mim vou deixar o cdigo do comando em baixo também! [CODIGO DA OPÇÃO] addEventHandler("Player.onViatura", root, function() local receiver = getElementData(source, "ReceiverPM") local vtr = carros[source] if (receiver) and (vtr) then local vrx, vry, vrz = getElementRotation(vtr) local px, py, pz = getElementPosition(vtr) if not getElementData(receiver, "NaViatura") then if not isPedInVehicle(receiver) then setElementData(receiver, "NaViatura", true) message(source, "O jogador foi colocado na viatura.", "success") message(receiver, "Você foi colocado na viatura!", "info") attachElements(receiver, vtr, 0.2, -1.5, 0, 0,0,90) setPedAnimation(receiver, 'ped','CAR_dead_LHS') setElementRotation(receiver, vrx, vry, vrz + 83) end else setElementData(receiver, "NaViatura", nil) message(source, "O jogador foi retirado da viatura.", "success") message(receiver, "Você foi retirado da viatura!", "info") detachElements(receiver, getElementAttachedTo(receiver)) setElementPosition(receiver, px + 2, py + 2, pz) setPedAnimation(receiver) end else message(source, "Voce nao pode colocar-se a si mesmo na viatura!", "error") end end ) [CODIGO DO COMANDO] local comando = "p" addCommandHandler(comando, function (thePlayer, _, id) local id = tonumber(id) if id then local player = getPlayerByID(id) if player and isElement(player) then local accountname = getAccountName(getPlayerAccount(thePlayer)) if accountname and not isGuestAccount(accountname) then local acc = getAccountName(accountname) if isObjectInACLGroup("user."..accountname, aclGetGroup("Policial")) then triggerClientEvent(thePlayer, "Player.onPainelPolicial", resourceRoot, player) end end end end end) getPlayerByID = function (id) local pReturn = false for i, v in ipairs(getElementsByType("player")) do local idp = getElementData(v, "ID") or false if idp then if idp == tonumber(id) then pReturn = v end end end return pReturn end
  14. Olá pessoal Tenho este Script que da fome e sede aos player, porem tambem esta a dar aos staffs, gostaria de colocar para ignorar quem tiver a acl "Staff" alguem consegue ajudar porfavor? timeFome = 108000 timeSede = 72000 function repeatFome() if getElementData(localPlayer, "afkdate") == true then return end if getElementData(localPlayer, "Fome:Logado") == true then dataFome = getElementData(localPlayer, "hunger") -1 setFome = setElementData(localPlayer, "hunger", dataFome) if getElementData(localPlayer, "hunger") <= 0 then setElementData(localPlayer, "hunger", 10) setElementHealth(localPlayer, 0) end end end setTimer(repeatFome, timeFome, 0) function repeatSede() if getElementData(localPlayer, "afkdate") == true then return end if getElementData(localPlayer, "Sede:Logado") == true then Sede = getElementData(localPlayer, "sede") -1 SetarSede = setElementData(localPlayer, "sede", Sede) if getElementData(localPlayer, "sede") <= 0 then setElementData(localPlayer, "sede", 10) setElementHealth(localPlayer, 0) end end end setTimer(repeatSede, timeSede, 0) function VerificarFomeRepeat() if getElementData(localPlayer, "Fome:Logado") == true then Fome = getElementData(localPlayer, "hunger") if Fome > 100 then setElementData(localPlayer, "hunger", 100) end end end setTimer(VerificarFomeRepeat, 50, 0) function VerificarSedeRepeat() if getElementData(localPlayer, "Sede:Logado") == true then Sede = getElementData(localPlayer, "sede") if Sede > 100 then setElementData(localPlayer, "sede", 100) end end end setTimer(VerificarSedeRepeat, 50, 0)
  15. I have issues editing freeroam in MTA. When I edit the welcome text and save it it changes it back to default settings automatically. If anyone have this problem how to fix it? function joinHandler(player) if not player then player = source end local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) setPlayerNametagColor(player, r, g, b) g_PlayerData[player] = { vehicles = {}, settings={} } g_PlayerData[player].blip = createBlipAttachedTo(player, 0, 2, r, g, b) addEventHandler("onFreeroamLocalSettingChange",player,onLocalSettingChange) if getOption('welcometextonstart') then outputChatBox('Welcome to Freeroam', player, 0, 255, 0) outputChatBox('Press F1 to show/hide controls', player, 0, 255, 0) end end
  16. JohnDoom

    AC #4 File Locked

    Hello!! Today i was playing and them i had been kicked from the server, and the message was: AC #4 File Locked! I spend the entire day trying to solve this problem, but i couldn't... Someone know how to solve it? Pls, i need help!! And i am developing a server too, so i need to fix it ASAP!!! Thanks for the attention!
  17. Crazy

    access control list

    access control list hello I'm having problems configuring my acl because I can't limit them ex wanted moderator q edits only acl of bases but on the contrary, the moderator manages to self-level up to the owner (console) can anyone help me limit this??
  18. Boa noite, Estou precisando de ajuda, quero saber se existe alguma função que pode causar problema de conexão e ping alto. Sempre quando chega a 70 online, meu servidor começa a subir o ping e do nada volta. Ate achei que fosse ataque DDOS, troquei 3 vezes de maquina e o mesmo problema continua. As empresas que passei, sempre fala a mesma coisa. Diz que nao foi encontrado nenhum ataque e com isso a empresa nao sabe o que resolver. Então gostaria de saber quais funções faz oscilar o ping de geral subir dentro do servidor. Assim consigo ver se é minha GM que precisa ser optimizada. Desde ja agradeço muito, Obrigado!
  19. Estou tentando colocar a opção de mudar a tecla em um shared mas nao estou conseguindo
  20. Estou começando a programar agora e estou tentando desenvolver um comando de ''Auxilio Emergencial'' que pode pegar R$600 a cada um dia (ou um determinado tempo) Só que eu não consigo de jeito nenhum colocar um timer function dinheiro(player, commandName, quantidade) givePlayerMoney(player, 600) exports.InfoBox:addBox(player, "success", "Seu Auxílio foi pago!") end addCommandHandler("auxilio", dinheiro)
  21. Hello guys, i want to make a login panel i have a login panel rn but other guys cant login when they register its appear there is no account with this name (account name of the guy) can u help me or give me the scipt
  22. Vanku14

    Car shop

    Hello guys i am doing roleplay mta server right now but o cant find a car shop can someone give me a link for carshop who is working please
  23. i get problems when i use a different resolution,when i use 1366x768 its all alright but when i use 1024x768 or others the images and retangles just disappear screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) local components = { "area_name", "radio", "vehicle_name" } function HudVictor ( ... ) if (not isPlayerMapVisible()) then local Dinheiro = getPlayerMoney(localPlayer) local Banco = getElementData(localPlayer, "Bank:Caixa") or "Não Sincronizado" local weapon = getPedWeapon(getLocalPlayer()) local weaponClip = getPedAmmoInClip(getLocalPlayer(), getPedWeaponSlot(getLocalPlayer())) local weaponAmmo = getPedTotalAmmo(getLocalPlayer()) - getPedAmmoInClip(getLocalPlayer()) local vida = math.floor(getElementHealth(getLocalPlayer())) local colete = math.floor(getPedArmor(getLocalPlayer())) local fome = getElementData(getLocalPlayer(), "hunger") or 50 local sede = getElementData(getLocalPlayer(), "sede") or 50 dxDrawImage(screenW * 0.6594, screenH * 0.0208, screenW * 0.3328, screenH * 0.1028, "hud/files/Icons/prehud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.7727, screenH * 0.0208, screenW * 0.0547/100*vida, screenH * 0.1028, tocolor(255, 0, 0, 255), false) dxDrawRectangle(screenW * 0.8273, screenH * 0.0208, screenW * 0.0547/100*colete, screenH * 0.1028, tocolor(70, 130, 180, 255), false) dxDrawRectangle(screenW * 0.8820, screenH * 0.0208, screenW * 0.0547/100*fome, screenH * 0.1028, tocolor(244, 164, 96, 255), false) dxDrawLine((screenW * 0.9367) - 1, screenH * 0.1236, screenW * 0.9914, screenH * 0.1236, tocolor(70, 130, 180, 255), 1, false) dxDrawLine(screenW * 0.9914, screenH * 0.1236, screenW * 0.9914, (screenH * 0.0208) - 1, tocolor(70, 130, 180, 255), 1, false) dxDrawRectangle(screenW * 0.9367, screenH * 0.0208, screenW * 0.0547/100*sede, screenH * 0.1028, tocolor(145, 224, 230, 255), false) dxDrawText(""..Dinheiro, screenW * 0.6914, screenH * 0.0319, screenW * 0.7492, screenH * 0.0800, tocolor(255, 255, 255, 255), 1.00, "default-bold", "right", "center", false, false, false, false, false) dxDrawText(""..Banco, screenW * 0.6914, screenH * 0.0847, screenW * 0.7492, screenH * 0.1144, tocolor(255, 255, 255, 255), 1.00, "default-bold", "right", "center", false, false, false, false, false) dxDrawImage(screenW * 0.7727, screenH * 0.0222, screenW * 0.0547, screenH * 0.1014, "hud/files/Icons/health.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.8266, screenH * 0.0222, screenW * 0.0555, screenH * 0.1014, "hud/files/Icons/bulletproof.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.8820, screenH * 0.0208, screenW * 0.0547, screenH * 0.1028, "hud/files/Icons/hunger.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(1204, 18, 60, 61, "hud/files/Icons/water.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(1051, 98, 212, 113, "hud/files/Icons/Armas/"..weapon.. ".png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(""..weaponClip.."/"..weaponAmmo.."", 1173, 141, 1249, 192, tocolor(255, 255, 255, 255), 1.00, "pricedown", "center", "center", false, false, false, false, false) end end --/100*fome function setHud() addEventHandler("onClientRender", getRootElement(), HudVictor) setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), setHud) function removeHud() setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), removeHud)
  24. How i can do that? How i can put "min_mta_version" on my xml??
  25. addEventHandler("onResourceStart", resourceRoot, function(res) local resourceName = getResourceName(resourceRoot) local commandsList = {} --table to store commands for _, subtable in pairs( getCommandHandlers() ) do local commandName = subtable[1] local theResource = subtable[2] if not commandsList[theResource] then commandsList[theResource] = {} end table.insert( commandsList[theResource], commandName ) local commands = getCommandHandlers( theResource ) for _, command in pairs( commands ) do commandFound = command if commandFound then outputDebugString("Commands found in "..resourceName..": "..commandFound, 3, 255, 0, 0) end end end end) I'm trying to get all commands found in some resource, i'm trying to use this code, but doesnt works! any kind of help? please? How i want to work: On resource starts > Get Resource Name > Get Resource Commands > return (resName, Commands).
×
×
  • Create New...