Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/03/19 in all areas

  1. من حوالي 10 ايام شريت خادم لينكس من هوستينجر والان لا احتاجه 8 جيجا رام 160 مساحة جيجا ودومين كذالاك لا اريده vpsomar.com رابط لوحة panel.vpsomar.com شريته بسعر 550 دولار والي مو مصدق يروح يشتري خادم من هوستينجر راح يلاقي سعر اعلا خطه لمدة سنه بي 550 دولار سبب البيع انا لم اعد مهتم بي mta sa سعر البيع معروض 100 دولار فقط انا خسران عليه جدا لذالاك ساعدوني
    1 point
  2. Sim. @Laluis23 Lembre-se de usar o comando /debugscript 3 in-game da próxima vez.
    1 point
  3. Me parece que tem uns end a mais ali na função 'adminchat'
    1 point
  4. Você também pode usar a função SetClipboard para copiar o texto diretamente, dai o cara só cola no navegador usando CTRL + V e done.
    1 point
  5. That is correct, thank you for your assistance
    1 point
  6. Obvious, at the place where you want to use a timer. It is your code, you know that best.
    1 point
  7. @MaligNos desculpe, funcionou sim, eu que estava testando com o freeroam ligado .-. Muito obrigado pela ajuda.
    1 point
  8. addCommandHandler outputChatBox
    1 point
  9. Sim, é isso mesmo. Porém tem que verificar se o tipo de dano é por afogamento ou não. Caso contrário o jogador fica imortal enquanto estiver na água. (n morre nem com tiro) No evento onPlayerDamage tem o parâmetro attackerWeapon, que também representa o tipo de dano que o jogador está tomando.
    1 point
  10. Faça o valor antes do texto. /olx 40000 carro sem doc function adminchat (thePlayer, _, valor, ...)
    1 point
  11. Sim. IsElementInWater -- Verifica se o jogador esta na água. GetElementModel -- Verifica a skin que o jogador está. CancelEvent -- Cancela o dano que você ira tomar. Acho que é isso.
    1 point
  12. I want to see the ped dead i don't know how help guys
    1 point
  13. then you should start with an array structured table and create and object structured table afterwards. Start with an array structured table. local tableTestArray = { {key = "Room1"}, {key = "Room2"}, {key = "Room3"}, {key = "Room4"} } local tableTestObject = {} for i=1, #tableTestArray do tableTestObject[tableTestArray[i].key] = tableTestArray[i] end This allows you to access the data with multiple ways. access to ipairs (loop in order) --> tableTestArray access to # (item count) --> tableTestArray access with "Room1" --> tableTestObject NOTE: the sub tables are LINKED between: tableTestArray <> tableTestObject They are the same.
    1 point
  14. ipairs loop only works an array structure tables. indexes: 1,2,3,4 The # only works for array structured tables. But yours is an object/custom structured table. indexes: 'Room1', 'Room2', 'Room3', 'Room4' And for that you need the pairs loop function getTableCount(thisTable) local count = 0 for k, v in pairs(thisTable) do count = count + 1 end return count end local count = getTableCount(tableTest) @Overkillz
    1 point
  15. As far as I know these settings are only used for sync element orientations. p.s you might also reduce data like this: function onClientPlayerDamage(attacker, weapon, bodypart, loss) local newHealth = getElementHealth(localPlayer) if newHealth > 0 then -- is not dead local oldHealth = newHealth + loss setElementHealth(localPlayer, oldHealth) -- reset else -- is dead cancelEvent() triggerLatentServerEvent("onPlayerDamage_", localPlayer, attacker, weapon, bodypart, loss) end end addEventHandler("onClientPlayerDamage", localPlayer, onClientPlayerDamage) p.s this might also be needed serverside. addEvent("onPlayerDamage", false) --remote disabled
    1 point
  16. والله ممتاز بدون كذب لو تسويلي ماب مثل كذا ل mta نسوي فيه بابا نويل وهو يجر عربته
    1 point
  17. setElementVisibleTo(blip[player], root, false) for _, teamMember in ipairs (getPlayersInTeam(playerTeam)) do setElementVisibleTo(blip[player], teamMember, true) end
    1 point
  18. Hi all! Recently I started playing again and of course I started mapping again I got bored by the default vehicles so I challenged myself to create a map with a towtruck! Download link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=15924 Subscribe to Pewdiepie: https://www.youtube.com/user/PewDiePie Music: Intro: Kerli - Legends Map: Lemaitre - Smoke
    1 point
  19. Esse timer de mais de 1 hora e meia não é bom. Para casos de longos períodos de tempo, usa-se timestamp.
    1 point
  20. I think you first need to learn what table index's and table keys are, @MissionComp. Table index's are the positions inside the table, and using such index can allow you to grab things from a specific spot in the table. Index's go up from 0, and they go to like an infinite amount. Say you have a table: local t = {} Now lets put something in the table: table.insert(t, 'Hello World') Okay so we've put a string that says Hello World into the table. Now the table looks like this, without you having to recreate it again: t = {'Hello World'} So now that we have a value in there I can explain how index's work. Since the tables index starts at 0, as soon as you put an item in it, the index count goes up. So now, 'Hello World' has an index of 1 in the table. To call this you do: t[1] Here is an example of using this: outputChatBox(t[1]) t = {position1, position2, position3, etc} t = {index1, index2, index3, etc} I wont cover keys because I don't really need to but I will cover loops. When you use the function getElementsByType, it returns a table, that table contains elements. You can look up a list of elements on MTA's Wiki, I'll post a link below. You use this function to get a table of all the elements of the specified type. Say we get the players in the server for example: local t = getElementsByType('player') Each player is put into a table, and the index simply is the position inside the table where a specific player is. So say you only wanted the 4th player in the server: local t = getElementsByType('player') killPed(t[4]) and then we would kill that player. #table just returns the amount of items in a table So say we wanted to get the amount of players in the server: local t = getElementsByType('player') print(#t) So now onto loops. There are two types of loops, a pairs loop and an integer loop. The difference between a pairs loop and an integer loop is simple. An integer loop simply goes from one number to another, basically counting up, or down if you will. A pairs loop actually runs through a table and returns its data in defined variables. Example of an integer loop: for i=1, 5 do this will go from 1 to 5, in like a count-up. i is your defined variable that you use to get what number it is on. for i=1, 5 do print(i) end so this would print: 1 2 3 4 5 An example of using this would be local t = {'hello', 'world'} for i=1, #t do print(t[i]) end this would print: hello world Example of a pairs loop: for i, v in pairs(getElementsByType('player')) do Inside of the pairs function would go your table, i becomes your index and v becomes your value/item, this returns both and they will always match each-other, so here's an example of using that: local t = {'hello', 'world'} -- and you can use either the index method shown above or use v for i, v in pairs(t) do print(v); print(t[i]); end I wasn't going to go through and fix the code I give you because I honestly expected it to work. So I figured I'd teach you and other people something, in hopes that you can solve the issue yourself. I hope that this response helps you and I wish you a good day. Page to MTA SA Element List: Element
    1 point
  21. function onClientPlayerDamage(...) cancelEvent() triggerLatentServerEvent("onPlayerDamage_", localPlayer, ...) end addEventHandler("onClientPlayerDamage", getLocalPlayer(), onClientPlayerDamage) addEvent("onPlayerDamage_", true)-- fake event onPlayerDamage_ = security addEventHandler("onPlayerDamage_", root, function (...) triggerEvent("onPlayerDamage", client, ...) end) It can be faked, but you might need to figure out a way to reduction data. @majqq For example buffer up till 100 ms, before sending the message This will reduce a lot in case of fire/minigun/Spraycan/Fire Extinguisher damage: (NOTE: surprisingly the minigun also fires a bullet every frame) How much reduction do you want for that scenario? Do the maths! local sendingDelay = 100 -- ms local fps = 60 local timeSlice = 1000 / fps local dataReduction = sendingDelay / timeSlice print("~" .. (dataReduction - 1 ) .. " x times LESS per " .. sendingDelay .. "ms") https://www.lua.org/cgi-bin/demo
    1 point
  22. مالقيت وقت افكر فيه ف شفت ذا الوقت مناسب وقعدت افكر
    1 point
  23. بعد تفكير طويل امتدا ل 5 دقائق اتخذت القرار الصحيح الا وهو حب ديستروير
    1 point
  24. fileRead https://wiki.multitheftauto.com/wiki/FileRead fileWrite https://wiki.multitheftauto.com/wiki/FileWrite Examples are already included on the WIKI. Enjoy!
    1 point
  25. Sobre la distinción entre cliente y servidor, puede que en un comienzo parezca confusa, pero resulta más clara si lo piensas como un sitio web: Por un lado tienes la página web (el front-end) en que es visible toda la interfaz con la que el usuario puede interactuar, mientras que "detrás" tienes el servidor (back-end) que puedes pensar como un cúmulo de información disponible para todos los usuarios. Entonces, el cliente es una suerte de caja cerrada a la que otros clientes no pueden acceder directamente. Si el ejemplo no es claro, la distinción está mejor explicada acá: https://www.cloudflare.com/learning/serverless/glossary/client-side-vs-server-side/ En tu caso, la recomendación general es que el dinero de los usuarios se asigne en el lado del servidor, para esto puedes utilizar setPlayerMoney. Por último, sin ánimos de remarcar lo evidente, notarás que existen diferentes sintaxis en algunas funciones, dependiendo de si se utilizará en el lado del cliente o del servidor, por lo que sugiero prestar atención a la documentación de la wiki para evitar problemas relacionados a ello.
    1 point
  26. Comece pelo dicionário mesmo.
    1 point
  27. Szerintem használd inkább a smoothMoveCamerat itt a mozgás is benne lesz mikor lefut és szebben is néz ki Kliens oldalra be kell ezt illeszteni: local sm = {} sm.moov = 0 sm.object1,sm.object2 = nil,nil local function removeCamHandler() if(sm.moov == 1)then sm.moov = 0 end end local function camRender() if (sm.moov == 1) then local x1,y1,z1 = getElementPosition(sm.object1) local x2,y2,z2 = getElementPosition(sm.object2) setCameraMatrix(x1,y1,z1,x2,y2,z2) end end addEventHandler("onClientPreRender",root,camRender) function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) if(sm.moov == 1)then return false end sm.object1 = createObject(1337,x1,y1,z1) sm.object2 = createObject(1337,x1t,y1t,z1t) setElementAlpha(sm.object1,0) setElementAlpha(sm.object2,0) setObjectScale(sm.object1,0.01) setObjectScale(sm.object2,0.01) moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") sm.moov = 1 setTimer(removeCamHandler,time,1) setTimer(destroyElement,time,1,sm.object1) setTimer(destroyElement,time,1,sm.object2) return true end Használat + példa: smoothMoveCamera ( float x1, float y1, float z1, float x1t, float y1t, float z1t, float x2, float y2, float z2, float x2t, float y2t, float z2t, int time ) smoothMoveCamera (-1527.97180, -259.88281, 14.34688, -1555.83667, -203.45720, 19.37344, -1661.17383, -168.68188, 19.37344, -1632.46838, -138.43019, 19.37344, 8000) Leállítás: function kameraMozgasLeallitas() removeEventHandler("onClientPreRender",root,camRender) end Funkción belül csak simán meghívod ezt a kameramozgasleallitas funkciót és le is állt és vissza ugrott a játékosra
    1 point
  28. Pra criar um scripter, vc primeiro precisa ensinar alguém programação, dai ele pode se tornar um scripter. Pra criar um script, dai vc primeiro precisa aprender lógica de programação e algorítmos. Recomendo estas videoaulas: https://www.youtube.com/watch?v=M2Af7gkbbro&amp;list=PLHz_AreHm4dmSj0MHol_aoNYCSGFqvfXV&amp;index=2&amp;t=20
    1 point
  29. م اقدر اعدل الموضوع بعد تحديث المنتدى
    1 point
  30. #النشيد الشكوبيستاني مطرجم بالعربية : شكوبيستان شكوبيستان شكوبيستان لا شمة لا دخان لا فتية لا نسوان نذبح نسلخ كالشجعان فداءا فداءا فداء وكلنا فداءا للسلطانة رزان لا مصر لا عمان لا سعودية لا إيران فلسطين ، السودان وتحيا شكوبيستان نحن أسود الكون نحن لا نخشى من تكون في زطلستان نديرو الهول الإسلام ديننا الغبريطية لغتنا إسرائيل عدونا غزة هدفنا القدس حبيبتنا عاشور العاشر ملكنا ابدا لا نيأس ابدنا لن نرجع ابدا لن نفشل شكوبيستاني وفحل من مجاعستان الى افغانستان ومن السياحستان الى الشيشان سنجعلها تحت أقدام شكوبيستان انظر يمينك زدها شمالك ستلقى جيوش دحمنيوس منتشرا كالناموس قوة فتوة عزيمة شرسة أسود أسود حمر شرسة نسور كسرة الجو لنا البر لنا و لنا البحار جميعنا نتحد بأخوة باليد والقلب ويحيا وطني شكوبيستان اعوذ بالله من هالامثال ذولا
    1 point
×
×
  • Create New...