Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 28/04/17 in Posts

  1. بسم الله الرحمن الله الرحمن الرحيم سلام عليكم ورحمة الله وبركاته عندي شرح للتحققات مابين القوسين أو التحققات المصغرة , addEventHandler( "onClientGUIClick", root, -- سوينا حدث عند الضغط function ( ) -- وظيفة return ( source == aButton and outputChatBox ("لقد ضغطت على الزر") ) --[[ نسوي استرجاع مع تحقق مصغر اذا ضغط على الزر and , في التحقق المصغر == Then يعني كأنك كذا تسوي if source == aButton then outputChatBox ("لقد ضغطت على الزر") end بشكل مصغر !! ]] end ) طبعاً التحققات المصغرة غالباً تجي مع الريتورن !! اعطيك مثال ثاني addEventHandler ( "onPlayerWasted", root, -- سوينا حدث اذا اللاعب مات function ( _,killer ) -- تخطينا البارتمر الاول والي هو عدد الرصاصات + واخذنا البارتمر الثاني الي هو القاتل return ( killer == source and outputChatBox( "لقد قتلت نفسك" ) or outputChatBox( "لقد قتلك شخص آخر" ) ) --[[ سوينا استرجاع وتحققنا انه القاتل يساوي الي مات راح يرجعله outputChatBox( "لقد قتلت نفسك" ) or == else واذا ماقتل نفسه يرجعله outputChatBox( "لقد قتلك شخص آخر" ) ]] end ) إيه نعم , مثال : -- true = ترو -- false = فولس aWifi = false -- فولس aWifi نخلي قيمة function Check ( ) -- نسوي وظيفة بأسم Check local aWifi = ( aWifi == true and false or true ) -- نعرفه بتحقق --[[ اذا كان aWifi ترو راح يعرف قيمة aWifi فولس واذا ليس ترو راح يعرفه ترو ]] return tostring(aWifi) -- ونسترجع القيمة بـ النتيجة , ونحولها الى سترنق end outputChatBox( Check ( ) ) -- نظهره في شات وكان هاذي هي نهاية الشرح اذا عندك سؤال او استفسار تقدر تسئل في الموضوع + واذا عندك مثال اطرحه وسلام خير الختام
    2 points
  2. @Master_Ali خليه يجرب ونشوف لاني مافهمت عليك وش تقصد @coNolel شوف الدي بق وش قالك وصحح خطأك
    2 points
  3. وادخل الاحداثيات بالتيبل مع المسج وبعدين لوب وفرغ البيانات y كل مسج تسويه زود على قيمة
    2 points
  4. السلام عليكم ورحمة الله وبركاته ! بشرح لكم عن حدث لما يتكلم اللاعب بالشات "onPlayerChat" فاىدتها لما يتكلم الاعب بالشات , تقدر تسوي امر وبامكانك تمنعه من الكلام بالشات [ _ ] نأخذ البارمتر للوظيفة , البارمتر ينحطن داخل الوظيفة , وتقدر تتجاوز بارمتر باستخدام string message, int messageType string message :- " " الرسالة اللتي قام اللاعب بكتابتها ! , تكون بين سترنج اللي هو ' ' او int messageType :- ( me ) وفي الرسالة من اف 8( teamsay )وفي رسالة التيم ( say ) نوع الرسالة , كيف يعني ؟ , في الرسالة العامة طبعا تكون بالأرقام : - الرسالة العامة = 0 رسالة اف 8 = 1 رسالة اتيم = 2 من هو المصدر في هذا الايفنت ؟ source هو اللذي قام بكتابة الرسالة ويكون نأخذ مثال في هذا المثال اذا كتب اللاعب كلمة صحة نعطيه صحة ! addEventHandler ( "onPlayerChat" , root , -- حدث عندما يتكلم بالشات function ( msg , msgType ) -- وظيفة وتحتوي على البارمتر لل الحدث if msg == 'صحة' then -- التحقق من الرسالة المكتوبة setElementHealth ( source , 100 ) -- اعطائه صحة end -- انهاء التحقق من الرسالة end -- انهاء الوظيفة ) -- اغلاق الحدث مثال 2 في هذا المثال يقوم بالتحقق من نوع الرسالة المكتوبة اذا كانت 2 ف يلغي ارسالة addEventHandler ( "onPlayerChat" , root , -- حدث عند التكلم بالشات function ( _ , msgType ) -- وظيفة وتحتوي بارمتر الحدث -- تجاوزنا البارمتر الاول لاننا لا نحتاجه if msgType == 1 then -- التحقق من نوع الرسالة cancelEvent ( ) -- نكنسل الحدث بحيث ما تنرسل الرسالة end -- انهاء التحقق من نوع الراسلة end -- انهاء الوظيفة ) -- اغلاق الحدث اتمنى انكم استفدتوا والسلام عليكم ورحمة الله وبركاته
    1 point
  5. السلام عليكم ورحمة الله وبركاته بما اني بدات احس ان اللعبه ممله وكثير ناس زيي فحبيت اعرض على جميع المبرمجين من صغيرهم لكبيرهم فكرة عمل سيرفر موحد لكل العرب وفكونا من السيرفرات اللي تقلد ذي خلاص طفشنا من هجوله طفشنا من حرب عصابات حتى لو طورنا فيه كل ذا مافيه تجديد فقلت جاتني فكره جديده ما شفتها باي سيرفر وهي جيم مود تجاره اي نعم زي ما سمعت المهم المودات بتكون من الصفر كل شي بحيث ان جميع مبرمجين العرب بيجتمعون به نبي ذا السيرفر يكسر الدنيا يجيب جميع الزوار عليه اولا بنبدا بلغة عربيه ثم مع تحديث السيرفر يتم دعم اللغه الانجليزيه ونستمر في التطوير وفي الحاله ذي في شخصيات ادعوها لهذا الموضوع خصيصا @Abdul KariM @3NAD @iPrestege @MR.S3D @#Soking @!#Nsoor @<MR,Tanteal/> واللي نسيته في قلبي محفوظ ولك انت ياللي تقرا الموضوع حتى لو ما كانت تعرف تبرمج شارك بافكارك
    1 point
  6. Hello, We, the eXo-Reallife team, would like to release a module that is also used on our server. It is a pathfinding module developed by Jusonex and StiviK. The module uses the A * algorithm. (https://en.wikipedia.org/wiki/A*_search_algorithm) We use this for our GPS: Why did we develop a module for this and did not simply write a script? This has a very simple reason. The module calculates the routes in your own threads, which has the advantage that it is much faster than a script, and secondly, you can calculate how much routes as you want side by side. This will not cause any lags etc.! What are the features of the module? The module can load several graphs / nodes side by side The module calculates the routes in its own threads Very useful API functions (such as findNodeAt or getNodeNeighbors) What are the main features? int loadPathGraph (String pathToGraphFile) This function loads the graph from the given file and returns a GraphId which you need for all other functions. If something does not work, false is returned. bool findShortestPathBetween (int graphId, float startX, float startY, float startZ, float endX, float endY, float endZ, function callback) This function finds the shortest route between the points. (Unfortunately, no vectors can be handed over!) The callback function is called when the calculation is finished. As an argument, either a table is returned that contains all nodes, or false if no route is found. bool unloadPathGraph (int graphId) You can use this function if you no longer need and want to unload the graph, it returns true if everything is fine, false if an error has occurred. You will find all the other functions that are included in our documentation. Why is the eXo team releasing all this? Well, that has the simple reason, we want to share our work with others and not just keep it for us! We hope we can enrich you with it and vlt. Even help! Where can I download the module? The whole module is open-source and can be viewed in our GitHub organization. It's released under the MIT License. GitHub organization: https://github.com/eXo-MTA Repository: https://github.com/eXo-MTA/ml_pathfind Download the module (Windows / Linux): https://github.com/eXo-MTA/ml_pathfind/releases Nodes of all roads in SA: https://github.com/eXo-MTA/ml_pathfind/blob/master/test/sa_nodes.json If you find any mistakes or suggestions, you can simply create a new issue and we will look into it. So now that's it, have fun with the module! - StiviK and the eXo-Reallife team (Original thread in German: https://www.mta-sa.org/thread/36365-release-mta-sa-pathfinding-module/?postID=407938#post407938)
    1 point
  7. السلام عليكمرورحنة الله وبركاته ، اليوم بشرح لكم 3 اشياء مهمة ورح تستخدمها دائما رح نشرحهن ال 3 مع بعض وناخذ امثلة else اول شي فايدته ينفي الحدث ، يعني انت سويت تحقق من ان اللاعب معه 500 ، اذا ما معه تنفيه elseif ثاني شي تقوم بتكرار الحدث مثلا انت تخققت انه اذا صحة اللاعب 50 يعطيه 10 ، وتكرر التحقق اذا معه 70 يعطيه 20 مثلا end ثالث شيء هو هذي تسمى انهاء ، تستخدم لانهاء التحققات ، وتستخدم للانهاء الوظيفة ( الفنكشن ) ؛ نأخذ مثال على بركة الله في هذا المثال ، لما يضغط الاعب على زر يتحقق من ماله اذا كان 100 يعطيه صحة 10 واذا ما معه ما يعطيه addEventHandler ( "onClientGUIClick" , root , -- حدث function ( ) -- وظيفة ( فنكشن if source == button then -- التخقق من الزر if not getElementHealth ( localPlayer ) == 100 then -- اذا ما كانت صحته 100 if getPlayerMoney ( ) >= 100 then -- التحقق من مال اللاعب انه اكبر او يساوي 100 setElementHealth ( localPlayer , 100 ) -- اعطائه صحة else -- اذا ما كان معه 100 outputChatBox ( " you dont money " ) -- اخراج نص بالشات بانه لا يمتلك مال -- هذي تابعة للتحقق الاول اللي هو اذا كان معه 100 end -- انهاء التحقق الاول else -- اذا كانت صحته 100 outputChatBox ( " Your health 100 ! " ) -- اخراج نص بالشات بانه صحته كاملة -- هذي تابعة للتحقق الثاني اللي هو اذا ما كانت صحته 100 end -- انهاء التحقق من صحة اللاعب end -- انهاء التحقق من الزر end -- انهاء التحقق من الوظيفة ) نأخذ مثال 2 على التكرار في هذا المثال اذا ضغط زر يعطيه مال واذا ضغط زر اخر يعطيه صحه addEventHandler ( "onClientGUIClick" , root , -- حدث عند الضغط ع الزر function ( ) -- وظيفة if source == button1 then -- التحقق من الزر givePlayerMoney ( 100 ) -- اعطائه مال elseif source == button2 then -- نكرر التحقق من الزر اذا ضغط على زر اخر setElementHealth ( localPlayer , 100 ) -- اعطائه صحة end -- انهاء التحقق من الزر end -- انهاء الوظيفة ) -- اغلاق الحدث -- تكرار التحقق من الزر ما يحتاج اند ! نأخذ مثال 3 عليهن كلهن في هذا المثال اذا ضغط زر يتحقق من ماله ويعطيه صحة واذا كان ليس معه مال ينفيه , واذا ضغط على زر اخر يتحقق من ماله ويسحب صحته واذا كان ما معه مال ينفي الحدث addEventHandler ( "onClientGUIClick" , root , -- حدث عند الضغط على الزر function ( ) -- وظيفة if source == button1 then -- التحقق من الزر if getPlayerMoney () >= 100 then -- التحقق من ان لديه مال setElementHealth ( localPlayer , 100 ) -- نعطيه صحة else -- اذا ما معه مال outputChatBox ( " you dont money " ) -- اخراج نص بالشات بان لا يمتلك مال end -- انهاء التحقق من المال -- لو ما انهينا التحقق من المال وكررنا الحدث ، رح يضل يتحقق من المال اللي معه elseif source == button2 then -- تكرار الحدث if getPlayerMoney ( ) >= 100 then -- التحقق من ماله setElementHealth ( localPlayer , 0 ) -- نسحب صحته else -- اذا ما معه فلوس outputChatBox ( " لا تملك مال " ) -- end -- انهاء التحقق من الفلوس end -- انهاء التحقق من الزر end -- انهاء الوظيفة ) -- اغلاق الحدث والسلام عليكم ورحمة الله وبركاته اتمنى تنكم استفدتو
    1 point
  8. Hello guys ... I will explain something important about code First [ when you ask for help, how do other help you? ] Like [ Help: how i can create an ped ? ] [ For example ] someone will write that .. -- You can use this code createPed did you understand anything ? ..................................................................................................... ..................................................................................................... ..................................................................................................... givePlayerMoney -- blue getPlayerAccount -- yellow playSound -- red At the first of explaining these codes you should know that The script consists of three files meta.xml client.lua server.lua for more information about meta.xml click here Of course, it is known that the meta.xml file is the main file in the script there is no meta.xml file, there is no script !! what about [ client file ] and [ server file ] There are special codes for Client file and special code for server file and special codes for client file and server file [ For Example ] playSound -- red red code [ for client file ] getPlayerAccount -- yellow yellow code [ for server file ] givePlayerMoney -- blue blue code [ for server file or client file ] I have not yet taken advantage of the code and how can I bring an example? Simply if the code already exists you can just click on it The browser will take you directly to the wiki page You will find both .. Detailed explanation of the code One example or more how you can know if this code for client file or server file or it [ Shared ] ? you will find Client-only function or Server-only function or Shared function where are these words ? Look at this picture Now is the time to explain the important stuff If you click on this code [ For Example ] playSound -- client only That will open page like this Look at this picture [ For Example ] getPlayerAccount -- server only -- and getAccountName -- server only Of course, you will open a page with an explanation and examples and others ........................................................... how you can create an function ?? This depends on the code you want to create for it [ For Example .. the previous code ] getPlayerAccount will be function test () acc = getPlayerAccount ( thePlayer ) end -- test: the name of the function -- thePlayer: that you want to get his account what about the "event" and the function of "event" ? -- Ex "onClientPlayerWasted" "onPlayerWasted" "onPlayerJoin" Of course, that will open page on your browser with [ Example, explained, and other ] what is meant of source ? source: This is the element that the event originated from. [ For Example ] the source in this "event" is the player who wasted "onPlayerWasted" [ For Example ] the source in this "event" is the vehicle that was blown up "onVehicleExplode" okay ... explain the event as follows create the "event" and the function and the argumnts [ For Example ] function killerProject ( _, killer, killerweapon ) if killer then if getElementType ( killer ) == "player" then outputChatBox ( " [ the killer "..getPlayerName(killer).." killer weapon "..killerweapon.." ] ", source ) end end end addEventHandler ( "onPlayerWasted", root, killerProject ) --[[ killer: an element representing the player or vehicle who was the killer. If there was no killer this is false. killerweapon: an integer representing the killer weapon or the damage type. The source of this event is the player that died or got killed. --]] where did you get these codes from ? killerweapon and killer and source Look at this picture how you can know if this event for client file or server file ? when you click on the "event" you will find Clientside event or Serverside event the first word [ Clientside event ] Indicate client file the second word [ Serverside event ] Indicate server file where are these words ? Look at this picture ...................................................................................................................... my english is bad ...................................................................................................................... تم شرح هذا الموضوع باللغة العربية
    1 point
  9. That can't be from the DISM or SFC scan if it found nothing.. and one step back you said it was improved. Weird.. Please; 1: get Display Driver Uninstaller (DDU) here: http://www.guru3d.com/files-details/display-driver-uninstaller-download.html 2: run DDU and let it completely remove your graphics drivers (make sure to select Nvidia in dropdown of which one to clean) 3: restart your PC and re-install with this driver: http://www.geforce.com/drivers/results/117918 4: Download and install ''HDD health'' from: http://panterasoft.com/hdd-health/ and show me a screenshot of your HDD's analysis results. 5: run a full malware/antivirus scan By the way, it's good that you keep troubleshooting as most users would be 1) incapable of following all steps or 2) would've already stopped trying
    1 point
  10. Windows Firewall was already automatic and started. Windows update services were automatic too but I had to start it myself. Currently doing other things from your post...
    1 point
  11. شرح رائع وجميل , شروحاتك ي آيكو أكثر من رآئعة تفيد الناس كثير, أتمنى أنك تواصل , Your Friend ; MR.StoRm_# !, Good luck !
    1 point
  12. بس للتوضيح دى قيمه و تزيد و تنقص حسب نزع الحركه مو شرط أحدثت تقدر تستخدمها في الافا أو أو او
    1 point
  13. شوف المثال وطبق الي تبية function createNewLog ( myMessage ) -- # By #N3xT if ( myMessage ) and ( myMessage ~= "" ) then local file = fileCreate("login.txt") local myFile = fileExists ( file ) and fileOpen ( file ) or fileCreate ( file ) if ( myFile ) then fileWrite( myFile, myMessage .. "\n" ) fileSetPos( myFile, fileGetSize ( myFile ) ) fileClose ( myFile ) end end end --- Test addCommandHandler ( "command" , function ( player ) createNewLog ( "Player Name : "..getPlayerName(player) ); end );
    1 point
  14. لا طبعاً, اذا كان سيرفر سايد راح ينزل عالخادم فقط عموماً سويت لك اليوزفل فنكشن ذا function createNewLog ( myMessage ) if ( myMessage ) and ( myMessage ~= "" ) then local file = fileCreate("login.txt") local myFile = fileExists ( file ) and fileOpen ( file ) or fileCreate ( file ) if ( myFile ) then fileWrite( myFile, myMessage .. "\n" ) fileSetPos( myFile, fileGetSize ( myFile ) ) fileClose ( myFile ) end end end
    1 point
  15. ولله كفو أفداني. كنت ادور علي مود مثله
    1 point
  16. هههههههههههخخ , لك مستقبل باذن الله !
    1 point
  17. Why do people use MTAs map editor for the crap that is SAMP? MTA, in general is hundreds of times better then SAMP. Any ways you need to remodel it using 3ds max and they probably used a custom scripted downloader.
    1 point
  18. I'm wondering how did you come to the conclusion that his conduct is retarded… He only states his opinion. But I guess you just overuse the word retard and it just falls outside of the regular definition… As for the matter of the server, I fully agree with Fernando; just waiting to see how long it lasts.
    1 point
  19. For the last script, you'll have to paste your starting position, where the heli spawns, and next move to the end position, where you want the heli, and just replace "here" with that position.
    1 point
  20. ^ for physics then you need to change the id's of lamp posts and stuff (+ remove the collision files from the resource) for timecyc that is impossible But there's another way where you can make a script that Gets certain time of day and sets the sky colour
    1 point
  21. Server looks really good. Great job
    1 point
  22. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Yet another changelog and for today there hasn't been much of important updates.We got a discord moderating system which gives the moderators to handle ingame stuff through Discord, even players can do several commands in order to check something ingame.Credits to Shay.Make sure to follow this guy and drop a like on his resource for putting his time into this Also we got a new carshop design concept which is literally stunning.We've decided to change everything to 3D regarding ingame gui's such as Housing / Carshop / Foodshops / Ammunation.This will take some time but it's worth it.We'e taking the server to the next level with this.Special thanks to @danibayez for making the source open for the public, i've given my touch to the script but kept the credits for Him.Make sure to follow this guy and drop a like on his resource for putting his time into this Feel free to follow the development at our discord chat : https://discord.gg/UDAzaEp and make sure you register on www.DynastyNetwork.tk (Domain will be changed soon towards .io, smae about the theme we're changing our theme very soon so stay tuned) -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1 point
×
×
  • Create New...