Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 26/04/19 in all areas

  1. Mesma dúvida que esse cara: Parecem até a mesma pessoa. Bem suspeito isso ae.
    2 points
  2. The old server called one life have reopened and it's ready for players to join and have fun OneLife - Survival DayZ [MTA] What is OneLife? OneLife is an MTA community, We want to offer our players the full fun, which is why we have a dedicated team for each of our projects. However, I'll tell you something about our DayZ server now Dayz Features: The login system: The first thing every player sees from a server is, of course, the login system. To give our players a change, we have added a completely different login system on our server which differs from the other unedited DayZ scripts. The Spawns: You spawn with us in newly added Various Spawns on the map. In the inventory, you will find some start items that may guide you through this difficult time. Money: On our server, you have the opportunity to earn money by killing zombie's and players. Trading: By earning money you also have the opportunity to exchange items and vehicles with players. This is usually done in the safe zone as this is the safest place. The Safezone: If you need peace and quiet from the whole survival, the Safezone is just right for you. There you can relax and just enjoy the peace and quiet. There are actually always players to be found, which, however, can neither shoot nor aim. In Safezone, your survival time and your existing blood do not go up or down Of course, you are safe there from the birth of hell. Custom Map: On our server, we have a lot of own mapping. In addition to the normal "reconstruction work" to a destroyed world. And much more: In addition to the listed features, there are still many more to explore! How can you see it all? Very easily! Trust in us and try your luck in the wilderness between zombies, bandits, animals and heroes! HOW DO YOU REACH US ?: You can only reach our game server with the MTA client The IP is as follows: mtasa: //192.99.197.9: 22013 You can reach our Discord at: discord.gg/EqGhKpD In the end, I thank you for your attention. I hope I see some of you in the game soon.
    1 point
  3. E eu olhando o código 30 vezes, espalhei print pra depurar e nada de retornar, retornava false e nil toda hora dai olhei o script de export e vi que nem era necessario o export aoksaspos, acontece.
    1 point
  4. Muito provavelmente getPlayerID recebe como argumento o player e retorna o ID, e ali você está passando a variável playerid, que inclusive nem foi declarada... era apenas trocar por thePlayer: local playerID = exports["[PRS]ID_System"]:getPlayerID(thePlayer) Mas como já mencionado pelo @Jonas^, como seu sistema de ID já armazena com setElementData, a chamada na função exportada pode ser evitada.
    1 point
  5. Neste caso não é necessario usar export, faça assim: function chamarPolicia (thePlayer, cmd) outputChatBox ("Você chamou os policiais com sucesso, aguarde.", thePlayer, 0, 255, 0) -- Avisa o jogador que usou o comando que a chamada foi efetuada com sucesso. local idPlayer = getElementData (thePlayer, "ID") -- Data que contém o ID do jogador do script de 'ID'. for k, player in ipairs (getElementsByType("player")) do -- Para cada jogador que está na ACL Group "ComandosPolicia", faça: if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount(player)), aclGetGroup ("PoliciaComandos")) then -- Se o jogador estiver na ACL "ComandosPolicia", então: outputChatBox ("#2E2EFE190: #848484Cidadão ID "..tonumber(idPlayer).." #bebebeChamou a Polícia, atenda o chamado!", player, 255, 0, 0, true) -- Os policiais iram receber a denúncia. end end end addCommandHandler ("190", chamarPolicia)
    1 point
  6. Pode me enviar o seu ID system via privado pra mim testar? Tente assim antes: function chamarPolicia (thePlayer) local playerID = exports["[PRS]ID_System"]:getPlayerID(tonumber(playerid)) outputChatBox ("Você chamou os policiais com sucesso, aguarde.", thePlayer, 0, 255, 0) -- Avisa o jogador que usou o comando que a chamada foi efetuada com sucesso. for k, player in ipairs (getElementsByType("player")) do -- Para cada jogador que está na ACL Group "ComandosPolicia", faça: if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount(player)), aclGetGroup ("PoliciaComandos")) then -- Se o jogador estiver na ACL "ComandosPolicia", então: outputChatBox ("#2E2EFE190: #848484Cidadão ID "..playerID.." #bebebeChamou a Polícia, atenda o chamado!", player, 255, 0, 0, true) -- Os policiais iram receber a denúncia. end end end addCommandHandler ("190", chamarPolicia)
    1 point
  7. Tire o local da variavel do playerID playerID = exports["[PRS]ID_System"]:getPlayerID(tonumber(playerid))
    1 point
  8. Sabe aquele script de acl que você estava com dúvida a uns 2 dias atrás? poste o meta dele aqui pra mim ver uma coisa.
    1 point
  9. debugscript 3 retorna algum erro? já conferiu se o sistema de id esta ativo?
    1 point
  10. Mande o código via pastebin para mim que eu retiro.
    1 point
  11. Precisa exportar sim, ele usa um sistema de ID personalizado pra RP
    1 point
  12. Deberías utilizar la función client-side onClientPedDamage (https://wiki.multitheftauto.com/wiki/OnClientPedDamage) y comprobar ya sea con tablas o elementData si el jugador tiene el comando activado para quitar daño.
    1 point
  13. bindKey("L","down","chatbox","say");
    1 point
  14. function chamarPolicia (thePlayer) outputChatBox ("Você chamou os policiais com sucesso, aguarde.", thePlayer, 0, 255, 0) -- Avisa o jogador que usou o comando que a chamada foi efetuada com sucesso. for k, player in ipairs (getElementsByType("player")) do -- Para cada jogador que está na ACL Group "ComandosPolicia", faça: if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount(player)), aclGetGroup ("ComandosPolicia")) then -- Se o jogador estiver na ACL "ComandosPolicia", então: outputChatBox ("190: Cidadão ID "..id.." #bebebeChamou a Polícia, atenda o chamado!", player, 255, 0, 0, true) -- Os policiais iram receber a denúncia. end end end addCommandHandler ("190", chamarPolicia)
    1 point
  15. It's working bro. hidescript.zip
    1 point
  16. Sim, ele vai chamar o cancelEvent local, mas do que adianta se no corpo da função ele vai mandar ao cancelEvent externo ? Testando seu exemplo, eu consegui entrar no veículo e a função maliciosa foi executada. Testei aqui, ela some do _G também, mas apenas para o resource que efetuou a ação. Verdade, realmente pode ser utilizada! É que o uso do setfenv coincidiu com um trecho de fileRead+loadstring que acabou gerando: "Unsafe function was called".
    1 point
  17. Hi Add some features in admin panel V2 features : 1- ability to edit bullet_sync , player_sync_interval and keysync_mouse_sync_interval values from admin panel 2- ability to protect the server owner from ban , mute , kick and remove his user from ACL 3- A new GUI for edit ACL.xml like this :
    1 point
  18. That's weird... the code is right. Are you typing the command after you get logged in?
    1 point
  19. function SetearDatas() local KD = getElementData(source, "KD") or 0 if (KD < 1) then setElementData(source, "ranking", "Bronze") --Bronce elseif (KD >= 1 and KD < 2.5) then setElementData(source, "ranking", "Silver") --Plata elseif (KD >= 2.5 and KD < 4) then setElementData(source, "ranking", "Gold") --Oro elseif (KD >= 4 and KD < 7) then setElementData(source, "ranking", "Platinum") --Platino elseif (KD >= 7 and KD < 10) then setElementData(source, "ranking", "Diamond") --Diamante elseif (KD >= 10) then setElementData(source, "ranking", "Master") --Challenger end end addEventHandler ("onPlayerLogin", getRootElement(), SetearDatas) function statsss () outputChatBox("Your rank is: ".. (getElementData (source, "ranking") or "None"), source,0,255,0) end addCommandHandler ( "statinfo", statsss )
    1 point
  20. Cuando iteras un elemento dx es importante el orden en que está establecido en tu código. Por ejemplo: -- La ultima funcion en iterarse va ser la que va a superponerse a la otra. addEventHandler("onClientRender", root, function() dxDrawImage(0, 0, 50, 50, "imagen.png", 0, 0, 0, tocolor(255, 0, 0, 255), false) dxDrawImage(0, 0, 50, 50, "imagen.png", 0, 0, 0, tocolor(0, 255, 0, 255), false) end ) En el caso de usar el argumento POSTGUI: -- La primera funcion en iterarse va ser la que va a superponerse a todas las demás que las siguen. addEventHandler("onClientRender", root, function() dxDrawImage(0, 0, 50, 50, "imagen.png", 0, 0, 0, tocolor(255, 0, 0, 255), true) dxDrawImage(0, 0, 50, 50, "imagen.png", 0, 0, 0, tocolor(0, 255, 0, 255), false) end ) Ahora con el caso de adaptarse DX Image a todas las resoluciones, al igual que con guiCreateStaticImage, puedes utilizar los porcentajes para que se adapten de igual manera que los static-image. -- Se busca la resolución. local sx, sy = guiGetScreenSize() -- Calcular las posiciones utilizando porcentajes. ejemplo: x=0.5, y=0.5 crea la imagen a partir de la mitad de la pantalla. dxDrawImage(sx * 0.5, sy * 0.5, sx * 0.3, sy * 0.1, "imagen.png") Una forma más accesible sería re definir la misma función dxDrawImage para que se adapte a los porcentajes sin realizar los cálculos uno y otra vez. -- Primero redefinir la función. _dxDrawImage = dxDrawImage local function dxDrawImage(x, y, w, h, ...) local sx, sy = guiGetScreenSize() return _dxDrawImage(x * sx, y * sy, w * sx, h * sy, ...) end -- Luego dibujar addEventHandler("onClientRender", root, function() dxDrawImage(0.5, 0.5, 0.05, 0.05, "imagen.png", 0, 0, 0, tocolor(0, 255, 0, 255), false) dxDrawImage(0.3, 0.5, 0.05, 0.05, "imagen.png", 0, 0, 0, tocolor(255, 255, 0, 255), false) -- Ya como vez no haces el calculo una y otra vez ya que está realizandolo directamente cuando llamas a la función. end ) Puedes utilizar las posiciones del static-image como guía para usarlos en dx-image.
    1 point
  21. Não sei se entendi bem, mas no memento em que eu crio aquela função local, isso vai tornar impossível modifica-lá por outro script sobrescrevendo, ela estará no mesmo escopo, no caso, no próprio script, será como uma função cancelEvent que não tem relação com das outras. Também dá, estando local ela só vai estar disponível no mesmo código mas ainda dá pra obtê-la com uma função Lua. Proteger desses métodos que mostramos aqui sim, nunca fiz algo do tipo mas você pode tentar fazendo uma versão que abrange todas funções do código e que tornam elas inacessíveis por funções sobrescritas (anulando variável/função na tabela Lua _G por exemplo), Ou utilizar loadstring + pcall para executar o trecho do código a ser protegido. Você também pode tentar fazer o código em seu próprio "ambiente", será mais fácil se você já tem uma noção de metatables + setfenv e outras demais funções. Obs: Também tem esta função do MTA que também pode vazar informações do código: https://wiki.multitheftauto.com/wiki/AddDebugHook (eu nunca testei então não sei dizer o quanto ela é eficaz). Edit Será que ainda dá pra acessar debug pela tabela Lua _G? Aí está algo a se testar... Edit² Na verdade essa função pode ser utilizada no MTA (isso até onde eu sei). -- Desculpem o excesso de quotes
    1 point
  22. @Dziugasc Indeed, that is not going to work. local skins = {7,124,69} local skinIndex = 1 function getSelectedSkin() local selectedSkin = skins[skinIndex] return selectedSkin end function updateToNextSkin () skinIndex = skinIndex + 1 if skinIndex > #skins then skinIndex = 1 end return getSelectedSkin() end function updateToPreviousSkin () skinIndex = skinIndex - 1 if skinIndex < 1 then skinIndex = #skins end return getSelectedSkin() end
    1 point
  23. No, they won't help you, i have understood you want to start a custom script when the player has logged in you will type your custom script codes inside a new function like this : outputChatBox("Welcome to server"); -- This function will start when the script has downloaded function out() -- but this function will not . outputChatBox("Welcome to server"); end and the script name will be : mycustomhud and file name will be : hud.lua so what do you need to do ? you need to put the function inside your meta.xml file like this : <meta> <script src="hud.lua" type="client" /> <export function="out" type="client"/> </meta> Then you will export the function to your login script, let us type a new code : addEventHandler("onPlayerLogin",root, function() triggerClientEvent("onClientLogin",source); end ); -- Client addEvent("onClientLogin",true); function onClientLogin() --So , now you will type the export code to get a message .. exports["mycustomhud"]:out(); -- This will output a chat message -- exports -- is export function -- mycustomhud -- is the name of your custom hud script -- out() is the function of the message in hud.lua file end addEventHandler("onClientLogin",root,onClientLogin); They were just examples. You can follow the steps and apply their in your scripts.
    1 point
  24. Or, you can put your code inside a new function and export it when you want to enable it .
    1 point
  25. Clientside scripts which have cache="false" will be not saved in player cache, but in RAM. So, still you can use them. I don't really understand you, can you be a more specific? You need to hide scripts/files or something else?
    1 point
  26. If you are about not downloading them for players you can use: <script src="script.lua" type="client" cache="false"/> In meta.xml
    1 point
  27. سلام عليكم ورحمة الله وبركاته سؤال بسيط , هل تملك مود texture-system لانه هاذا المود من صناعة اول قيمنق اتوقع مع التحديثاث الاخيره ان كنت تملك هاذا المود الاخير تحديث لانه يسمح لك بوضع مقطع متحرك علي احد الاشياء . مثل اعلان .. في الاخير شكرا لك . تقبل مروري : #iDonX
    1 point
×
×
  • Create New...