Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 29/01/19 in all areas

  1. جميل لكن لو تسوي تحقق أن اللاعب حي مب ميت + تخليه جدول أفضل .
    3 points
  2. -: اعضاء فريق مجتمع العرب @justboy @#CroSs @NX_CI @ibrahim# @Rakan#
    2 points
  3. Another simpler way is creating a ternary operator. For example: argument3 = tonumber(argument3) and argument3 or getElementDimension(player) -- what this does is if arg3 is a number use it else it sets arg3 as the player's dimension no need for else, if etc...
    2 points
  4. addEventHandler( "onElementDestroy", veh[source], function () destroyPlayerVehicles( thePlayer ) end ) Coloque isso onde o veículo foi criado; thePlayer deve ser a variável do jogador. Edit: tire 'destroyPlayerVehicles' e coloque estas funções do fim do trabalho: setElementVisibleTo ( entregartrab2, source, false ) setElementVisibleTo ( bliptrab2, source, false ) setElementVisibleTo ( entregarparte2, source, false ) setElementVisibleTo ( bliptparte2, source, false )
    1 point
  5. 1 point
  6. السلام عليكم ورحمة الله وبركاته -:في هذا الموضوع يمكنك تقديم طلب للانضمام لفريق مجتمع العرب, يجب عليك قبل كل شيء اتباع شكل التقديم التالي :اذا كنت تريد التقديم كـ مصمم في مجتمع العرب, الرجاء اتباع الشكل التالي :اذا كنت تريد التقديم كـ مبرمج في مجتمع العرب, الرجاء اتباع الشكل التالي الآن السؤال الذي يدور في بال الكثيرين, ماهو المقابل, الراتب الذي ستوفرونه؟ الفلوس (الراتب) تستطيع ان تربحهم فقط من المشاريع التي ستشارك في تطويرهم ولاتوجد طريقة أخرى
    1 point
  7. tente usar: addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then if isTimer(p_timer[source]) then killTimer(p_timer[source]) end p_timer[source] = nil end end end)
    1 point
  8. Anyone that enjoys playing Mta DayZ should definitely come and check out this server, it has many customizations, such as vehicles, map customizations, weapons and many more, it is an underated server that could do with more players, if you want to have a good balanced server, come try it out! Server IP: mtasa://88.214.58.229:22003 Website: mtadayzkogkforum.com Discord: https://discord.gg/FC6qmC3
    1 point
  9. addCommandHandler("test",function(player,command,...) local args = {...} print(#args) --How many arguments are passed end)
    1 point
  10. You can find all of the ped names from within the freeroam resource in skins.xml
    1 point
  11. It means that argument has a value assigned and that the value is different from false. What you are looking for is: if not argument or type(argument)~= "number" then argument = getPlayerDimension(player) end
    1 point
  12. if not argument then -- Do something end ^ This could also mean that argument == false. Irrelevant difference for OP's specific use case, but still
    1 point
  13. if argument then end represents if argument ~= nil then end If you'd like to check if it's nil: if not argument then -- Do something end -- or if argument == nil then -- Do something end EDIT: It doesn't matter which of the two methods you choose. As far as I know, the common code style uses if not element then -- Do something end -- etc.
    1 point
  14. Use este script. Após ligá-lo, aperte a tecla 'num_8' para visualizar uma lista de todas as texturas, então pressione 'num_7' ou 'num_9' para navegar pela lista. Deixe um carro modificado perto de você, pois se a textura for detectada, o carro ficará com efeito colorido. Aperte 'K' para copiar o nome da textura e altere de 'vehiclegrunge256' para o nome da textura copiada. Caso o nome das texturas sejam diferentes, você precisará criar uma tabela, indexado ao ID do veículo.
    1 point
  15. arg1, arg2, ...: Each word after command name in the original command is passed here in a seperate variable. If there is no value for an argument, its variable will contain nil. You can deal with a variable number of arguments using the vararg expression, as shown in Server Example 2 below. https://wiki.multitheftauto.com/wiki/AddCommandHandler if argument then -- check end @Hugo_Almeidowski
    1 point
  16. Creo que tampoco comprendí la situación por completo, así que daré algunas ideas generales. Si la intención es mantener una referencia a la cantidad de tiempo que algo lleva activo, mantener un conteo de esto no es la mejor opción posible, pues fácilmente puede desincronizarse o generar problemas de eficiencia. Por el contrario, sugiero almacenar referencias temporales, por ejemplo, si quisieras saber cuanto tiempo lleva el jugador activo, guardas la fecha y hora en que el jugador se conectó y calculas el tiempo transcurrido hasta el momento actual. Si quisieras almacenar la cantidad total que un jugador ha estado activo en toda la historia, entonces tomas el momento en que se conectó y el momento en que se desconectó, calculas la distancia entre ambos momentos y la sumas a la cantidad que el jugador previamente ha estado activo. Puede sonar lioso al principio, pero se simplifica una vez que decides una manera para obtener referencias temporales, de las cuales hay muchas, nombraré algunas palabras clave que puedan servir para buscar documentación: datetime, timestamp, tick count. En cualquier caso, también puedes mostrarnos tu código a ver lo que falla con tu método, si es que prefieres no modificarlo demasiado.
    1 point
  17. En la base de datos no se actualiza momentáneamente, es decir: Si tu guardas el tiempo jugado a la hora de salirse el jugador se guardará entonces, no antes. De hecho es la mejor forma porque si haces que se vaya actualizando en la db constantemente podria generar lag. Espero haberte entendido.
    1 point
  18. Já vi um mod na comunidade que colocava efeito de sujeira nos veículos por meio desse vehiclegrunge256. Usa shaders também.
    1 point
  19. ¿Creas un timer por cada jugador que ingresa al servidor? No suena como la cosa más optimizada posible. ¿Por qué no guardas la hora que se conectó y la hora que se desconectó y luego haces una diferencia entre ambas?
    1 point
  20. Dá pra modificar com shader sim.
    1 point
  21. Tente isto: function prisao(Policial, cmd, Jogador) local accName = getAccountName ( getPlayerAccount ( Policial ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "PM" ) ) then if cmd == "prender" then if Jogador then local Jogador = getPlayerFromPartialName(Jogador) if not (isElement(Jogador)) then return outputChatBox("#FF0000Esse jogador não existe!", Policial, 255, 255, 255, true) end local estrelasdeprocurado = getPlayerWantedLevel(Jogador) local jX, jY, jZ = getElementPosition (Jogador) local pX, pY, pZ = getElementPosition (Policial) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if Jogador == Policial then return outputChatBox("#FF0000Voce não pode se Prender.", Policial, 255, 255, 255, true) elseif ( estrelasdeprocurado == 0 ) then return outputChatBox("#FF0000Este Jogador não está sendo Procurado!", Policial, 255, 255, 255, true ) elseif dist >= 3 then return outputChatBox("#FF0000Chegue mais perto do Jogador para Prender!", Policial, 255, 255, 255, true ) end Prender(Jogador) outputChatBox("#FF0000Voce Recebeu R$1.000 Por prender o Jogador "..getPlayerName(Jogador).."", Policial, 255 , 255, 255, true) givePlayerMoney(Policial, 1000) else outputChatBox("#FF0000Digite o Nome do Jogador!", Policial, 255, 255, 255, true) end elseif cmd == "liberar" then if Jogador then local Jogador = getPlayerFromPartialName(Jogador) if not (isElement(Jogador)) then return outputChatBox("#FF0000Esse jogador não existe!", Policial, 255, 255, 255, true) end local estrelasdeprocurado = getPlayerWantedLevel(Jogador) if Jogador == Policial then return outputChatBox("#FF0000Voce não pode se Liberar!", Policial, 255, 255, 255, true) elseif not getElementData(Jogador, "preso") or not getElementData(rRoot,""..getPlayerSerial(Jogador).."-j") then return outputChatBox("#FF0000Este jogador não está Preso!", Policial, 255, 255, 255, true ) end Liberar(Jogador) else outputChatBox("#FF0000Digite o Nome do Jogador!", Policial, 255, 255, 255, true) end end end end addCommandHandler("prender", prisao) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end
    1 point
  22. Faça uma depuração básica no código e descubra o que está errado: outputChatBox("jogador " ..tostring(Jogador)) outputChatBox("policial "..tostring(Policial)) outputChatBox("estrelasdeprocurado "..tostring(estrelasdeprocurado)) local jX, jY, jZ = getElementPosition (Jogador) local pX, pY, pZ = getElementPosition (Policial) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if Jogador == Policial then return outputChatBox("#ff0000Voce não pode se Prender.", Policial, 255, 255, 255, true) elseif ( estrelasdeprocurado == 0 ) then return outputChatBox("#ff0000Este Jogador não está sendo Procurado!", Policial, 255, 255, 255, true ) elseif dist >= 3 then return outputChatBox("#ff0000Chegue mais perto do Jogador para Prender!", Policial, 255, 255, 255, true ) end Prender(Jogador) outputChatBox("#ff0000Voce Recebeu R$1.000 Por prender o Jogador "..getPlayerName(Jogador).."", Policial, 255 , 255, 255, true) givePlayerMoney(Policial, 1000) else outputChatBox("#ff0000Digite o Nome do Jogador!", Policial, 255, 255, 255, true) end
    1 point
  23. Você recuperou o jogador de uma string e o converteu para player? Com o getPlayerFromPartialName
    1 point
  24. local all_peds = getElementsByType("ped") for id, ped in ipairs(all_peds) do local ped1name = getElementID(ped) local ped1model = getElementModel(ped) local ped1dimension = getElementDimension(ped) row = DGS:dgsGridListAddRow(listaPeds) DGS:dgsGridListSetItemText ( listaPeds, row, coluna1, ped1name ) DGS:dgsGridListSetItemText ( listaPeds, row, coluna2, ped1model ) DGS:dgsGridListSetItemText ( listaPeds, row, coluna3, ped1dimension ) end Try it.
    1 point
  25. Lembrando que math.randomDiff é uma função útil. Logo vc precisa ter o código dela no seu script pra funcionar.
    1 point
  26. Sobre o setTimer, tente: -- Local para pegar KIT de reparação -- tableKit = {} markerKit = createMarker(2511.565, -1515.35, 23.1, "cylinder", 1, 0, 255, 0, 35) addEventHandler( "onPlayerMarkerHit", root, function ( m ) if m == markerKit and not isPedInVehicle(source) and not tableKit[source] then setPedAnimation(source, "ped", "ATM", -1, false, false, false, false) tableKit[source] = 1 setTimer(function(p) exports.dxmsgs:outputDx(p, "Você pegou o kit de ferramentas.", "success") end, 5000, 0, source) end end ) Sobre o spawn alternando entre 1 e 2: local rndC = spawnCar[ math.randomDiff(1, 2) ]
    1 point
  27. Math.randomDiff Não sei se foi falado pra você. Mas já foi dito que dentro do timer, o source deixa de existir. Pois ele pertence ao evento que está anexado na função principal. Passe o source para uma variável local fora do timer e dentro do timer vc usa essa variável em vez do source.
    1 point
  28. You need to change "param" into a table to catch all other subsequent params by using "..." then using table.concat to join them. -- Test the function function test(player, command, ...) local msg = table.concat({...}," ") sendDiscordMessage(msg) end addCommandHandler("dcmessage", test)
    1 point
  29. اليوم رجعتلكم بوظيفة جديدة والوظيفة واضحة من اسمها getPlayerInfo - Server side only الحين نجي للساينتكس playername, accountname, serial, ip, money, teamname, vehicle, health, armor, dimension, interior = getPlayerInfo(thePlayer) Source Code : function getPlayerInfo(thePlayer) if isElement(thePlayer) and getElementType(thePlayer) == "player" then local aName = getPlayerName(thePlayer) local aAcc = getPlayerAccount(thePlayer) if not isGuestAccount(aAcc) then aAccName = getAccountName(aAcc) else aAccName = "Guest" end local hisSerial = getPlayerSerial(thePlayer) local aIP = getPlayerIP(thePlayer) local hisMoney = getPlayerMoney(thePlayer) local hisTeam = getPlayerTeam(thePlayer) or false if hisTeam ~= false then hisTeamName = getTeamName(hisTeam) else hisTeamName = "N/A" end if isPedInVehicle(thePlayer) then local theVehicle = getPedOccupiedVehicle ( thePlayer ) hisVehicleName = getVehicleName(thePlayer) else hisVehicleName = "On Foot" end local hisHealth = getElementHealth(thePlayer) local hisArmor = getPedArmor(thePlayer) local hisDimension = getElementDimension(thePlayer) local hisInterior = getElementInterior(thePlayer) else error("Bad Argument At Argument #1 player not found") end return aName, aAccName, hisSerial, aIP, hisMoney, hisTeamName, hisVehicleName, hisHealth, hisArmor, hisDimension, hisInterior end مثال : function getPlayerInfo(thePlayer) if isElement(thePlayer) and getElementType(thePlayer) == "player" then local aName = getPlayerName(thePlayer) local aAcc = getPlayerAccount(thePlayer) if not isGuestAccount(aAcc) then aAccName = getAccountName(aAcc) else aAccName = "Guest" end local hisSerial = getPlayerSerial(thePlayer) local aIP = getPlayerIP(thePlayer) local hisMoney = getPlayerMoney(thePlayer) local hisTeam = getPlayerTeam(thePlayer) or false if hisTeam ~= false then hisTeamName = getTeamName(hisTeam) else hisTeamName = "N/A" end if isPedInVehicle(thePlayer) then local theVehicle = getPedOccupiedVehicle ( thePlayer ) hisVehicleName = getVehicleName(thePlayer) else hisVehicleName = "On Foot" end local hisHealth = getElementHealth(thePlayer) local hisArmor = getPedArmor(thePlayer) local hisDimension = getElementDimension(thePlayer) local hisInterior = getElementInterior(thePlayer) else error("Bad Argument At Argument #1 player not found") end return aName, aAccName, hisSerial, aIP, hisMoney, hisTeamName, hisVehicleName, hisHealth, hisArmor, hisDimension, hisInterior end addCommandHandler("getmyinfo", function(plr) local name, accountname, serial, ip, money, team, vehicle, health, armor, dimension, interior = getPlayerInfo(plr) outputChatBox("Your Name: "..name, plr,255,0,0,true) outputChatBox("Your Account name: "..accountname, plr,255,0,0,true) outputChatBox("Your Serial: "..serial, plr,255,0,0,true) outputChatBox("Your IP: "..ip, plr,255,0,0,true) outputChatBox("Your Money: "..money, plr,255,0,0,true) outputChatBox("Your Team: "..team, plr,255,0,0,true) outputChatBox("Your Vehicle: "..vehicle, plr,255,0,0,true) outputChatBox("Your Health: "..health, plr,255,0,0,true) outputChatBox("Your Armor: "..armor, plr,255,0,0,true) outputChatBox("Your Dimension: "..dimension, plr,255,0,0,true) outputChatBox("Your Interior: "..interior, plr,255,0,0,true) end ) النتيجة : _____________________________________________ ادري ان اغلبكم ما بيتهم للفنكشن ولاكن سويته للأفادة في امان الله
    1 point
  30. Se vc é iniciante, recomendo algo mais simples antes de seguir por esse caminho aí. Pois você vai dar de cara com banco de dados e isso é considerado bem complexo. Sobre criar a tabela, você pode fazer com guiCreateGridList. Sobre deixar o carro girando, você pode fazer com moveObject (usando os parâmetros de rotação, no eixo Z) junto com um setTimer pra ficar reiniciando essa rotação, fazendo o veículo continuar rotacionando eternamente. Sobre salvar o carro quando o player sair ou o servidor parar, é justamente com banco de dados. Mas se você tem coragem pra ir de cara e aprender banco de dados ("Porque aqui tem coragi"), eu sugiro este tutorial maroto:
    1 point
  31. He sold a bugged/broken gamemode and wont fix it. Too bad people still buying this piece of trash gamemode.
    1 point
  32. ايه صح صح و خاصة الcll الي عمري ما سمعت عنها بالله ذول لغات؟
    1 point
  33. يجب تتعلم لغة +cll و Console و Acl
    1 point
  34. Hali, ha jól sejtem, akkor amikor bemész az interiorba megváltozik a dimenziód és interiorod. Próbáld meg megváltoztatni az object dimenzióját és interiorját, a targoncájéra/a tiédre. function changeDimNInt(thePlayer, object) setElementDimension(object, getElementDimension(thePlayer)) setElementInterior(object, getElementInterior(thePlayer)) end Ehhez hasonlóan.
    1 point
  35. This script has been stolen from a server by taking the uncompiled client.lua from the client resources directory while playing there. As this happens to be my server, I took this opportunity to publish the script on community rather than having someone else show off with work that isn't theirs. Said server has been running this script for a couple of years already. You can download the resource at https://community.multitheftauto.com/index.php?p=resources&s=details&id=15749 now (open source). Topic locked because this practice isn't allowed on the forums Arabic translation (not by me): هذا السكربت تمت سرقته من السيرفر الخاص بي عن طريق سرقة ملف الكلاينت الغير مشفر من مجلد المودات أثناء اللعب هناك, وبالصدفة هذا السكربت خاص بسيرفري لذلك استغليت الفرصة وقمت بنشر السكربت في الكوميونيتي بدلاً من تظاهر شخص بعمل ليس له, هذا السكربت يعمل بالسيرفر لعدة سنين حالياً https://community.multitheftauto.com/index.php?p=resources&s=details&id=15749 : ( تحميل السكربت ( مفتوح المصدر .هذا الموضوع مغلق لأن هذا التصرف ممنوع في المنتدى
    1 point
  36. Már a stílusból látszik ki tartozik abba a csoportba aki miatt romlik a színvonal. 'érdeklődés' címszóval kötekszel egy olyan topicban ahol valaki segítséget kér. Tökéletesen visszaadod az igazi magyar mentalitast. Honnan tudod te azt, hogy neki milyen képessége vagy milyen anyagi háttere van? Honnan tudod azt, hogy mi a terve? Miből gondolod, hogy 1500 forintos vpsen futtatná a szervert? Információ hiányában vagy barátom és ennek ellenére ítélkezel. Véleményed lehet, semmi gond nincsen azzal de ha nem építő jellegű akkor miért húzod le a masik embert? De te bizonyára az élet minden területén a toppon vagy es soha nem volt szükséged más ember szakertelmére.
    1 point
  37. Nem értem, hogy miért jön ide kötekedni láthatóan rosszindulatból egy olyan ember akinek láthatóan súlyos értelmezési problémái vannak. Ha el tudná készíteni azt a projectet amit eltervezett akkor nyilván nem jönne ide és nem keresne embereket. Mit tesz hozza a projekthez? Leirta, hogy pénzbeli juttatásokat. Tudod ez így működik, van egy adott terv amihez olyan tudás szükséges amit jelenleg nem birtokol ezért fizet másnak érte. Nem is értem, hogy miért kell idejönni és kötekedni egy olyan emberrel aki segítséget kér es lehetőséget biztosít másoknak is akik ezzel foglalkoznak. Gondolkozz el ezen egy kicsit mert pont az ilyen mentalitas es hozzaallas miatt ennyire rosz a magyar community. Tovabbi szép napot
    1 point
  38. Já tinha suspeitado, mas agora que já se entregou, vou te dizer uma coisa: Você que escolhe - se quiser criar outras contas pra fugir da punição na conta original vai ser pior pra você. Se optar por obedecer as regras, não fazer mais spam no fórum e saber se comportar não vai levar mais punições; e agir corretamente será bom pra você, mas se continuar infringindo as regras será banido do fórum e isso também pode gerar em um ban global. A escolha é sua.
    0 points
  39. Sim, posições relativas, tinha até esquecido de mencionar elas. E as labels vai dar trabalho mesmo, a alternativa seria utilizar guiCreateFont e calcular o tamanho certo para a resolução, mas com GUI pra ser sincero nunca testei.
    0 points
  40. @OverKILL Nesse caso teria que ajustar o painel proporcionalmente com a resolução, ou seja, ajustar as 4 posições: X, Y, Largura e Altura. Edit: E pra fazer isso pode ser muito trabalhoso, especialmente se for em um painel com vários childs, você terá que fazer de modo que os 'childs' fiquem com a mesma proporção em relação à janela principal.
    0 points
  41. Tutorial em vídeo é outra coisa, e ainda bem editado e explicado. Ficou show, continue com os tutoriais.
    0 points
×
×
  • Create New...