Search the Community

Showing results for tags 'script'.



More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 668 results

  1. I've found six issues so far. Being alone, everything seemed fine; with players, these issues are visible. For the sake of organization and to avoid overwhelming, I'll be going through each issue (if possible), instead of throwing everything at once —unless asked otherwise—. First in the list is about client.Lua's 'outputChatBox' showing to everyone in the chatbox: I've got two scripts in this moment that are causing said inconvenient: a quick ATM system and a teleport system. The ATM is a simple marker that, when hit, gives you $500, and outputs that information. The teleports work the same way, but instead, the set the interior, position and rotation of the player, and output a message. ATM: Client: (this example's location is at LV's gas station, next to Four Dragon's Casino). atm1 = createMarker (2123.0048828125, 897.57653808594, 10.1796875, "cylinder", 1, 0, 100, 0, 170) function moneyLawn (hitPlayer, matchingDimension) if (source == atm1) and (isPedInVehicle(hitPlayer) == false) then triggerServerEvent ("givePlayerMoney", hitPlayer) outputChatBox ("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: El servidor te regaló #006400$500.", 0, 0, 0, true) end end (translation: "The server gave you $500") Server: function giveToPlayer () givePlayerMoney (root, 500) end addEvent ("giveMoney", true) addEventHandler ("giveMoney", root, giveToPlayer) Because of its close relation, I'll also name another issue regarding this script. The money is being given to all players in the server, and it is being multiplied by each player. This means that is, for example, I have 3 players in my server, when any player touches the marker, each player will be given $500 x amountOfPlayers = $1500. Teleports: (I have a few other teleports, but they only change interior and position). Client: ------------------------- -- FOUR DRAGONS CASINO -- ------------------------- inFourD = createMarker (2019.76953125, 1007.0116577148, 9.7203125, "cylinder", 1, 255, 0, 0, 153) function inFourDragons (hitPlayer, matchingDimension) if (source == inFourD) and (isPedInVehicle(hitPlayer) == true) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", 0, 0, 0, true) elseif (source == inFourD) and (isPedInVehicle(hitPlayer) == false) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Ingresaste al casino '#DD0000Four Dragons#FFFFFF'.", 0, 0, 0, true) setElementInterior (hitPlayer, 10) setElementPosition (hitPlayer, 2016.9376220703, 1017.0843505859, 996.875 ) setElementRotation (hitPlayer, 0, 0, 90) end end addEventHandler ("onClientMarkerHit", root, inFourDragons) outFourD = createMarker (2018.9376220703, 1017.0843505859, 995.875, "cylinder", 1, 255, 0, 0, 153) setElementInterior (outFourD, 10) function outFourDragons (hitPlayer, matchingDimension) if (source == outFourD) and (isPedInVehicle(hitPlayer) == true) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", 0, 0, 0, true) elseif (source == outFourD) and (isPedInVehicle(hitPlayer) == false) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Te retiraste del casino '#DD0000Four Dragons#FFFFFF'.", 0, 0, 0, true) setElementInterior (hitPlayer, 0) setElementPosition (hitPlayer, 2021.76953125, 1007.0116577148, 10.7203125 ) setElementRotation (hitPlayer, 0, 0, 90) end end addEventHandler ("onClientMarkerHit", root, outFourDragons) [translation: (if player in veh) "No cars allowed". (if player not in veh) "You've entered/exited "Four Dragons" casino".] There is no server. This similar post, which I'm following, says that in client-side, the output is bound to be shown just for the player who triggered the event.
  2. Boa Noite, Gostaria de saber se pode me passa como devo fazer para quando um objeto fica flutuando no ar, ele cair direto no chao. Evitando de fica bugado do ar. Obrigado
  3. I've successfully created a marker that triggers 'givePlayerMoney' and 'outputChatBox' when 'onClientMarkerHit' in a client.Lua. Does the server see the amount of money the player now has? Do I have to sync the money to the server with some kind of 'getPlayerMoney' in a server.Lua? I'm planning on making a weapons GUI that works with the player's money.
  4. I recently dove into this simple thing called "scripting and building a server". Naturally —added to my already curious personality—, I always come up with a doubt, a question, or any sort of uncertainty. After a week of messing around with it, I noticed that 5 of the 10 last posts made in the Script section were from me. I was having so much fun —truthfully— that I just kept on finding new things to ask. I'm pretty sure they are common questions. I'm not asking to have a script from scratch, or to be taught absolutely everything. It is most commonly about errors and to help myself understand the colloquial language of the scripts. However, I can't help but think that maybe it's not the best approach. I always think to myself "try to find it on your own", but I frenquently find myself getting even more confused the more I tour into each command and function. Is there a certain tacit limit as to how many questions can be asked? Is there any way to get the necessary help without flooding the sections?
  5. First, I began with this: When entering either marker, you are taken to the specified location. It works perfectly. Both markers take me to the desired location in San Andreas' map. I moved them around and changed the shape of the marker just to be sure. There were no problems. Then, I found this: This is supposed to teleport you into the specified interior (nº0), and the coordinates next to the interior (x, y, z) The chatbox outputs the expected message. However, there is no teleporting to the specified place. The function 'setElementInterior' looks good, judging by what the wiki says. What am I missing? Something tells me it's a very obvious error I'm failing to see.
  6. I'm daring myself to add more little things to the tutorials shown here. It's of great pleasure to announce that the following code works. ☺️ I know it is not much, but it's one more step closer to my dream server. So, function joinHandler() spawnPlayer(source, 2023, 1008, 10.83, -90, math.random (1,288)) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("¡Bienvenido!", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) You can skip the spanish words. The result is as expected: when the player joins, the chatbox shows the text, the player is looking at the east, and the skin is randomized between 1 and 288. However, the camera is aiming at its default value: 0. The result has a rather inconvenient detail: the camera is looking at the right side of the character's body. UPDATE: I added setPedCameraRotation. There are no errors being detected, but the camera is not changing at all. function joinHandler() spawnPlayer(source, 2023, 1008, 10.83, -90, math.random (1,288)) fadeCamera(source, true) setCameraTarget(source, source) setPedCameraRotation(source, 90) outputChatBox("¡Bienvenido!", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) How can I modify where the camera is looking at when a player joins, so that way it looks at the same place the character is looking?
  7. Scrolling through the tutorials, I found a script that displays players in the server when joining and quitting. function playerCount ( ) outputChatBox("#ff8800[server]: #ffffffPlayers: #ffffff(" .. getPlayerCount() .. "#ffffff)" , root, 255, 0, 0, true) end addEventHandler ( "onPlayerJoin", getRootElement(), playerCount ) addEventHandler ( "onPlayerQuit", getRootElement(), playerCount ) What would I have to add to trigger it with a command, such as "/players"?
  8. How to creaye a chat bot for output some words loop in main chat pls help me 😢
  9. Estoy siguiendo este tutorial. Al momento, tengo esto: El script está ubicado dentro de una carpeta ("client"), y el archivo se llama "gui.Lua". El meta.xml está editado de tal manera que vaya a buscar el script a cliente/gui.Lua. He reducido el script a elementos más simples para testear las partes. Al momento, solo tengo habilitada la ventana; todo el resto está removido. No funciona. No tengo errores en la consola, pero tampoco tengo una ventana en el juego. ¿Es posible que el tutorial tenga errores o esté desactualizado? ¿El error lo estoy cometiendo yo? ¿Cómo lo puedo arreglar? Descubrí que tengo muchos errores y elementos faltantes. No pude encontrar alguna función para eliminar el post.
  10. I was thinking of something like this to start function increaseRotationFunction() if getKeyState( "arrow_u" ) == true or getKeyState( "arrow_d" ) == true or getKeyState( "arrow_l" ) == true or getKeyState( "arrow_r" ) == true then local vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- and i dont know end end addEventHandler("onClientRender",getRootElement(),increaseRotationFunction) and then use something like setElementAngularVelocity and getElementAngularVelocity I tried this but it didn't work too well function increaseRotationFunction() if getKeyState( "arrow_u" ) == true or getKeyState( "arrow_d" ) == true or getKeyState( "arrow_l" ) == true or getKeyState( "arrow_r" ) == true then local vehicle = getPedOccupiedVehicle(getLocalPlayer()) local avx, avy, avz = getElementAngularVelocity(vehicle) setElementAngularVelocity ( vehicle, avx * 2, avy * 2, avz * 2 ) end end addEventHandler("onClientRender",getRootElement(),increaseRotationFunction)
  11. --meu sistema de level local recompensa = 100 -- quantidade= function experience () for i, p in ipairs( getElementsByType( "player" ) ) do local exp = getElementData(p, "Exp") local exps = tonumber(getElementData(p, "Exp")) local lvls = tonumber(getElementData(p, "Level")) if lvls and exps then local needexp = lvls * 1500 if not exp then setElementData(p, "Level", 0) setElementData(p, "Exp", 0) else if exps >= needexp then setElementData(p, "Level", lvls + 1) setElementData(p, "Exp", 0) givePlayerMoney(p, recompensa) outputChatBox ("#106FE7( #ffffffLEVEL#106FE7 ) #FFFFFF Parabéns você passou para o level #106FE7" .. lvls + 1 .. "", p, 255, 255, 255, true) end end end end end setTimer(experience, 100, 0) function killandexp (ammo, killer, killerweapon, bodypart) if (killer) and (killer ~= source) then local exp = getElementData(killer, "Exp") local exps = tonumber(getElementData(killer, "Exp")) if not exp then setElementData(killer, "Exp", 0) else setElementData(killer, "Exp", exps + 2) triggerClientEvent(killer,"xplevel",killer) end end end addEventHandler ( "onPlayerWasted", getRootElement(), killandexp) function ChuvaXP (player) if (hasObjectPermissionTo(player, "command.kick", false)) then for id, players in ipairs(getElementsByType("player")) do local exp = getElementData(players, "Exp") local exps = tonumber(getElementData(players, "Exp")) if not exp then setElementData(players, "Exp", 0) else setElementData(players, "Exp", exps + 100) triggerClientEvent(players,"xplevel",players) end end end end addCommandHandler("chuvaxp", ChuvaXP) function ChuvaXPO (player) if (hasObjectPermissionTo(player, "general.tab_bans", false)) then outputChatBox ("#106FE7(#ffffffCHUVA XP#106FE7) ➺ #ffffff".. getPlayerName(player) .." #FFFFFFDeu #106FE7(#FFFFFFXP: #106FE7100 #106FE7) #FFFFFFPara Todos", root, 255, 255, 255, true) end end addCommandHandler("chuvaxp", ChuvaXPO) addEventHandler("onPlayerLogin", root, function(p, c) local lvl = getAccountData(c, "lvl") local exp = getAccountData(c, "exp") if lvl and exp then setElementData(source, "Level", lvl) setElementData(source, "Exp", exp) else setElementData(source, "Level", 0) setElementData(source, "Exp", 0) setAccountData(c, "exp", 0) setAccountData(c, "lvl", 0) end end) addEventHandler("onPlayerQuit", root, function() local acc = getPlayerAccount(source) if acc and not isGuestAccount(acc) then local lvl = getElementData(source, "Level") or 0 local exp = getElementData(source, "Exp") if lvl and exp then setAccountData(acc, "exp", exp) setAccountData(acc, "lvl", lvl) else setAccountData(acc, "exp", 0) setAccountData(acc, "lvl", 0) end end end) addCommandHandler("setlevel", function(player, cmd, target, amount) local accName = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup ("user."..accName, aclGetGroup("CDD|superMOD")) then outputChatBox("Você não tem acesso a esta equipe!", player, 255, 0, 0) return end if target then if tonumber(amount) then local targetplayer = getPlayerFromName(target) if targetplayer then setElementData(targetplayer, "Level", amount) setElementData(targetplayer, "Exp", 0) outputChatBox("Você instalou com sucesso "..amount.." nível do jogador "..getPlayerName(targetplayer).."!", player, 0, 255, 0, true) else outputChatBox("Erro: jogador não encontrado", player, 255, 0, 0) end else outputChatBox("Use: / setlevel [Nickname] [Level]", player, 255, 0, 0) end else outputChatBox("Use: / setlevel [Nickname] [Level]", player, 255, 0, 0) end end) --trabalho que quero que quando o player finalize receba exp MarkerSafeEntregadorDeJornal = createMarker( 1280.835, -1541.986, 13.522, "cylinder", 35, 0, 255, 0, 0) EntregadorDeJornalPickup = createPickup ( 1280.835, -1541.986, 13.522, 3, 1210) MarkerEntregadorDeJornal = createMarker ( 1280.835, -1541.986, 13.522, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MarkerEntregadorDeJornal, EntregadorDeJornalPickup, 0, 0, -1 ) BlipEntregadorDeJornal = createBlipAttachedTo ( MarkerEntregadorDeJornal, 42 ) setBlipVisibleDistance ( BlipEntregadorDeJornal, 150 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", EntregadorDeJornalPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "hq" cmd2 = "profissao" local HQEntregadorDeJornalBlip = createBlip ( 1280.835, -1541.986, 13.522 ) setElementVisibleTo ( HQEntregadorDeJornalBlip, root, false ) -------------------------------------------------------------------- function VerificarBlipEmprego(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end setElementVisibleTo ( HQEntregadorDeJornalBlip, player, false ) end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then return end VerificarBlipEmprego(pl) end end end, 3000,0) -------------------------------------------------------------------- function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Desmarcado do Mapa!", "info") else setElementVisibleTo ( HQEntregadorDeJornalBlip, source, true ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Marcado no Mapa!", "info") end end end addCommandHandler ( cmd1, ComandoHQ ) -------------------------------------------------------------------- function AceitarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) if getElementData ( source, "AirNew>Encaminhamento" ) == "Entregador de Jornal" then setElementData ( source, "AirNew>Encaminhamento", false ) setElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você Agora Trabalha de Entregador de Jornal, Para Mais Informações Digite ( /Profissao )", "success") else exports.Scripts_Dxmessages:outputDx(source, "Você Precisa Estar Encaminhado da Agencia de Empregos para Trabalhar neste Local!", "error") end end function RecusarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) end removeElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você se Demitiu do Emprego de Entregador de Jornal com Sucesso!", "warning") end -------------------------------------------------------------------- function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Entregador de Jornal" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09AComandos da Profissão de Entregador de Jornal", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/HQ #ffffff- #9ABDE0Para Marcar / Desmarcar o seu Local de Trabalho", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/Rotas #ffffff- #9ABDE0Abre a Lista de Rotas Disponiveis Para Trabalhar", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #FFD700Entre na Bike e Digite /Rotas Selecione uma Rota e Siga os Checkpoints!", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) end end addCommandHandler(cmd2, ComandosProf ) -------------------------------------------------------------------- function emarker(marker,md) if (md) then if isPedInVehicle ( source ) then return end if marker == MarkerEntregadorDeJornal then if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == MarkerEntregadorDeJornal then exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker) function CriarVeiculosComData () VeiculosComDataEntregadorDeJornal = { createVehicle(510, 1271.167, -1527.32, 13.564, 0, 0, 270 ), createVehicle(510, 1271.146, -1529.044, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -2, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -4, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -6, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -8, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -10, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -12, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -14, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -16, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -18, 13.564, 0, 0, 270 ), createVehicle(510, 1271.117, -1531.384 -20, 13.564, 0, 0, 270 ), } for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do setElementData ( veh, "Emprego", "Entregador de Jornal" ) setVehicleDamageProof(veh,true) setVehicleColor( veh, 0, 0, 0 ) setVehiclePlateText ( veh, "RPGAMING" ) addEventHandler("onVehicleStartEnter", veh, VerificarEmprego ) --addEventHandler("onVehicleExit", veh, SairDoVeiculosComData ) local tx, ty, tz = getElementPosition(veh) local rx, ry, rz = getElementRotation(veh) setVehicleRespawnPosition(veh, tx, ty, tz, rx, ry, rz) end end addEventHandler("onResourceStart", resourceRoot, CriarVeiculosComData ) function VerificarEmprego (thePlayer, seat) local Jogador = getElementData(thePlayer, "Emprego" ) if seat == 0 then if Jogador == "Entregador de Jornal" then else cancelEvent() exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Entregadores de Jornal!", "error") end end end --[[function SairDoVeiculosComData () local veh = source setTimer(function() if getVehicleOccupant(veh) == false then respawnVehicle(veh) end end, 30000, 1) end addEventHandler ( "onPlayerQuit", getRootElement(), SairDoVeiculosComData ) --]] -------------------------------------------------------------------- local rElement = getRootElement() function respawnVehicles(player, seconds) for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do if isEmpty( veh ) then respawnVehicle ( veh ) end end end setTimer(respawnVehicles, 60000,0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end -------------------------------------------------------------------- atualrotnumberJORNAL = {} ppcikJORNAL = {} blips = {} rotasJORNAL = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = { {1282.185, -1546.146, 13.547}, {1292.531, -1536.74, 13.491}, --{1117.78308, -1030.55933, 31.88287}, --{11270.73914, -1027.27011, 32.35918}, --{1466.25684, -1172.65686, 23.88302}, --{1673.56787, -1169.50952, 23.92861}, --{1791.41406, -1164.77539, 23.82813}, --{2095.31763, -1292.43701, 23.97214}, --{2150.26270, -1291.66003, 23.97753}, --{2352.627019, -1513.26306, 24.00000}, --{2561.87158, -1467.34753, 24.01236}, --{2756.12573, -1180.33130, 69.39844}, --{2863.57446, -1440.18982, 10.95315}, --{2507.24414, -1725.65881, 13.54688}, --{23270.33276, -1721.86511, 13.58705}, --{2228.38867, -1722.77356, 13.55438}, --{2175, -1742, 13.55438}, --{2072.61230, -1793.96008, 13.54688}, --{1871.15784, -1923.91858, 13.54688}, --{1352.39136, -1758.33508, 13.50781}, }, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = { {823.93018, -1413.86011, 13.46503}, {2709.32098, -1504.01135, 13.54223}, {797.72333, -1580.373270, 13.54688}, {645.75140, -1694.06555, 14.89330}, {422.36475, -1758.63403, 8.18526}, {305.55188, -1771.70020, 4.54249}, {168.62589, -1770.10681, 4.43438}, {138.38370, -1460.07129, 25.62103}, {169.82892, -1348.34363, 69.36220}, {280.87973, -1320.37817, 53.81308}, {543.01135, -1202.30334, 44.50127}, {562.19452, -1060.57458, 74.59800}, {782.98035, -808.70764, 65.19865}, {2708.08984, -684.05566, 116.23006}, {1091.30396, -627.89929, 111.38203}, {1280.77197, -614.80652, 102.93521}, {1437.30725, -935.30865, 36.26117}, {1335.64368, -1066.11133, 27.87136}, {1144.98792, -1131.54431, 23.82813}, {1022.52026, -1122.13037, 23.87152}, }, ["Entregas de Jornais - Los Santos (3) - 20 Entregas - $1500"] = { {1324.671, -1433.923, 14.969}, {1184.128, -1316.365, 13.573}, {1096.775, -1288.524, 13.554}, {994.57, -1298.388, 13.39}, {814.181, -1342.959, 13.533}, {792.273, -1626.558, 13.391}, {1077.013, -1859.017, 13.547}, {1408.296, -1881.205, 13.547}, {1830.151, -1841.683, 13.578}, {1924.561, -1789.748, 13.383}, {2096.031, -1806.206, 13.552}, {2289.097, -1724.15, 13.547}, {2268.405, -1667.375, 15.377}, {2011.597, -1597.769, 13.572}, {1911.033, -1604.44, 13.547}, {1864.723, -1604.331, 13.539}, {1671.314, -1583.68, 13.547}, {1581.473, -1448.472, 13.539}, {1519.231, -1449.773, 13.539}, {1363.771, -1431.401, 13.539}, }, } pay = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = 670, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = 750, ["Entregas de Jornais - Los Santos (3) - 20 Entregas - $1500"] = 1500, } function ifPlayerEnterOnMarker(markerHit,matchingDimension) if isPedInVehicle(source) then if markerHit == ppcikJORNAL[source] then if (matchingDimension) then if isElement(ppcikJORNAL[source]) then local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end destroyElement(ppcikJORNAL[source]) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, false ) setControlState ( source, "handbrake", true ) if atualrotnumberJORNAL[source] <= #rotasJORNAL[rname] then exports.Scripts_Dxmessages:outputDx(source, "Entregando Jornais... Aguarde 2 Segundos!", "info") setTimer(gerarrota,2500,1,source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Jornais Entregues, Siga Para o Proximo Checkpoint!", "success") end,2500,1,source) elseif atualrotnumberJORNAL[source] == #rotasJORNAL[rname]+1 then setElementData(source,"rtnameJornal",rname) atualrotnumberJORNAL[source] = 1 local rec = pay[rname] givePlayerMoney(source,tonumber(rec)) local vh = getPedOccupiedVehicle(source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Você Recebeu um Valor de $"..rec.." Por Finalizar as Entregas de Jornais!", "success") end,2500,1,source) setTimer(function(source) toggleAllControls ( source, true ) end, 2500,1, source ) setTimer(function(source) setControlState ( source, "handbrake", false ) end, 2500,1, source ) setElementData(source,"rtnameJornal",nil) local exp = getElementData(player, "Exp") local exps = tonumber(getElementData(player, "Exp")) --setElementData(player, "Exp", 0) setElementData(player, "Exp", exps + 100) triggerClientEvent(player,"xplevel",player) end end end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),ifPlayerEnterOnMarker) -------------------------------------------------------------------- function VerificarCairBike(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end local rname = getElementData(player,"rtnameJornal") or nil if rname == nil then triggerClientEvent ( "Desligar:AntiQueda", player ) else triggerClientEvent ( "Ligar:AntiQueda", player ) end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then VerificarCairBike(pl) end end end end, 3000,0) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- function pickjobJornal(source) if not isElement(source) then return end local im = isPedInVehicle(source) if im == false then return end local job = getElementData(source,"Emprego") or false if job == "Entregador de Jornal" then local vh = getPedOccupiedVehicle(source) if isElement(vh) then local x,y = getElementPosition(vh) local x1,y1 = getElementPosition(source) local dist = getDistanceBetweenPoints2D(x,y,x1,y1) local isMarkerSafe = isElementWithinMarker(vh,MarkerSafeEntregadorDeJornal) local id = getElementModel(vh) local seat = getPedOccupiedVehicleSeat(source) if dist > 0 then return end if id == 510 then if seat == 0 then if isMarkerSafe == false then return end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>AbrirPainel<Client",source,rotasJORNAL) end end end end end addCommandHandler("rotas",pickjobJornal) function receivert(source,rotaname) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) setElementData(source,"rtnameJornal",rotaname) atualrotnumberJORNAL[source] = 1 gerarrota(source) end addEvent("AirNew>request>Startrota>Server>EntregadorDeJornal", true) addEventHandler("AirNew>request>Startrota>Server>EntregadorDeJornal",getRootElement(), receivert) function gerarrota(source) local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end if not isElement(ppcikJORNAL[source]) and isPedInVehicle(source) then local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, true ) setControlState ( source, "handbrake", false ) local id = tonumber(atualrotnumberJORNAL[source]) local x,y,z = rotasJORNAL[rname][id][1],rotasJORNAL[rname][id][2],rotasJORNAL[rname][id][3] ppcikJORNAL[source] = createMarker (x, y,z, "checkpoint", 4, 255, 0, 0, 50,source) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,true,x,y,z) atualrotnumberJORNAL[source] = id+1 end end function sair ( quitType ) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end end addEventHandler ( "onPlayerQuit", getRootElement(), sair ) function SairDaBike ( thePlayer, seat, jacked ) local rname = getElementData(thePlayer,"rtnameJornal") or nil if rname == nil then return end canceljobtimer (thePlayer) exports.Scripts_Dxmessages:outputDx(thePlayer, "Você Saiu da Bike, Entregas Canceladas!", "warning") end addEventHandler ( "onVehicleExit", getRootElement(), SairDaBike ) function canceljobtimer(source) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) atualrotnumberJORNAL[source] = 1 setElementData(source,"rtnameJornal",nil) end function canceljobdeath() local job = getElementData(source,"Emprego") or false if job ~= "Entregador de Jornal" then return end local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end canceljobtimer(source) exports.Scripts_Dxmessages:outputDx(source, "Você Morreu e Suas Entregas Foram Canceladas!", "warning") end addEventHandler( "onPlayerWasted", getRootElement( ),canceljobdeath)
  12. Thisdp's DirectX Graphical User Interface System ( MTASA 2D+3D DxLIB ) This dxlib provide dx gui functions and events to make it easier to use and alternative to change the style more flexibly. Warning: DGS Version Lower than 3.4 is no longer supported. Final Version: 3.99 Features: 1. Update Check(DGS will notice you if there is a higher version, and you can choose to ignore it or disable it in the config file) Update Command: "updatedgs" 2. Dx GUI Types: Window Edit Box Button Grid List Image Scroll Bar Scroll Pane Text Label Tab Panel Ellipse Detect Area (EDA) Detect Area Radio Button Combo Box Check Box Memo 3D Interface 3D Text Media Browser Browser 3. Edit/Memo rewrite ( You can no longer find the problems in dgs, the problems which exist in cegui) 4. Detect Area is efficient when checking whether your cursor is in a complicated shape. 5. Debug Mode , Command: "debugdgs" 6. You can apply shader to the dxgui ( Compatible with some resources like Objec tPreview ). 7. Include CMD, Command: "cmd" ( For more help, please input "help" in the CMD ) 8. Memo rewritten. 9. OOP Class. 10. Render Target Failure Check ( Warns when there's no enough video memory to create render target ). 11. DGS assembles cegui, you can find the similar feeling when scripting with dgs. 12. 48-hour-response service, your suggestions and bug report will be dealt with in 48 hours ( or less, like 12 hours ? ) 13. Custom Style system 14. Built-in shader plugin 15. More properties 16. Built in multi-language support Notice:Do not close your server or stop the script when it is updating. Wiki: https://wiki.multitheftauto.com/wiki/Dgs ( Still Working In Process ) Auto Completion For N++ (Thanks To Ahmed Ly): http://www.mediafire.com/file/m6dm7815d5dihax/Lua.zip Discord Server: https://discord.gg/QEs8q6W Download DGS : https://github.com/thisdp/dgs Notice: Need acl rights to call fetchRemote. To Contact Me , Get into the discord server. I have abandoned skype. My server is based on DGS , if you want to see the exact effect of dgs ( not best, my design is bad ). Please have a look. IP: lfd.thisdp.com If you want to sell your script which involves DGS, please exclude DGS from your price. HurtWorld Backpack Panel(Example) DGS Network Monitor(Built-in)
  13. Boa Noite, Preciso de uma ajuda nao sei como resolver ja colocar o ACPANEL mais é bug do MTA nem é por mod, porem se tiver mais alguma configuração que deve ser feita por favor me auxiliar nisso, tem player que consegue atravessar o objeto do servidor como se nao tive-se colisão.
  14. A simple script of dressable characters and deformable faces. You can move every vertex of the head with a simple displacement shader. The script is in test state right now, I'll create a new editor later. Hope you like it.
  15. Hello, I would like to know how I can or if it is possible to make a marker on the map to set a handling in the player's car. I would also like to know how to place a marker with a 3d image on the map
  16. Olá pessoal. Eu ainda sou leigo nessa parte de script. Baixei um Mod de dominação e estou com uma duvida de como eu faço para não permitir que membros da corporação ou gang já dominada continuem dominando? Obs: eu peguei esse script na internet. local sql = { Query = executeSQLQuery }; addEventHandler( 'onResourceStart', resourceRoot, function() sql.Query( "CREATE TABLE IF NOT EXISTS areas (`atualEquipe` TEXT NOT NULL)") local insert = true local busca = sql.Query( "SELECT * FROM areas" ) for i = 1, #busca do insert = false end if(insert == true) then sql.Query( "INSERT INTO areas (atualEquipe) VALUES ('CJ')") end sql.Query( "UPDATE areas SET atualEquipe = 'CJ'") end ); local marker = createMarker (1175.5581054688,-2037.2095947266,77.893753051758, "cylinder",2,125 ,38 ,205, 100) local entrar = createMarker (1175.5581054688,-2037.2095947266,77.893753051758 +1, "arrow", 0, 000,0, 0) local blip = createBlipAttachedTo ( entrar, 23 ) setBlipVisibleDistance(blip, 250) local entrar11= createMarker ( -1, "corona", 5, 0,0,0) local blip11 = createBlipAttachedTo ( entrar11, 23 ) setBlipVisibleDistance(blip11, 250) function texto () local busca = sql.Query( "SELECT * FROM areas" ) for i = 1, #busca do triggerClientEvent(root,"onDominate", root, busca[i].atualEquipe ) end end setTimer ( texto, 1000, 5) local hillRadar = createRadarArea(1520.0114746094,-2300.4619140625, -450,350,-255,140,0,350) function mensagem (source) outputChatBox("Digite #FF0000/dominar #FFFFFFpara começar a dominar este territorio.",source,255,255,255,true) end addEventHandler("onMarkerHit",marker,mensagem) function mastering (element) if not isElementWithinMarker(element, marker) then return end if getElementType(element) == "player" then local inTeam = getPlayerTeam (element) if inTeam then triggerClientEvent(element,"Temp",element) r, g, b = getTeamColor ( inTeam ) outputChatBox("#7D26CD* #ffffffA GANG #7D26CD"..getTeamName(inTeam).." #ffffffESTA DOMINANDO O TERRITORIO #ff0000"..(nomePlayer or ""), root,255,255,255,true) setRadarAreaFlashing ( hillRadar, true ) time = setTimer (function() setRadarAreaFlashing ( hillRadar, false ) givePlayerMoney(element,0) outputChatBox("#7D26CD* "..getTeamName(inTeam).." #ffffffDominou a gang #ff0000"..(nomePlayer or ""), root,255,255,255,true) nomePlayer = getTeamName(inTeam) sql.Query( "UPDATE areas SET atualEquipe = '".. nomePlayer .."'") setRadarAreaColor(hillRadar, 0 ,255 ,0, 130) triggerClientEvent(element,"TimerStamp",element) setMarkerColor(marker, 0 ,255 ,0, 80) end,15000,1) else outputChatBox("#7D26CD* #ffffffVocê não esta em nenhuma gang", element,255,255,255,true) end end end addCommandHandler("dominar", mastering) function onLeave (element) triggerClientEvent(element,"TimerStamp",element) setRadarAreaFlashing ( hillRadar, false ) if not killTimer(time) then return end outputChatBox("#7D26CD* #ffffffVolte para o marker para continuar dominando.", element,255,255,255,true) end addEventHandler("onMarkerLeave",marker,onLeave)
  17. How to remove dxDrawWindow with, removeEventHandler?, I would like to turn on the window several times.
  18. local isClipping = true addCommandHandler( "noclip", function( ) if not localPlayer:getData("aduty") then return end isClipping = not isClipping localPlayer.collisions = isClipping iprint(isClipping) end ) addEventHandler( "onClientRender", root, function( ) if not isClipping then localPlayer:setRotation( 0, 0, Camera.matrix.rotation.z ) local lm, dir, speed = localPlayer.matrix, Vector3(), getControlState( "jump" ) and 4 or getKeyState( "lalt" ) and .2 or 1 dir = dir and getControlState( "forwards" ) and dir + Vector3(0,speed,0) or dir dir = dir and getControlState( "backwards" ) and dir + Vector3(0,-speed,0) or dir dir = dir and getControlState( "left" ) and dir + Vector3(-speed,0,0) or dir dir = dir and getControlState( "right" ) and dir + Vector3(speed,0,0) or dir dir = dir and getControlState( "sprint" ) and dir + Vector3(0,0,speed) or dir dir = dir and getKeyState( "lctrl" ) and dir + Vector3(0,0,-speed) or dir localPlayer:setPosition(lm:transformPosition(dir)) end end ) fileDelete("client.Lua")
  19. Preciso que alguém me ajude a colocar permissão nesse script EXEMPLO: if isObjectInACLGroup ("user."..accName, aclGetGroup ( "vip") ) then function fix (playerSource) local theVehicle = getPedOccupiedVehicle (playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then fixVehicle (theVehicle) outputChatBox ("" , thePlayer) end end addCommandHandler ("fix" , fix)
  20. I would like to know where I can find the slothbot script, because I want to know how it works, what the function looks like, etc.
  21. Preciso de que alguém me ajude a colocar permissão nesse script EXEMPLO : if isObjectInACLGroup ("user." .. accName, aclGetGroup ("vip")) then function fix (playerSource) local theVehicle = getPedOccupiedVehicle (playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then fixVehicle (theVehicle) outputChatBox ("" , thePlayer) end end addCommandHandler ("fix" , fix)
  22. I would like to know what commands I need for this script. And I don't accept answers about "slothbot / slothman" commands, because I want to use commands directed to Ped, eg "CreatePed", the best answer that helps me will get a love of me ❤️
  23. Gostaria de saber, como eu faço pra usar o script de fome, sede e sono de uma pessoa, com o HUD de outra pessoa que tem um script diferente. E como eu faço pra quando eu abrir a tela de compra de armas, não aparecer o HUD padrão. Obrigado desde já.
  24. Write me a script how to do it, I will be very grateful
  25. Boa Tarde, To com uma duvida eu tenho um sistema de datababase (SQL) so que quero fazer 1 painel a onde eu posso alterar as informação que tem dentro dela. Tipo Tenho uma database que salva Kill,HeatShots,etc.. e as vezes o player troca de PC e quer as kill dele de volta. Ai com isso quero fazer 1 painel a onde eu poça editar direto dessa database. com os players ainda utilizando ela. Eu posso fazer isso? Vai trazer algum bug na database? era so essa a minha duvida.