Jump to content

Leaderboard

Popular Content

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

  1. تفضل جرب .. -------------------------------* addEventHandler("onClientGUIClick",yourGridList, -- اسم القريد function ( ) local Row = guiGridListGetSelectedItem( yourGridList ) -- بدل اسم القريد ليست لاسم القريد حقك .. if ( Row ~= -1 ) then -- هنا يتحقق انه ضغط على الرو guiSetVisible(window___1,false) -- اسم اللوحة اللي بتنغلق .. guiSetVisible(window___2,true) -- اسم اللوحة اللي بتتفتح .. else outputChatBox( 'يـرجـة التـحـديـد مـن الـقـائــمــة .. #', 255, 0, 0, true ) end end ) -- اتمني تكون استفادت ^^ -- طبعآ الكود مجرب ^^ -- Bad___________Boy -------------------------------*
    3 points
  2. سلام عليكم ورحمة الله تعالى وبركاته كيفكم ياحلوين من زمان عنكم والله حبيت أخبر كل شخص يحبني .. إني راجع للبرمجة وراح انزل كل مود حصري بسويه بـ يدي ونقول ولكم باك يـ فخامة ؟؟
    2 points
  3. Eai pessoal blz? Então venho por meio desta compartilhar um pouco de conhecimento, fiz uma apresentação de slides sobre a lógica de programação para facilitar o conhecimento para qualquer um interessado, com exemplos fáceis e alguns exercicios. Você pode visualizar pelo site: http://pt.slideshare.net/Manawydan/logica-programar Criticas são bem vindas, e bom estudos para todos!
    1 point
  4. Aé né, acabei me esquecendo, obrigado pela correção
    1 point
  5. Sobre o 'resourceRoot' é a melhor forma que ele pode fazer, já que ele quer que execute a função apenas para as markers do próprio resource. Daí no caso ele pode fazer um if-elseif e criar o código numa só função. Já isso que você citou não vai acontecer já que a variável da marker estará num outro resource. Só daria esse conflito se fosse no mesmo script, e acredito que você não quis dizer isso, pois com 'resourceRoot' também vai executar essa função para outras markers dentro do resource. Edit: @Zakk As 2 funções nas linhas 4 e 5 do seu código não precisam, pois o elemento já vai ser criado nessa dimensão e interior. Também tenha como hábito definir variáveis sempre local para evitar conflitos entre o nome dela e para otimização do script. Você também pode abrir mão da função setElementPosition especificando as coordenadas com setElementInterior Ex: setElementInterior(source, 3, 418.18564, -81.11912, 1001.80469)
    1 point
  6. ? .. ولكم بتنورنا اكيييييييييييييييييد
    1 point
  7. @WeeD1 Foi mal a demora, tinha esquecido, mas está ai: greenzones = { {x = 60, y = -1973, z = -20, width = 301, depth = 225, height = 500, r = 0 , g = 200 , b = 0 , a = 100}, -- Praia } dataVehicle = {} local AreaV = {} function IniciarAreaVerde() if greenzones and #greenzones ~= 0 then for _,v in ipairs (greenzones) do if v then if v.x and v.y and v.z and v.width and v.depth and v.height then local colShape = createColCuboid (v.x, v.y, v.z, v.width, v.depth, v.height) local rarea = createRadarArea (v.x, v.y, v.width, v.depth, v.r,v.g,v.b,v.a) setElementParent (rarea, colShape) colShape:setData("AreaProte", true) if colShape then AreaV[colShape] = true addEventHandler ("onElementDestroy", colShape, function() if AreaV[source] then AreaV[source] = nil end end ) addEventHandler ("onColShapeHit", colShape, function (h, d) if h and d and isElement(h) and getElementType (h) == "player" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then setElementData(h,"areaverde",true) end if h and d and isElement(h) and getElementType (h) == "vehicle" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then if isVehicleDamageProof(h) then dataVehicle[h] = true else setVehicleDamageProof(h, true) end end end ) addEventHandler ("onColShapeLeave", colShape, function (h, d) if h and d and isElement(h) and getElementType (h) == "player" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then setElementData(h,"areaverde",false) end if h and d and isElement(h) and getElementType (h) == "vehicle" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then if dataVehicle[h] then dataVehicle[h] = nil else setVehicleDamageProof(h, false) end end end ) end end end end end end addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()), IniciarAreaVerde) EDIT 1: Não testei
    1 point
  8. مش انتا قولت تبي لما تدوس علي رو معين يفتح لوحة للرو حقك yourRow تمام بدل وطبعا الرو لازم يكون رقم هنا مفيش فاصلة if( guiGridListGetSelectedItem( yourGridList , ) == yourRow ) then بيصير كدا if( guiGridListGetSelectedItem( yourGridList ) == yourRow ) then --للتحقق من الرو
    1 point
  9. "onClientGUIDoubleClick" -- حدث الضغط علي الزر مرتين if( guiGridListGetSelectedItem( yourGridList , ) == yourRow ) then --للتحقق من الرو guiSetVisible() -- لاغلاق اللوحة الحالية وفتح اللوحة الجديدة
    1 point
  10. mtaserver.conf At the end of the file <resource src="admin" startup="1" protected="0" /> <resource src="defaultstats" startup="1" protected="0" /> <resource src="helpmanager" startup="1" protected="0" /> <resource src="joinquit" startup="1" protected="0" /> <resource src="mapcycler" startup="1" protected="0" /> <resource src="mapmanager" startup="1" protected="0" /> <resource src="parachute" startup="1" protected="0" /> <resource src="performancebrowser" startup="1" protected="0" /> <resource src="reload" startup="1" protected="0" /> <resource src="resourcebrowser" startup="1" protected="1" default="true" /> <resource src="resourcemanager" startup="1" protected="1" /> <resource src="scoreboard" startup="1" protected="0" /> ....
    1 point
  11. If it is not looped or streamed, then it will destroy itself when it ends.
    1 point
  12. @koragg Remember, your database is already in use by your server. If external parties can request data from it, this can overuse your database in case of spam requests. If it is going to be used a lot, then I recommend to make 2 API's. 1 PHP on your MTA server. 1 Nodejs, on a server of choice. Benefits/extra's/how to use: The Nodejs server will request the scoreboard once in a while. (For buffer purposes) On the PHP side you can set states to check if there are updates in the data, it is recommended but not required. The website(for client requesters) that you are going to use, can be a part of Node or even hosted at a different server of choice. (Your MTA server can send messages to your Note server to tell that the scoreboard is updated, if you want quick updates on your endpoint for your clients.) Using a Nodejs server can protect your server from spam requests and buffer the data in the memory. It also gives you access to sockets. (for live updates)
    1 point
  13. you want player lose his armour instead of dying ?? if you mean that : -- Client addEventHandler( 'onClientPlayerDamage' , root , function( attacker , weapon , bodypart ) if( weapon == 34 and bodypart == 9 )then if( getPedArmor( source ) == 0 ) then setPedHeadless( source , true ) timer = setTimer( function( source ) setPedHeadless( source , false ) ; end , 2000 , 1 , source ) triggerServerEvent( 'killPed' , source , attacker , weapon , bodypart ) else cancelEvent( true ) triggerServerEvent( 'removeArmour' , source ) end end end ) -- Server addEvent( 'removeArmour' , true ) addEventHandler( 'removeArmour' , root , function( ) setPedArmor( source , 0 ) end ) addEvent( 'killPed' , true ) addEventHandler( 'killPed' , root , function( ) killPed( source , attacker , weapon , bodypart ) end )
    1 point
  14. Reviveu malandramente este tópico inocente...
    1 point
  15. عندك طرق كتير واسهلها الاكونت داتا addEventHandler( 'onPlayerLogin' , root , function( old , new ) if( getAccountData( new , 'data' ) ) then return outputChatBox( 'تم الدخول مسبقا لهذا الحساب' , source , 255 , 0 , 0 , true ) end outputChatBox( 'انتا اول شخص يقوم بتسجيل الدخول في هذا الحساب' , source , 0 , 255 , 0 , true ) setAccountData( new , 'data' , true ) end )
    1 point
  16. Remove this setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true)
    1 point
  17. takeAllWeapons (player) Or modify save system
    1 point
  18. Regra número 2: Nunca delete seu código, deixe como comentário. Só delete se tiver certeza de que nunca vai usar nada daquilo ou então já sabe como fazer algo melhor. A regra 1 era usar dxDrawImageSection mesmo ahuahauahauh.
    1 point
  19. 1 - Com dxDrawImageSection - este tópico vai te ajudar com os cálculos necessários: https://forum.multitheftauto.com/topic/95911-bug-what-wrong-in-this-circle-hud 2 - Você pode definir um tempo com setTimer para ativar o inicio da perca de fome/sede sempre que o jogador comer ou beber algo. E fazer uma verificação, resetando quando necessário. Para a subtração do valores, você pode usar também setTimer e definir um tempo para abaixar esses valores. Para abaixar a vida quando sentir fome: Fazendo os passos que eu disse acima, você poderá verificar a quantidade de sede/fome continuamente e ir setando a vida do jogador com get/setElementHealth. Obs: minha primeira resposta também vale para a barra de fome e sede. 3 - Salvamento: Eventos onPlayerQuit; onPlayerLogout e onResourceStop para o salvamento dos dados. Salve com: getElementData (que será definido no carregamento) e setAccountData. Carregamento: Eventos onPlayerLogin e onResourceStart. Obtenha o salvamento na conta (com getAccountData) e defina no player com setElementData Sistema de compra: Você pode procurar algum resource existente ou criar do zero. Todos esforço em fazer é válido, então se você já tentou fazer mostre aqui o código.
    1 point
  20. Hello all! G&T Mapping here again, as usual at your service! Providing you with the latest high quality maps FOR FREE, made by us. Introduction: We're happy to anounce that the Public test version of our custom world 2.0 is now ready to download and test by the MTA community, i cannot emphasize enough that we need feedback from the community to make the best maps possible, so we ask of anyone that will try out the public test version to give us some feedback in return. We will keep up an active change log for all bug fixes and added features Map description: In addition to our first island we have added a second island so the map now consists of two separate islands where players are free to go and explore. (Check the change log for more info) New Addition to the Custom World! Gameplay footage! Important to note: We understand that these video's quality is mediocre at best, due to busted hardware we weren't able to record nor produce the videos with HD quality, though we decided to still release the content, regardless of the videos. Screenshots Second island: Screenshots First island: How to install *The world will be a separate map file including some resources, and all the textures. *Simly unpack the zip folder in your server's resource folder. *Turn on gtloader through the console or admin panel to auto-load all the models, and you're good to go. *If you want to run this map next to your exsisting free roam map you will have to load up both .map files. *The world will come with the default MTA deathmatch game mode. (We encourage testers to use their own game modes) Change log: (Second Island) #Added beaches. #Added Bridge. #Added boulevard. #Added industrial area. #Added suburban area. #Added shopping area. #Added airport. (General) #Added watermarks. *Fixed corner textures. Unresolved bugs: *From a aerial perspective you can clearly see object limit kicking in pretty hard, though this does not affect you on the ground levels. *Vehicles tend to load faster than the objects resulting in them falling beneath the floor. Feedback. All the feedback, suggestions and bug reports regarding the public test version may be submited in personal messages to myself or tails on the MTA forums. Please be clear about what kind of bug you're submiting, when you encountered it, and any posible solutions. Download Link: http://www.mediafire.com/download/k783p ... rld%5D.zip As always we will keep you posted on new changes, we've got a few nice things in store for you! ''soon'' G&T Mapping Needs You! Do you have any experience with recording videos in MTA, Mapping, Moddeling, or Scripting? feel free to send us a message so you too can join the G&T Mapping team! Thanks! G&T Mapping, Follow us on, Facebook: https://www.facebook.com/pages/GT-Mappi ... 213?ref=hl Our Blog: http://gtmapping.blogspot.nl/ We also still accept donations, press the donate button below!
    1 point
  21. Os comentários ajudam a entender o código, mas neste caso, acho que seria melhor você deixar toda explicação fora do código - até pra se adequar ao propósito que é um tutorial. Fora que os comentários dentro do código Lua perdem o destaque e não é o ideal pra alguém enxergar. A propósito, vou falar o método que eu uso, que é mais simples, e ajusta o tamanho sem problemas: -- res: 1280 x 800 local sx,sy = guiGetScreenSize() local tamanho_da_fonte = 2.5 local X, Y = 450, 550 local dxWidth = (sx/1280) * (X + 150) local dxHeight = (sy/800) * (Y + 40) local dxScale = ((sx/1280) / (sy/800)) * tamanho_da_fonte dxDrawText( "Teste", (sx/1280)*X, (sy/800)*Y, dxWidth, dxHeight, tocolor(255,255,255), dxScale, "default-bold", "left", "center" ) Eu defini essas variáveis pra deixar mais fácil de entender, mas recomendo poucas variáveis pra uma melhor performance do script sempre. Pra facilitar mais, você pode definir uma variável pra sx/1280 e sy/800 embaixo da função guiGetScreenSize.
    1 point
  22. 1 point
  23. ********** Changes (10 July 2023): Updated the Forum Rules to reflect the removal of the ban appeal option for Global Bans. For more information see our post on that. ********** Changes (8th November 2021): Added a new rule in B. User Accounts Rules which adds certain user restrictions to recently created and junior Forum profiles Changes (29th June 2021): Added a new rule in A. General Forum Rules regarding advertising and posting content heavily based on other servers ********** Changes (6th October 2019) (qaisjp): remove duplicate entry ********** Changes (23 January 2019): Refreshed the Forum Rules again so that they hopefully better reflect our current needs. They should also look better visual-wise. changed the layout of the Forum Rules to suit our IPS board more added ordered lists to rules sections and content to make it easier to refer to specific rules (eg. E-1 for people contacting multiple Moderators at once) added a paragraph about Forum Staff and means of contacting us to the Forum Rules replaced IRC references with Discord changed order of main rule paragraphs, merged some points added a note about bounties for Cheating Software in A-12 added a note about not sharing user personal details (A-5) added a note regarding user's passwords security in B-1 added a note about changing usernames (B-4) added a note about restrictions when editing own posts and topics (C-5) split and re-phrased notes regarding our anti spam-bot measures into B-7 and C-14 added previously written Section Specific rules which were already enforced but not listed and re-ordered the entire section added full processes for Moderator Decision Appeals and Forum Account Removal in Appendices C and D to make these processes be more transparent to users re-phrased A-4, tweaked A-14, A-15, B-2, B-3, B-5, minor tweaks in A-3, A-10, C-1 other grammar tweaks and re-wordings over the entire article added a note about global MTA ban appeals (F-6) ********** Changes (12 May 2018): Added a link to new rules for the Hosting solutions section ********** Changes (10 October 2016): Grammar fixes. Also made minor adjustments to the layout of the Forum Rules so that they show correctly in new forum software ********** Changes (12 May 2015): Added a note regarding sharing moderator applications with other Moderators ********** Changes (23 April 2015): Made it clear that re-posting same topic or content multiple times to different sections is disallowed (with an exception) ********** Changes (31 March 2015): Forum rules have been greatly rewritten to become more clear and straight forward to our users. Summary of changes: Various changes Added a TL;DR note at the top of the forum rules as a summary for lazy users Added a list of potential moderator actions for rule violations, also introduced a posting restriction moderator action Added information about moderator applications Major stylistic changes - grammar fixes, rewordings and moving some rules to new (or other) paragraphs New and improved sections and rules Added a new rules section (User Accounts) along with a note, stating that we will never ask for users' passwords Added an information about our way of handling of new forum accounts (including a potential manual account activation) Added notes about recovering old forum accounts and merging posted content from multiple accounts Made it more clear that users should not create new accounts to evade a ban Listed scenarios in which account sharing is disallowed, otherwise it should be considered as allowed Added a note about account removals Added a new section with posting tips for forum users (Posting Advice) Added a note encouraging users to post their topics in correct sections Added a note suggesting use of code and Lua tags when posting code snippets Added an information about publicly posted code snippets Listed scenarios in which users can bump topics (also added an explanation of the phrase 'bump a topic') Added an explanation for why users shouldn't reply to topics/posts made by spam bots Added a section about the forum staff members who maintain the forums Described ways of contacting moderators Added a note about moderator decision and ban appeals and also the ways how to do them (and how not to do them) Added a note about insulting and impersonation - both are not allowed on these forums Made clear that posting obscene and religious content on the forums is not allowed Made adjustments for rules for the Other Languages Section: Disallowed posting of users who do not speak a certain language in specific international sections Disallowed posting in English in the International section (with exceptions). Added notes about MTA0.5 and Hosting Solutions forum sections and made tweaks to rules for other forum sections ********** Changes (1 September 2013): made it clear that using multiple forum accounts for posting fake feedback and opinions is disallowed ********** Changes (7 May 2012): backseat moderation is disallowed ********** Changes (15 March 2012): added more tips to general advices (topic titles, double posting, using quote tags, dealing with spam posts) made it clear that ban evasion and posting cheating software are forbidden multiple forum accounts are allowed made rules for signatures less restrictive added section-specific rules for Other languages and Servers to play on sections added notes about ban appeals (forum/irc)
    1 point
  24. I want to show a little video: Already realized finding the shortest path and drawing it on the radar. Wait a detailed video.
    1 point
×
×
  • Create New...