Jump to content

Leaderboard

Popular Content

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

  1. A poor demonstration of custom face morphing
    2 points
  2. السلام عليكم ورحمه الله وبركاتة امس في القسم الاجنبي عضو سال ازاي يجيب اقرب بيد بالنسبة لنقطة عطيتو الفنكشن بس حبيت اطوروا اكثر getNearsetElmFromXYZ الفنكشن عبارة عن يجيبلك اقرب اليمنت بالنسبة لنقطة معينة ( الساينتكس / syntax ) : function getNearsetElmFromXYZ( etype , x , y , z ) etype : نوع الاليمنت x , y , z : احداثيات النقطة ( السورس كود / Source Code ) : function getNearsetElmFromXYZ( etype , x , y , z ) local elements , positions , element = getElementsByType( etype ) , { } , { } if( ( not elements ) or ( #elements == 0 ) ) then return false end for index = 1 , #elements do positions[ index ] = getDistanceBetweenPoints3D( x , y , z , getElementPosition( elements[ index ] ) ); element[ positions[ index ] ] = elements[ index ]; end return element[ math.min( unpack( positions ) ) ]; end ودا مثال يجيب معلومات اقرب سيارة بالنسبة لمكان الاعب addCommandHandler( "getNearsetVeh" , function( plr ) local nearstVehicle = getNearsetElmFromXYZ( "vehicle" , getElementPosition( plr ) ); if( not nearstVehicle ) then return outputChatBox( "There\'s not vehicles" ); end outputChatBox( "Name : " .. getVehicleName( nearstVehicle ) ); outputChatBox( "Model : " .. getElementModel( nearstVehicle ) ); end ) @Master_MTA --> معلش علي اللون الاخضر ما اقدر اقاوم لوول
    2 points
  3. يب حتي انا جربته , الكود فيه مشكلة @Abdul KariM @N3xT
    1 point
  4. Acho que este tópico já responde a sua dúvida:
    1 point
  5. Se você tivesse estudado a Wiki do getPedWeapon, saberia que existe um parâmetro para informar o slot que se deseja verificar. Você precisa verificar todos os slots para saber se o jogador tem tal arma no inventário.
    1 point
  6. JSON is simpler, but it has its limits and data size. For example, I was faced with the fact that JSON returned an empty table from a very large JSON. Here for each situation individually. Personally, I would prefer to write something small in JSON. In other cases, come up with something more rational.
    1 point
  7. I also think JSON is better and simpler. local table = { [1] = "asd", [2] = "qwe", } local JSON = toJSON(table) -- convert table to JSON. (JSON is a string, you need to store that like a string) print(JSON) -- you can print it local table_again = fromJSON(JSON) -- convert JSON back to table -- table and table_again is equal
    1 point
  8. Ocorre por causa do seu loop na linha 5.
    1 point
  9. يعطيك العافية أخوي الرشيدي على هذا الموضوع وأيضا أنبهه ع النقطة الأخيرة .. بإنتظاركم يا أصدقائنا المبدعين :]
    1 point
  10. عيب السيرفرات العربية الحالية هي التمويل والسيولة المالية.. الحين صار اي واحد يدخل بدون هدف للسيرفر ومو مستفيد حاجة بعكس السيرفرات الاجنبية تخليك تدخل ويمولون لك ويخلونك تستمتع وتستمر معهم فترة, هذي نقطة مهمة لاحظت ان اغلب السيرفرات متجاهلينها ويخلون كل الفلوس لأصحابها
    1 point
  11. Currently, JSON is better for something like that. You can store that information in a database (which is way more efficient than reading/writing XML files) I would give an example, but there really isn't much to show.
    1 point
  12. Tables that are 'saved' inside of other tables do not become a different tables. So no, there are no better solutions, except if we optimise it for the code around it that is going to use it. This matters: - The frequently + when which operation of the table is used. If we ignore the types of methods to accomplish our goal, and only look at which options there are: A: Check every items and find out the information we need. B: Keep a record of which types of items we are adding and removing. Which one is better? That depends on the frequency which part of the code is used. There are two parts: 1. Modifications of the table. 2. Reading the table.(item count) (More table modification, than reading the table, pick option: A) (More reading the table, than table modification, pick option: B)
    1 point
  13. فكرتك حلوة بس في شوية اخطاء 1 - ما يصير تلزق النقط لازم تسوي فاصل tempStr = tostring(0..digit) 2 - بدل ما تعرف كل دالة لحالها باللوكل تقدر تيجي في اول السكريبت وتسوي كدا اسهل function addZero( str ) local arg1 , arg2 , arg3 , etc 3 - string.gmatch --> علي حد علمي ان هي ترجع فنكشن مب تيبل بالتوفيق function addZero (str,sign) local Table if( ( str and sign ) and ( string.find( tostring( str ) , tostring( sign ) ) ) ) then Table = split( str , sign ); for index = 1 , #Table do Table[ index ] = 0 .. Table[ index ] end return table.concat( Table , sign ) end return false end -- Example -- print( addZero( "2:5" , ":" ) ) -- 02:05 print( addZero( "1,8" , "," ) ) -- 01,08
    1 point
  14. -- meta.xml <meta> <info author="srslyyyyy" version="1.0" name="Test" type="script"/> <script src="test.lua" type="server"/> </meta> local allowedAuthor = {["srslyyyy"] = true} function testFunction() local author = getResourceInfo(getThisResource(), "author") local allowed_author = allowedAuthor[author] if allowed_author then outputDebugString("Everything okey.") else outputDebugString("Failed to load script.") cancelEvent() end end addEventHandler("onResourceStart", resourceRoot, testFunction) Check, should work, this is for server side, but i think you could do the same on client-side, with OnClientResourceStart. ps: fajny nick
    1 point
  15. أتوقع ماحد زعلان منك بس أنت زعلان من الجميع . كل ماشفت ما أحد مود تقول ذا معي والخ ... عموماً بتوفيق للجميع .. ?
    1 point
  16. Or you can use this function: https://wiki.multitheftauto.com/wiki/IsElementVisibleTo Within the donegobeach function. It is a little bit dirty, but it should do it's job.
    1 point
  17. function getAccountAcls(acc) local acls=aclGroupList() local ta={} for k,v in ipairs(acls)do if isObjectInACLGroup('user.'..acc,v) then ta[aclGroupGetName(v)]=aclGroupListACL(v) end end return ta end function hasAccountPermissionTo(acc,role) local accacls=getAccountAcls(acc) local types={'general', 'function', 'resource ',' command'} for a,b in ipairs(accacls)do for m=1,3 do for k,v in ipairs(aclListRights(b,types[m]))do if string.find(string.upper(v),string.upper(role)) then return true end end end end return false end ههذول 2 فنكشن بستخدمهم مع لوحة الادمن اللي بسويها php باذن الله بس ما جربتهم للاسف اللي يقدر يجربهم يفيدنا اكون شاكر بالتوفيق
    1 point
  18. بسم الله الرحمن الرحيم سلام عليكم ورحمة الله وبركاتة يوم راح اشرح كيف تستخدام CSharp SDK أولا شي قبل لا ابدا يجب عليك تحميل هدا برنامج Microsoft Visual C# 2010 Express وتحمل SDK C# رابط تحميل SDK C# https://drive.google.com/file/d/0B4oc9Fbk4CkUelRrQWVqdmZ3ZDg/view?usp=sharing نبدا بشرح أولا يجب ان تصمم برنامج و بعدين ضيف ملفات MTA_SDK.cs و MTA_LuaArgs.cs ضيفه في برنامج Microsoft Visual C# 2010 Express وثاني شي مثل نسوي فكشن اسمه out و مود اسمه sampleResource فكشن function out (arg) outputChatBox(""..arg.."",root,255,0,0,true) return "done" end تروح ل الميتا وضيفه كذا <export function="out" http="true" /> -------- وبعدين نجي ل برنامج Microsoft Visual C# 2010 Express ونسوي كود using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; // ملاحظة مهمة جداً : using MTA_SDK; // لازم ضيف دا شي عشان تستخدام sdk c# // و ضروري ضيف ملفات sdk c# namespace eee { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button_Click(object sender, EventArgs e) // عندما تضغط علي الزر { MTA server = new MTA("localhost",22005, "Username", "passworld"); // localhost هنا ضيف الايبي سيرفر انا حطيت // ليش حطيت localhost // لانه بنجربه في سيرفر مجاني واذا مو سيرفر مجاني حط الايبي عادي // 22005 بورت port // username اسم حسابك ضروري يكون فيه رتبة كونسل // pasworld رمز MTA_LuaArgs luaArgs = new MTA_LuaArgs("Test"); // راح يطلع في شات Test var returned = server.CallFunction("sampleResource", "out", luaArgs); // sampleResource اسم مود // out اسم فكشن MessageBox.Show("" + returned + ""); /// و هنا حيطلع في MessageBox // done } } و هدا فيديو انا مصمم برنامج يصنع Marker
    1 point
  19. لاا ما ابيه ينعاد انا ققصدي الحين انا سحبت راتب المفروض انتظر 24 ساعه عشان اخذ الراتب اللي بعده بس ابي لما اللاعب ما يكون موجود في السيرفر التايمر ما يوقف لين يدخل بعدين يكم ابيه لما يطلع التايمر يستمر في العد لمدة 24 ساعه فاهمني ؟
    0 points
×
×
  • Create New...