Leaderboard
Popular Content
Showing content with the highest reputation on 22/05/17 in all areas
-
واو ماسويتو شيء ؟ 4 صفحات عشان طلب فتح البوابة ؟ وتحقق من الرتبة خخخخخخخخخخخخ , بتوفيق لصاحب الموضوع وللكل < 34 points
-
1#: تم تعديل كافة خطط لعبة MTA:SA وخوادم Linux _____________________________ 2#: عرض متاح لغاية رمضان : _________________________________ 3#: سوف يتم تغيير اشكال الخطط قريباً #خوادم_العرب_في_خدمتكم_دائماً2 points
-
@Master_MTA طولتها وهي ماتستاهل local ArTable = { "ا", "ب", "ت", "ج", "ح", "خ", "د", "ذ", "ر", "ز", "س", "ش", "ص", "ض", "ط", "ظ", "ع", "غ", "ف", "ق", "ك", "ل", "م", "ن", "ه", "و", "ي", "ء", "ة", "ث", } function isTextFoundAr ( aEdit ) aText = guiGetText ( aEdit ) for _ ,v in ipairs ( ArTable ) do if aText:find ( v ) then aText = string.gsub ( aText , v , "" ) return guiSetText ( aEdit , aText ) end end end addEventHandler('onClientGUIChanged',root, function ( ) if ( source == myEdit ) then isTextFoundAr ( source ) end end )2 points
-
To post a topic in the Scripting section your topic should meet the following requirements: It must contain specific questions about either: the code you will include that is problematic or you are asking direct support for, or asking for help in finding the best approach to achieve something. For example, asking more experienced scripters if there is a more efficient way of coding your desired script/function. The contents of the topic must focus around code support or coding methods. It needs to follow the Formatting guidelines and Conduct guidelines listed below. This section is not for: (resource) progress show-off, recruiting scripters, or polling interest or brainstorming on what kind of project you are up to next All of the above things have their own categories to post them in. These categories are respectively: https://forum.multitheftauto.com/forum/87-resources/ https://forum.multitheftauto.com/forum/149-looking-for-staff/ https://forum.multitheftauto.com/forum/140-mta-chat/ If you still post such a topic in the Scripting section mistakenly, the first time it will get moved gracefully to the correct section. Any subsequent repeated mistakes may result in an instant deletion of your topic. Formatting guidelines It would be highly appreciated if you tag your topics appropriately and use proper topic titles. Although this is not a hard requirement, it helps to maintain overview. Use the following template for this: [BUG] TOPIC_TITLE - for problematic code that will not work or has issues that you need assistance with. This type of topic must always contain a code snippet of the script in question. Most of the times, you will need to provide the entire script. [QUESTION] TOPIC_TITLE - scripting questions, including (but possibly not limited to): asking for help in understanding scripting principles, function or code usage, or if you wonder whether your approach to achieve something is the most optimal and efficient one. We are all learning and aid from more experienced scripters can be useful. Use code snippet tags. Always add your code (if applicable) in this uniform way. Click the ''< >'' shortcut in the text editor, as seen in below screenshot: Then put your code within the box that said button (< >) creates. Be sure to select Lua for highlighting from the drop-down list in bottom right corner for automatic syntax colouring, wiki links for built-in functions and events and other cool features. Please do not use loose [ code] tags for the sake of readability. Do not mass-quote code snippets, or else it would fill up the whole topic with repeats of the same code over and over again. Remove the code column from a previous quote before posting or limit your own quote by narrowing down the parts of code you are replying about. Quote selectively. Advice Last but not least, please try to explain your issue or question the best way you can. A clean and detailed topic can increase the chance that someone will sit down to analyse your problem and actually help you. Clear communication and description is also the key to attracting scripters who may potentially take a look for you. Note that a common request is to "post the full script" and that isn't without reason - problems often go deeper than you think (or the issue is structural / architectural of nature) and other scripters will find it difficult to help you debug or trace it without having a good picture of everything. Especially with questions regarding bugs or something not working as it's supposed to, you may have low or non-existent outreach from others if you're not providing full code. Similarly, also keep in mind posting screenshots (or lines) from debugscript, errors or warnings, that include the line number, you will need to number any script code you provide in your topic to ensure others can intepret it and find the corresponding erroring lines. Code of Conduct Treat everyone with respect, no matter their skill in scripting. If someone posts what you think is low level/''stupid'', remember that you have once been there as a novice scripter yourself and everyone should have a chance to learn. Instead of resorting to humiliating replies, think about how hard it is to learn how to script efficiently, and dedicate yourself even more to help them understand it. You might play a noticeable role in someone's future as MTA scripter (or who knows, maybe an even more prominent role later on too). Long story short, avoid making remarks or rude comments aimed at someone's skill level, incapabilities, etc. It is not appreciated neither by us Moderators nor by regular users of the forums. The Scripting section is not meant for those unwilling to learn, whose only intent is to try get others to finish the scripts they need, line by line. We see this happening way too often - someone with seemingly zero scripting skills does not react on-topic to the set of functions they can use that other users provide them, and does not seem to take any pushes in the right direction forward; they are just waiting for a collective effort from other scripters to develop what they want. This is what we do not want to see. Do not expect all the work to be done for you while you lean back. You should at least try to script it by yourself - users on this subforum are generally happy to help in any particular issue you come across while coding. If you see someone who keeps bumping their topic that is clearly oriented at letting his work be done by others, then please report the post. The bumping policy in scripting section is a bit different from other forum sections, because scripting topics serve as a sort of knowledge-base for those dealing with the same issue/question as described in existing topics. It is often suggested (and usual practise for many scripters) that prior to posting a new topic, someone searches the forums to see if their question has been asked/answered before. Therefore, you may bump old topics if you're certain your approach or solution/code is better than other posted answers, and if it's a fairly common question (not someone just asking how to have their own code fixed or similar case-specific topics). However, we the moderating team may still review if your posts are really useful bumps with new insights, and even if so, we can lock the topic to prevent derailing of an old topic/continuous posts. So expect your useful bumps to possibly be the last ever made in a certain topic (which means if you do it, do it well). If you believe a popular topic for a really common scripting problem should be unlocked for you to post input, or you wish to improve upon someone's earlier bump after which it was locked, then please use the Report button referring to this part of the regulations. No support is offered for leaked code or scripts (even if they only partially originate from a leak) and such topics will be locked and trashed on sight. If you notice a topic where something related is being asked, or other clandestine requests (such as questions how to decompile scripts, etc, anything with not-so-noble intentions) then please report the topic and do not reply as it may incite unnecessary arguments. Mention the source proving that it is a leaked code within your report, though you can omit that if you feel that it is fairly obvious that the resource/script was leaked. In the latter case however, keep in mind that we may not be aware of such a leak, so the Moderator who handles your report will have to take his judgement upon it if you do not provide evidence. Still, keep in mind that you should not openly accuse users who post pieces of your (or someone else's) code as per https://forum.multitheftauto.com/topic/46410-stolen-resource-accusations/. If this happens, simply report such posts. Failure to abide by the Code of Conduct may result in a forum punishment. If you notice anything that violates the Code of Conduct, please report those posts instead of enforcing the rules yourself. It just takes a few seconds, but greatly benefits the Section and makes it a better place to seek help from.1 point
-
TUTORIAL/GUIDE NO LONGER MAINTAINED This tutorial is no longer maintained and it's contents may be deprecated or no longer work. I created this tutorial in 2014, when I was very involved with MTA and the community around it. Due to the nature of life, I ended up leaving MTA to focus on more important things (work, family, life, etc). I believe this tutorial has helped a lot of people get into scripting for MTA over the years, and I'm happy I was able to do answer questions and help people get into coding! Hello! Welcome to my MTA PHP SDK tutorial! In this tutorial I'm going to be teaching you guys how to call your MTA server from your web-server, and call your web-server from your mta server. This tutorial may require a small amount of prior PHP knowledge Let's get started! Getting your web server Getting & installing the PHP SDK Great! Now you're ready to actually get started with using the SDK. Setting up an HTTP user Connecting the servers Creating an HTTP responsive resource Calling our function from the web Getting data from mta server Thanks for viewing this. I will be updating the topic later to show how to call the SDK from the server, get inputs, and do returns later, when I get a chance. Please reply with any questions, concerns, or errors.1 point
-
زي ماشوفتو في العنوان الحين راح اشرح لكم كيف تعرفون نتيجتكم من برنامج نور اول شيء تدخل على الرابط الآتي : https://noorresults.moe.gov.sa/Marksinquiry/StudentMark.aspx ثم تتبع الخطوات الموجودة بصور : ثم مبروك عليك , بتوفيق للكل وعسى كل واحد ينجح : )1 point
-
1 point
-
ما يحتاج كل اللي تسويه وتدور والخ مود الجيو اديتور يخليك تسويها على اساس مقاس اي شاشة وكمان بدون التعديل على الاحداثيات واخد احداثيات الشاشة والخ تقدر تسوي شي بسيط -- شي تختاره بعد ما تحدد الجيو اللي تبي تسوي في اي شاشة ناسي اسمه الصراحة رح يسوي لك الشي اللي انت صممته عند كل الشاشات1 point
-
لا المشكلة ان الحلقات التكرارية تنفذ الامر مرة بعد مرة يعني لو استعمل طريقته بيجلس يحذف عنصر عنصر ويتسبب في ايقاف التنفيذ حتي انتهاء الحلقة التكرارية وممكن تطول لو الشيء اللي الكود شغال عليه بطيء علشان كذا تعريفه في سطر افضل يعني زبدة الموضوع مع احترامي لك يا واي فاي الوظيفة مو مفيدة1 point
-
بساطة هائلة جداً, شكراً أخي دابل :< + لكن الطريقة حقتي مضمونة , ومن الممكن يستخدم ipairs ويلاحظ خطأ ؟, بيكول شسالفة ؟ وهو المفروض يحطه pairs --- احتمالات مستحيلة ^^ يعني ماتفرق كلهم حلوين وجميلين1 point
-
@iMr.WiFi..! هذا جدول مليان قيم Table = {"1", "2", "3", "4", "5", "6"} لو سوينا كذا في نفس الكود Table = {} -- اعادة تعريف تفرمت بكل بساطة1 point
-
1 point
-
local marker = createMarker(1543.0999755859, -1627.6999511719, 12, "cylinder", 0, 0, 0, 0) local object = createObject ( 980,1542.900390625,-1627.599609375,14.89999961853,0,0,90 ) objectX = false function MoveObject ( player ) if objectX == false then objectX = true moveObject(object,500,1542.900390625,-1627.599609375,14.89999961853+10) elseif objectX == true then objectX = false moveObject(object,500,1542.900390625,-1627.599609375,14.89999961853) end end function BINDKEY ( player ) if isGuestAccount(getPlayerAccount(player)) then return end if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Police" ) ) then bindKey(player ,"tab" ,"down" , MoveObject ) end end addEventHandler('onMarkerHit',marker ,BINDKEY ) function UNBINDKEY ( player ) unbindKey(player ,"tab" ,"down" , MoveObject ) end addEventHandler('onMarkerLeave',marker ,UNBINDKEY ) -- الكل جالس يجرب ليه ما اجرب هههههههههه1 point
-
Recently Browsing 5 members #BrosS Killer Project Master_MTA A7MEDENO Mhmd.z نتمنى لكم اقامة ممتعة1 point
-
1 point
-
Element data doesn't create lags for servers with a smaller playerbase, but it's different when it comes to servers with 100+ players... I doubt using one or two element data's for players will make some lag, so I'll probably use that. If anyone does have a suggestion please post one!1 point
-
1 point
-
1 point
-
-- if doesCollide(firstRectangleX, firstRectangleY, firstRectangleWidth, firstRectangleHeight, secondRectangleX,secondRectangleY, secondRectangleWidth, secondRectangleHeight) then ... function doesCollide(x1, y1, w1, h1, x2, y2, w2, h2) local horizontal = (x1 < x2) ~= (x1 < x2 + w2) or (x1 + w1 < x2) ~= (x1 + w1 < x2 + w2) or (x1 < x2) ~= (x1 + w1 < x2) or (x1 < x2 + w2) ~= (x1 + w1 < x2 + w2) local vertical = (y1 < y2) ~= (y1 < y2 + h2) or (y1 + h1 < y2) ~= (y1 + h1 < y2 + h2) or (y1 < y2) ~= (y1 + h1 < y2) or (y1 < y2 + h2) ~= (y1 + h1 < y2 + h2) return (horizontal and vertical) end1 point
-
The concept of letting serverside and clientside work together isn't very difficult. It actually the same as you and me having a conversation. You communicate with me that you have a problem with a script. Noah > IIYAMA Then I reply on your topic and gave you some tips. IIYAMA > Noah Then you process those tips and send me request to send you more information. Noah > IIYAMA Which I am sending you back now. IIYAMA > Noah During this conversation you have send me 2 messages and I have send you 2 messages back. @koragg showed you the functions you can use to start a conversation. Lets start a conversation between the Server and all clients! So a part of the conversation goes like this: (the rest of the conditions you have to fill in by yourself) Server: A lonely player named <John> enters a lonely vehicle. 'onVehicleEnter' gets triggered on serverside. Lets give the vehicle weapon so it can kill other lonely players!!! The server saves that the vehicle has a weapon now(for example in to a table). Oh great it has been saved! Now let all lonely players know that a vehicle has super weapons! triggerClientEvent to all the players. Clients: Oh man we all got mail from the server!! It said that a lonely vehicle has weapons now!! Now we all have to attach weapons to it on all our computers! Noooo!! This sucks damn. setElementParent(weapon, vehicle) Client: The lonely player named <John> pushed his left mouse button down! Yes, I am an a vehicle. Yes, it is a hydra. Yes, I am happy to be alive. Server, I am firing up!!! setElementData on his vehicle firing true. Clients: I received element:~yData oh oh. It said that a lonely hydra is firing fire! Which weapons did I attach on it? Ah wait I added them a few seconds ago, when a lonely player entered his lonely vehicle! Lets fire these hydra flame weapons! setWeaponState firing true Server: A lonely player named <John> crashed his hydra into his mother. There was nothing left of his mother, neither of his poor hydra dragon. setElementData on his vehicle firing false. Clients: I received element:~yData oh oh. It said that a lonely hydra isn't firing any more. What could have happened? setWeaponState firing false.1 point
-
1 point
-
You can use https://wiki.multitheftauto.com/wiki/TriggerClientEvent and https://wiki.multitheftauto.com/wiki/TriggerServerEvent to communicate between server and client scripts. Element data is pretty useful but not everytime so you just need to know when to use what This^ can be done with the "triggerClientEvent" thing and tell the resource to load the same stuff to every player on the server.1 point
-
player بمعنى اي شي يبيه هو انا فقط اوضح له .... تحبني لهذي الدرجة و ما تبيني اعتزل واو شكراً شكراً ههههههههه1 point
-
1 point
-
I can safely say that setElementData is no performance killer or anything. My server has 90 resources running and whenever I needed to send data from server to client (or vice versa) I used element data. And the (little xd) players that have played there didn't experience any lag from element data (if they did, their pc laptop was a potato and couldn't handle a few resources, nothing to do with element data). @pa3ck Actually I think that using triggers should theoretically be a bigger performance killer because with element data you send it once and then any resource can use it, but with events - you need to send the data separately to each resource that needs it. But the difference should be unnoticable for the normal player so it's the same which one you choose to use, be it element data or events.1 point
-
# Client Side Eevent: "onClientGUIChanged" guiGridListClear triggerServerEvent -- guiGetText string.find string.upper guiGridListAddRow guiGridListSetItemText # Server Side getAccounts triggerClientEvent1 point
-
سلام عليكم ورحمة الله وبركاته , كيف الحال .. ان شاء الله تكونو بأتم الصحة والعافية /: اقدم لكم وظيفة بسيطة ومفيدة من نوعها table.format هاذي الوظيفة تفرمت التيبل باختصار , تحذف جميع القيم الموجودة بتيبل Syntax : table.format ( table table ) table : التيبل الي تبي تحذف منه جميع القيم Code : function table.format ( table ) assert(type(table) == "table","Bad Argument @1 [' Expected Table Got "..tostring(type(table)).." at argument 1 ']") return table = { } end end Example : --#-- Source Code function table.format ( table ) assert(type(table) == "table","Bad Argument @1 [' Expected Table Got "..tostring(type(table)).." at argument 1 ']") return table = { } end end aTable = {1,2,3} addCommandHandler ( "Format",function ( player ) table.format( aTable ) outputChatBox( "Done !",player) end ) وسلام خير الختام1 point
-
1 point
-
كيف اسوي اليوزر والباس بالبي اتش بي عشان الاتصال تقدر توريني كيف ي ذيب ؟1 point
-
1 point
-
1 point
-
Se você tem cartão internacional e algum documento no seu nome, recomendo OVH. Tem proteção DDOS externo com auto mitigação e um suporte bom pra caramba. Tenho um servidor com eles faz mais de 2 anos e apenas uma vez tive problema, parece que aconteceu um incêndio e alguns servidores ficaram umas 2 horas sem conexão, restauraram o backup e esse mes eles não cobraram. É difícil você encontrar alguma empresa que lhe paga o mês todo apenas por 2 horas de downtime. Se você quer algo mais barato sem sair da infra da OVH, Kimsufi. Vários servidores que já sairam de linha por preço de banana, já usei e não tenho oque reclamar. MTA não é focado em cpu-stress então não tem problema algum usar eles. Ambas as empresas operam no Canada, ping geralmente de 160, 170. Não existe controle de banda, todas as portas são abertas e o menor link é de 100/100, garantido. Meu servidor tem por volta de 700 megas e sempre usei NGINX como proxy reverso, o download fica por volta de 300 megas e utiliza toda a banda disponível no servidor, sem contar quando tem muitas pessoas baixando e libera o burst de rede, é muito raro ver alguém demorando pra baixar o servidor. Se você quer algo dentro do Brasil vai ser um pouco mais difícil. Muitas empresas não aceitam servidores de games, já que isso chama muitos ataques DDOS pra dentro da infra. Existe a opção de graça que no final pode sair meio caro. Amazon AWS, servidor com 512mb de ram, 1vcore, e a banda não é das melhores, mas para um servidor de MTA, dá e sobra. Você ganha o servidor mais simples para usar durante 12 meses, eles dão alguns gigas de banda pra você usar, mas provavelmente você ainda vai pagar alguns dólares no final do mes, isso depende do tamanho do seu servidor e do tráfego gerado. Provavelmente você não vai conseguir usar NGINX para acelerar o download, já que liberar toda banda do servidor tão rapidamente pode ser um problema se você tiver muitas pessoas baixando ao mesmo tempo. Sem contar que 512mb de ram não é muita coisa, é sempre bom deixar uma folga para outros processos. Pode ser bom pra começo, se você quer abrir um servidor e não ta com muito dinheiro e so quer fazer um teste. O servidor é em SP e certeza que você não vai ter problema de desync. OBS: Não conta com proteção DDOS. Se você vai começar agora, provavelmente vai querer começar fazendo algo minimamente certo. Começando com um CentOS 7, o firewall com os bloqueios certos e algum backup remoto, você pode ir de Amazon sem se preocupar com ataques DDOS, você apenas tem que se lembrar de que a banda brasileira é uma das mais caras na Amazon, então você não pode ter re-serviço, tem que economizar a maior banda possível para pagar menos no final do mês e sair mais em conta que servidores pagos.1 point
-
بعد ما حملتها يقولي مب متوافقه مع جهازك خلاص فقدت الامل @@@@ بوسولو انت معروف نشبه الرجال ذا غير شوي كيف اوصفها بوسولو انت شخصيه فريده فهمت1 point
-
1 point
-
إذا قمت بعمل الترايقر بهذا الشكل سيأثر علي السيرفر( اذا كان عدد لاعبينك 50 ومافوق ) بسبب تكرار الترايقر بعدد اللاعبين المتواجدين بالسيرفر1 point
-
في هذه الصفحة يوجد كل الشروحات المتعلقه بالسترنق وكما انها باللغة العربية , وشكرأ لكل من ساهم في تعريب الشروحات واتمني لك التوفيق1 point
-
@Sea, это что, вроде такого коробка?? Переключить хендлинги конечно фигня, но если нужно строго каждый хендлинг вручную добавлять, этой половине коробки грош цена. Если при этом переключение происходит строго посредством нажатий двух кнопок пользователя, то и второй половине также. С ботами конечно получше, с учетом того что уже есть готовые. Но если в чистом виде, доступные не подходят, то что же надо то? Вот вы говорите работать за идею, а какая собственно идея? Коли для работы много ума не надо, то почему сами не сделаете? Тут есть два варианта вообще, либо вам нужно что-то сложнее, либо у вас вообще нет хоть немного способных к скриптингу. Идея делать без скриптера сервер или впаривать что много ума не надо, а потом требовать от соискателя какие-то серъёзные фичи, это конечно отличные идеи. Но других, увы не видится в вашей "вакансии".1 point
-
local groupName = 'ArmyElite' markerDoor = createMarker( -85.9716796875, 1036.521484375, 18.616687774658,"cylinder",2, 0, 255, 0, 150) addCommandHandler ( "pass_1", function ( hPlayer) if isElementWithinMarker(hPlayer, markerDoor) then local vehicle = getPedOccupiedVehicle ( hPlayer ) if ( getElementData ( hPlayer, "gang" ) == "ArmyElite" ) then --outputChatBox( "Bienvenido", source, 0, 255, 0, true ) setElementPosition ( hPlayer , -89.0361328125, -3382.576171875, 24.388263702393 ) setElementPosition ( vehicle , -89.0361328125, -3382.576171875, 24.388263702393 ) else outputChatBox( 'ALERTA! Base Privada '..groupName..' !', hPlayer, 255, 0, 255 ) end end end )1 point
-
Me pareció buena idea hacer un pequeño script para reservar slots por serial, así los dueños de los servidores siempre podrán entrar a administrar en caso de tener un gran público o simplemente disponer de pocos slots. Esto es muy útil en servidores Roleplay. Screenshot Descarga el recurso: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14452 *TODAS LAS INSTRUCCIONES EN EL ENLACE DE DESCARGA*1 point
