Jump to content

AHMED MOSTAFA

Members
  • Posts

    1,367
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by AHMED MOSTAFA

  1. 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 ...................................................................................................................... تم شرح هذا الموضوع باللغة العربية
  2. وااو عليك يا بطل هههههههههه منور مدري وش اقول على هذي الامشونات ههههههههههه
  3. ليه يسويها للاعب ثاني ؟؟؟؟ الا اذا كان يبي يختار لاعب معين مثلاً في هذي الحالة بيضطر يستخدم الترايجر
  4. لا ما فيه مشاكل .. يسويه لوكال بلاير عادي
  5. , انت وقت تسوي لوحة جديدة مثلاً اكيد في البداية تضغط على زر الماوس الايمن وتضغط اول وحدة وتختار النافذة طيب بعدها لو تبي تسوي شي داخل النافذة وش تسوي ؟ اضغط داخل النافذة بزر الماوس الايمن واختار الاولة وسوي الشي اللي تبيه كذا مارح تنزل تحت
  6. وضح اكثر من فضلك
  7. I know this topic is old ... But i want to be [ any rank ] in Arabic Section ... [ For Help Not For Anything Other ] I'm active and i'm helping other forum members You can " Follow " me and see me I am sharing topics that benefit others in [ This Section ] like [ This Section ] or [ This Section ] or [ This Section ] thank you ...
  8. @King SpY addEventHandler('onClientRender',root, function() guiText = guiGetText(GUIEditor.edit[1]) if tonumber (guiText) then money = 200*tonumber(guiText) end if tonumber ( money ) then guiSetText(GUIEditor.button[1], tonumber(money).." $" ) else guiSetText(GUIEditor.button[1], "only numbers !!!" ) end end ) ???
  9. والله نورت الموضوع يا شيخ سوكينج
  10. addCommandHandler createMarker
  11. سوكينج دائماً صافي النية لهذا السبب جبت له شي من الشاطئ ميشان يستريح فيه وآسف على الصورة اللي سويتها لك ادري ماهي حلوة بس بسوي جديد ان شاء الله ونورت الموضوع بمرورك الرائع
  12. @Abdul KariM @Master_MTA @#Soking @#_iMr.[E]coo @#BrosS @MR.NaiF-MTA @coNolel @iMr.WiFi..! @Abu-Solo @AchrefF @Mhmd.z @L3yr رأيكم نايف . بروس . ابو سولو ادري تصميم ماهو حلو مرة ... لكن جديد قريب ان شاء الله
  13. @#!~Aln3mani~#! المهمة المدة المبلغ طرق الدفع
  14. السطر 43 مالها داعي end
  15. جديد .. رسالة بمكسب او خسارة للأشياء اللي معك
  16. صحيح حقت السريال للسيرفر فقط ورح تصير بقات اذا بكلينت يعني ممكن تجيب سريال عشوائي إلخ ..
  17. وليه ما تسوي داتا معينة لكل 5 اشخاص وتسوي لووب ميشان تجيب اللاعبين وتتحقق من الداتا وترسل الرسالة عادي بواسطة اللوب للأشخاص اللي معهم الداتا ومب لازم تسوي كانسل افنت ولا شي
  18. جديد .. شراء الاسلحة قريباً انشاء ذخيرة من مواد المنجم
  19. لو كنت ابي اسويها كدة كنت سويتها بس اللي ما تدريه ان التايمر وقته مظبوط اما الرندر فـ هو يتحدث كل فترة غير معروفة يعني يتحدث بتايمر عشوائي واذا كانت شاشة اللاعب كبيرة مثلاً رح تجي في البداية بحركة ليست سريعة بس بعدها رح تجي سريعة و رح تسرع كمان وكمان بس ما يخالف بما انك رح تخلي التصميم بالنص + كودي ما فيه لاق .. واسمك منور الـ مثال اللي انا كتبته
×
×
  • Create New...