Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/04/20 in all areas

  1. Você está usando um variável pra definir a imagem do botão antes de dar um valor pra ela, imagino que a imagem deva começar como pause, então na lógica deverá ser assim. button = "img/pause.png" --estou definindo inicialmente como pause, caso seja o contrário, é só mudar o nome da imagem, dxDrawImage(x*1803, y*52, x*50, y*50, button, 0, 0, 0, tocolor(255, 255, 255, 255)) addEventHandler('onClientClick', root, function (button, state, _, _, _, _, _, element) if isMouseInPosition(x*1803, y*52, x*50, y*50) then if button == "img/pause.png" then button = "img/play.png" setSoundPaused(sound, true) elseif button == "img/play.png" then button = "img/pause.png" setSoundPaused(sound, false) end end end) importante que já que é um variável só dar um valor inicial, deva ficar no topo fora de de uma function
    2 points
  2. Images Blueberry TownHall V2.0 - Added "vgElkup" and "tall_fence" as floor and walls as the building itself had no collisions. - Added a few "smashbar" as parking. - Added "cem01_law" as main building. - Added x3 "vegasflag02" as flags for environment. - Added decor. - Other... Download Credits: rtkpX
    1 point
  3. This quickguide covers how you can remove objects like night lights and wires. SAMP editor method To install SAMP editor, simply drag and drop the packaged contents into your GTA SA installation. Run the application. https://www.moddb.com/downloads/san-andreas-multiplayer-map-editor Code for removing object in video removeWorldModel ( 16745, 1, 392.9141, 1511.5625, 21.5859 ) ^This is for the script.Lua file <meta> <script src="script.Lua" type="server" /> </meta> ^This is for the meta.xml file For those who want to load it into a .map file, the below code can be edited with your coordinates, ID and radius. <removeWorldObject id="removeWorldObject (objectname) (1)" radius="100" interior="0" model="9934" posX="-1724" posY="765" posZ="24" rotX="0" rotY="0" rotZ="0"></removeWorldObject> ^This is for the .map file if you rather use map editor format Note: SAMP editor doesn't want to run if MTA (gta exe) is already running. Therefore you'll want to add SAMP editor into a separate gta sa installation. I use 3 (1 for playing, 1 for samp editor, 1 as clean backup) on my PC. This requires 12gb disk space. This lets you boot up MTA and SAMP editor without conflicting issues. Prineside method Prineside is a site containing IPL and IDE information about objects, it also serves a GTA map with position pinpoint functionality, allowing you to get the object ID easily by clicking a spot in the map. Use Prineside's Model search by location to pinpoint the location closest to the object of interest. This generates a list of objects within 500 meters from the pin, closest to farthest. Clicking an object page gets you its object name and ID. At the bottom of an object page you can get the position export. Repeat the steps from SAMP editor method for adding the coordinates to the code. Transcluent/transparent objects like shadows, telewires and small flowers may not have any clear thumbnail, in which case it's actually easier to spot them as they're the ones with an empty thumbnail. https://wiki.multitheftauto.com/wiki/RemoveWorldModel https://dev.prineside.com/en/gtasa_samp_model_id/
    1 point
  4. خلاص شباب صلو ع النبي انتو اكبر من كدا وبعدين احنا داخلين ع شهر مفترج المفروض نسامح ونحب بعض مش نزعل من بعض بسبب اشياء تافها وقفلو الموضوع لحد يعمل مشكله وكل عام وانتم بخير
    1 point
  5. @ايهاب صمم ماب زيه وانا اعطيك كود الكرة اذا حاب تفتح كرة سيارات عربي
    1 point
  6. Спасибо бро! Люблю и уважаю тя
    1 point
  7. function VehEnt(theVehicle, seat) if(getElementModel(theVehicle) == 411) then addEventHandler("onClientRender", root, Target) end end addEventHandler("onClientPlayerVehicleEnter", localPlayer, VehEnt) function VehExt(theVehicle, seat) if(getElementModel(theVehicle) == 411) then removeEventHandler("onClientRender", root, Target) end end addEventHandler("onClientPlayerVehicleExit", localPlayer, VehExt)
    1 point
  8. só vc fazer uma variavel no lugar do local da sua imagem no caso eu coloquei como button dxDrawImage(x*930, y*20, x*55, y*50, button, 0, 0, 0, tocolor(255,255,255, between[5]), false) ai eu fiz uma condição que se tiver play e ele clicar na posição e o button tiver em play ele seta pra pause e seta o som como pause e vice e versa
    1 point
  9. مدري كيف فاتني هالموضوع توي اشوفه? المهم بكتب اسمائهم بالعربي اسهل ? تابل , سورا , عناد ,بسول , احمد فيف , الوحش , برستيج , مستر سعد ,, نصور , ويزراد , مدير2014, لوس ,عبد الكريم , ولا قصور بالباقيين لكن هذول من أكفأ المبرمجين من 2009 الى الآن والمبرمجين الجدد فيهم الخير والبركه لكن القدامى كانو شادين حيلهم اكثر?
    1 point
  10. Hi Ein, I'm Danya))) I think you remember me))) I found a bug on endless ammunition on sniper weapons. during reloading, you just need to click on the scope and select another weapon) https://youtu.be/pzy1bsLf_Ys
    1 point
  11. * الرجاء عدم الإحراج وطلب السكربت ^
    1 point
  12. سيرفر زومبي مستحيل نجح في هذا الوقت , إلا اذا كانت أفكار ما تكررت وأفكار سفاحة . المودات الي فوق مودات عادية ما اشوف فيها شيء يحمس . غير هيك , إذا بدك تتميز بسيرفرك تسوي قيم مود من جديد , وتحاول تطور القيم مود و الزومبي تطورهم وإلخ . ولازم تكون في فعاليات , مسابقات , تحديات .. غير هيك ما ينفع تفتح سيرفر تجي ثالث يوم تسكره .. لازم تستمر بالسيرفر أقل شيء ثلاث أشهر , و اذا ما نجح سكرهـ بعدين ... إذا تضل تفتح سيرفرات وتكرر هذي الحركة ما حد يخش سيرفراتك بعدين , لو كان ازعم سيرفر باللعبة لانك تضيع تعب اللاعبين , و الوقت اللي استغقرقوه وهم يحملو بالسيرفر .. والإهتمام بالتنسيق أيضا , ما في تنسيق بموداتك أبداً .. لوحات ب جيو ولوحات ب دي جي اس , حتى ألوان ما عرفت تنسق .
    1 point
  13. Bueno, os explico estoy intentando hacer un sistema en entornos en mi servidor pero tengo 2 problemas y son los siguientes : No detecta la ID y el texto, la ID se inserta en la base de datos pero el texto no. Espero que puedan ayudarme, gracias. local elements = { } local function loadText( id, text, x, y, z, interior, dimension ) local element = createElement( "3dtext" ) setElementPosition( element, x, y, z ) setElementInterior( element, interior ) setElementDimension( element, dimension ) setElementData( element, "text", tostring( text ) ) elements[ id ] = element end addEventHandler( "onResourceStart", resourceRoot, function( ) local result = dbPoll(dbQuery(handler, "SELECT * FROM 3dtext ORDER BY textID ASC" ),-1) if result then for key, data in ipairs( result ) do loadText( data.textID, data.text, data.x, data.y, data.z, data.interior, data.dimension ) end end end ) local function createxto(player,cmd,textID,...) if GetElementData(player,"NivelAdmin", 5) then local text = table.concat( { ... }, " " ) local x, y, z = getElementPosition( player ) local insertid = dbExec ( handler, "INSERT INTO `3dtext`(`text`, `x`, `y`, `z`, `interior`, `dimension`) VALUES (?,?,?,?,?,?)", text, x, y, z, getElementInterior( player ),getElementDimension( player ) ) if insertid then loadText( insertid, text, x, y, z, getElementInterior( player ), getElementDimension( player ) ) outputChatBox( "Texto creado. (ID " .. insertid .. ")", player, 0, 255, 0 ) else outputDebugString( e ) outputChatBox( "Error MYSQL.", player, 255, 0, 0 ) end else outputChatBox( "Comando: /" .. cmd .. " [texto]", player, 255, 255, 255 ) end end addCommandHandler("creartextoentorno",createxto) En el debugscript me da el siguiente error : Que en la línea 37 : attempt to concatenate local 'insertid' (a boolean value) Y así es como se crea : https://imgur.com/2Je5B9T
    1 point
  14. Increible el servidor y increibles ustedes, les deseo muchisima suerte con el servidor , y el texto "Si alguno de nuestros sistemas te gustan o te gustaría tener algo parecido en tu servidor, estoy a tu servicio para ayudarte de manera gratuita, no dejemos que la poca comunidad de este juego muera, creemos competición sana a base de méritos.¡No tengas pena en contactarme! Hagamos lo posible por mantener una comunidad libre de toxicidad" Me dejo impresionado ya que teneniendo un servidor desean ayudar a otra gente gratuitamente. Le veo mucho futuro a vuestro servidor y os deseo lo mejor. ? ATT : Homer Simpson
    1 point
  15. Está iniciando seu servidor ou começando scripting no MTA? Aqui será listado tudo o que você precisa para aprender desde configurar seu servidor, ACL, colocar resources, até aprender Lua no MTA e criar scripts para modificar o jogo por meio da programação. Se você é totalmente leigo no assunto você também verá links que irá te introduzir no nível básico da programação, basta ter o mínimo de esforço e acompanhar os tutoriais aqui mostrados. Se você já têm uma noção de programação, encontrará tutoriais que irão te ajudar a se aprofundar na programação Lua e ter uma boa experiência de Scripting no MTA. Informações relacionadas ao MTA Se você busca configurar corretamente o seu Servidor e entender como as coisas funcionam, estes links serão de grande ajuda: Links traduzidos para português Manual do Servidor ACL - Lista de Controle de Acesso Resources (ou Recursos) - O que são? O arquivo meta.xml Quer programar scripts? Acompanhe este links: Nota: Se você é um iniciante na programação veja também os tutoriais para iniciantes em: Iniciando na programação Introdução a Scripting no MTA (link útil) Programar GUI no MTA Depurando seu código Programação e a linguagem Lua Iniciando na programação: Vídeo - Introdução a Algoritmos Introdução aos Algoritmos Vídeo - Lógica de programação Programação Lua: Conheça a linguagem Lua Manual de Referência de Lua 5.1 Playlist - Programando em Lua (vídeo) Playlist - Curso de programação em Lua (vídeo) Introdução à linguagem de programação Lua Teaching-lp seminario-Lua PDF Outros links (em inglês): Lua.org Lua wiki www.tutorialspoint.com/Lua Lista de tutoriais e manuais Lua Sub-fórum - Tutorials E também: Tutoriais: sub-fórum da seção Portuguesa Editores para programar e Ferramentas Com plugins/extensões do MTA disponíveis: - Notepad++ | Plugins do MTA - Sublime Text | Plugins (Atualizado: link) - Visual Studio Code | Extensões: MTA:SA Lua Debugger: MTA:SA Debugger and Test Framework - Atom Editor | Plugins Sem plugins do MTA: - ZeroBrane Studio - IntelliJ IDEA - Eclipse - Decoda Lua IDE Também: Lua for windows | GitHub
    1 point
  16. It's official, MTASA has been bought and we are becoming SAMP. Future MTASA builds will be closed source and half the features removed. Have a nice day!
    1 point
  17. Once you understand the basics of variables, functions, debugging, tables and loops, the only thing that is your way is your mental model and your creativity. Which is something that has to grow over time. The fastest way to get at an higher level is to know exactly what your code does, which is achieve able by debugging (or lots of reading). So for example this code looks complex: (useless code btw) thisTable = {"randomStuff", [20] = "randomStuff", "randomStuff", [30] = "randomStuff"} function functionName (parameter1, parameter2) local newTable = {} for i=1, 30 do newTable[#newTable + 1] = (parameter1[1] or "nothing here") .. " | " .. math.random(1000) .. " | " .. parameter2 end return newTable end local result = functionName (thisTable, "text") Adding debug lines: thisTable = {"randomStuff", [20] = "randomStuff", "randomStuff", [30] = "randomStuff"} iprint("thisTable:", thisTable) -- show table structure function functionName (parameter1, parameter2) iprint("parameter1:", parameter1, ",parameter2:", parameter2) local newTable = {} iprint("newTable:", newTable) local countLoops = 0 for i=1, 30 do iprint('What does >(parameter1[1] or "nothing here")< do? ', (parameter1[1] or "nothing here")) newTable[#newTable + 1] = (parameter1[1] or "nothing here") .. " | " .. math.random(1000) .. " | " .. parameter2 countLoops = countLoops + 1 end iprint("Loop has executed:", countLoops, "times.") return newTable end iprint("functionName:", functionName, ", type value:", type(functionName)) local result = functionName (thisTable, "text") iprint(result) -- show end result But after debugging: (You have to do that yourself, post result please. Which is automatic your motivation towards me.)
    1 point
  18. ان شاء الله فكرتك بتنجح بس اشرح الفكره بشكل كامل
    1 point
  19. Have fun scripting, and read my explanation! function formatTimeFromMinutes(value) if value then local weekday = math.floor(value / 1440) local value = value - ( math.floor(weekday) * 1440 ) local hours = math.floor(value/24) local value = value - ( math.floor(hours) * 24 ) local minutes = math.floor( value ) weekday = ("%02"):format(tostring(math.round(weekday))) hours = ("%02"):format(tostring(math.round(hours))) minutes = ("%02"):format(tostring(math.round(minutes))) value = weekday.. ":" ..hours .. ":" .. minutes return value end return false end --[[ MATH EXPLANATION Eg time: 1764 weekday = 1764 / 1440 = 1.225 math.floor(weekday) = 1 value = value - weekday(1) * 1440 -> Remove correctly value = 324 hours = 324 / 24 = 13.5 math.floor(hours) = 13 value = value - hours(13) * 24 -> Remove correctly value = 324 - 312 = 12 minutes = value --> Remaining is minutes Result = 1 Day : 13 Hours : 12 minutes ]]
    1 point
  20. Claro, dime una parte por donde poder hablar y te ayuda encantadamente.
    0 points
  21. ¿Alguien que sepa de paradise, sabe si se puede poner una imagen en el scoreboard? Es porque llevo intentadolo con dxDrawImage y no funciona. { type = "label", text = "In my World", prueba = dxDrawImage( "images/gui/info.png", 0, 0, 0, tocolor( 255, 255, 255, 255 ), true ), scale = 0.6, alignX = "center", }, No manejo mucho de scripting y ando escaso de dinero porque si no lo pagaría sin problemas el script, agradezco todas respuestas. PD : Uso paradise de mabuko
    0 points
×
×
  • Create New...