Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. ^ الكود احسه معقد >< دور واحد خبير يضبطه لكك, ما اتوقع انك بتقدر تسويةهً + ما اشوف انك استخدمت الوظائف الي عطاك اسامةهً
  2. ما اتوقع في فنكشن او ايفنت لـ انقلاب السيارة -- + اتوقع تقدر تستخدم setElementData getElementData + https://forum.multitheftauto.com/viewto ... 95#p547330
  3. برستيجج, هو ما قال يلغي الصوت, انت مسوي destroyElement = ؟
  4. ^ انا مسوية كذآ لاني انا مسوي كود ... فعشآن كذآ سويتهه,
  5. ^ بس في نآس ما تفهم الا بأمثله وآضحه, + ياريت ما تقلب الموضوع نقاش
  6. ^ الامثلة غير واضحه , + حاطين اثنين string.rep انت وكرسوفا + Exmaple1 = string.rep("Tete", 5) -- المضاعفة 5 مرات TeteTeteTeteTeteTete -- النتيجة Example2 = string.rep("T .", 20) -- المضاعفة 20 مرة T .T .T .T .T .T .T .T .T .T .T .T .T .T .T .T .T .T .T .T . -- النتيجة -- setTimer( -- نسوي تايمر function( ) -- نسوي وظيفة guiSetText( Tested, 'My'.. string.rep( 'The Best', 2 )) -- نكتب في اللبل end, 500, 20 -- وقت التايمر ) -- اغلاق قوس التايمر ^ شوف الفرق بالفهم
  7. هذي الوظيفة تستخدم اذا كنت تبي تجيب كلام, مثلآ, Label = guiCreateLabel(...) addEventHandler("onClientResourceStart",resourceRoot, function() outputChatBox("You're in ".. guiGetText(Label)) end) مثلا لو كان اللبل مكتوب فيه The water راح يجي بالشات You're in The water
  8. بما انك تبيها خاص ليه تسوي موضوع ؟ عندك مشكله اطرح كودك,
  9. سو جدول بالكلمات, والي يكتبها غيرك ياكل باند, الي يكتب chgpass... افضل ما يحتاج قروب ولآ شيء
  10. اقول المنتدى لونه اسود برستيج انصبغغ بوويةة لو صبغوةَ اسمنت احسن بالتوفيقٌ,
  11. ^ مافي ولا مشكله يبي اذا حط صح يشتغل الصوت بعد ما يمشي, + اذا وخر الصح يطفي الصوت ما يشتغل مره ثآنيهه, + الكود الي عطيته صحيح ,,
  12. انت اصلا مو رابطه بالضغظ, + ليه لازم يضغط موافق ؟ اصلا الصوت ما بيشتغل الا لين يمشي , يعني مافيه فرق , + شيل الصح وامشي , ما راح يشتغل ,
  13. للي ما فهم مثآل آخر : function() -- نسوي وظيفة Math = math.random(10,50) -- نسوي رقم عشوائي setWaveHeight(Math) -- نربط الماء بالرقم العشوائي end -- نغلق الوظيفة طبعآ كذآ البحر راح ينقلب فوق تحت وبالتوفيق,,, Edit#: عندك خطأ بآخر مثآل نسيت اسم الفنكشن + القوس function spawn(player) if not isElement(player) then return end repeat until spawnPlayer ( player, -3017.2+math.random(1,5), -3527.1+math.random(5,9), 24.0, 180, 46, 0, 0) math.random = أختيار عشوائي fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root,spawn)
  14. نورتوآ الموضوع, xXDawiXx @ guiSetText( Tested, 'Wait'.. string.rep( '.', 3 )) الافضل انك ما تكتب في اللبل عشآن تسوي له سيت تكست كذا راح يكرر النقطه ثلاث مرات , يعني كذآ: Wait. Wait.. Wait... ^ ملاحظة مو تحت بعض بس مثآل هي تجي جنب بعض, + لو تبي تحت بعض يصير كذآ guiSetText( Tested, 'Wait\n'.. string.rep( '.', 3 )) إن شاء الله فهمت
  15. ^ مبروك الرتبةة, mohssan123@ + لو قريت الويكي بتعرف : rx: A floating point number representing the rotation about the X axis in degrees. ry: A floating point number representing the rotation about the Y axis in degrees. rz: A floating point number representing the rotation about the Z axis in degrees.
  16. Я думаю, что это лучший : https://community.multitheftauto.com/in ... ls&id=1833 http://screenshot.su/show.php?img=65436 ... 7db6a3.jpg успех
  17. بسم الله الرحمن الرحيم , السلام عليكم ورحمه الله وبركاته, للي ما يعرفها string.rep بشرح , ؟ string.rep آولا : وش هي تستخدم لمضاعفة الشيء , كلمة او حرف... مثآل : setTimer( -- نسوي تايمر function( ) -- نسوي وظيفة guiSetText( Tested, 'My'.. string.rep( 'The Best', 2 )) -- نكتب في اللبل end, 500, 20 -- وقت التايمر ) -- اغلاق قوس التايمر My = الكلمة الي تبي بعدها الكلام يتكرر The Best = الكلام الي راح يتكرر 2 = عدد التكرار مثال آخر : point = string.rep('.', 3) -- نكرر النقطة 3 مرات function update() -- نسوي وظيفة outputChatBox("Wait Loading"..point.." ") -- نربط الشات بالتكرار end -- نغلق الوزيفة addEventHandler("onClientResourceStart",resourceRoot,update) -- نسوي ايفنت اذا اشتغل المود آتمنى يكون الشرح وآضح , بالتوفيق...
  18. + http://www.lua.org/manual/5.1/manual.html#pdf-pairs
  19. by Kenix on Tue May 08, 2012 12:59 pm + Link don't work
  20. اولآ : ما راح يشتغل الصوت الا اذا مشيت. ثانيآ : لو وخرت الصح وتمشي ما راح يشتغل ثالثأ : هو اصلا ما يشتغل الا اذا مشيت كيف تبي بالزر رابعآ : اسألك بالله الذي لا اله الا هو انك ما تحطه اغاني
  21. viewtopic.php?f=160&t=52926&p=515064&hilit=pairs#p515064
  22. -- لم يتم التجربة GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Scrollbar = {} wnd = guiCreateWindow(0.645,0.0166,0.355,0.4217,"اصوات",true) GUIEditor_Checkbox[1] = guiCreateCheckBox(24,38,100,23,"0",false,false,wnd) GUIEditor_Checkbox[2] = guiCreateCheckBox(24,92,100,23,"1",false,false,wnd) GUIEditor_Checkbox[3] = guiCreateCheckBox(24,148,100,23,"2",false,false,wnd) GUIEditor_Checkbox[4] = guiCreateCheckBox(151,38,100,23,"3",false,false,wnd) GUIEditor_Checkbox[5] = guiCreateCheckBox(151,91,100,23,"4",false,false,wnd) GUIEditor_Checkbox[6] = guiCreateCheckBox(151,148,100,23,"5",false,false,wnd) GUIEditor_Button[1] = guiCreateButton(11,208,68,24,"اغلاق",false,wnd) GUIEditor_Button[2] = guiCreateButton(144,208,68,24,"موافق",false,wnd) GUIEditor_Label[1] = guiCreateLabel(91,230,107,19,"",false,wnd) guiSetVisible(wnd, false) function getElementSpeed ( element, unit ) if unit == nil then unit = 0 end if isElement ( element ) then local x,y,z = getElementVelocity ( element ) if ( unit == "mph" or unit == 1 or unit == "1" ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end addEventHandler("onClickGUIClick", root, function() if (source == GUIEditor_Button[1]) then guiSetVisible(wnd, false) showCursor( false ) elseif (source == GUIEditor_Button[2]) then guiSetVisible(wnd, false) showCursor( false ) end end) -------------------------------------- sound = playSound ( "1.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) addEventHandler("onClientRender", root, function() if (guiCheckBoxGetSelected(GUIEditor_Checkbox[1]) == true) then local theSpeed = getElementSpeed ( getPedOccupiedVehicle ( localPlayer ), "kmh" ) if theSpeed >= 20 then setSoundPaused ( sound, false ) else setSoundPaused ( sound, true ) end end end ) ------------------------ sound2 = playSound ( "2.mp3", true ) setSoundVolume ( sound2, 0.5 ) setSoundPaused ( sound2, true ) addEventHandler("onClientRender", root, function() if (guiCheckBoxGetSelected(GUIEditor_Checkbox[2]) == true) then local theSpeed = getElementSpeed ( getPedOccupiedVehicle ( localPlayer ), "kmh" ) if theSpeed >= 20 then setSoundPaused ( sound2, false ) else setSoundPaused ( sound2, true ) end end end ) ------------------------ sound3 = playSound ( "3.mp3", true ) setSoundVolume ( sound3, 0.5 ) setSoundPaused ( sound3, true ) addEventHandler("onClientRender", root, function() if (guiCheckBoxGetSelected(GUIEditor_Checkbox[3]) == true) then local theSpeed = getElementSpeed ( getPedOccupiedVehicle ( localPlayer ), "kmh" ) if theSpeed >= 20 then setSoundPaused ( sound3, false ) else setSoundPaused ( sound3, true ) end end end ) ---------------------- sound4 = playSound ( "4.mp3", true ) setSoundVolume ( sound4, 0.5 ) setSoundPaused ( sound4, true ) addEventHandler("onClientRender", root, function() if (guiCheckBoxGetSelected(GUIEditor_Checkbox[4]) == true) then local theSpeed = getElementSpeed ( getPedOccupiedVehicle ( localPlayer ), "kmh" ) if theSpeed >= 20 then setSoundPaused ( sound4, false ) else setSoundPaused ( sound4, true ) end end end ) ---------------------------------- sound5 = playSound ( "5.mp3", true ) setSoundVolume ( sound5, 0.5 ) setSoundPaused ( sound5, true ) addEventHandler("onClientRender", root, function() if (guiCheckBoxGetSelected(GUIEditor_Checkbox[5]) == true) then local theSpeed = getElementSpeed ( getPedOccupiedVehicle ( localPlayer ), "kmh" ) if theSpeed >= 20 then setSoundPaused ( sound5, false ) else setSoundPaused ( sound5, true ) end end end ) -------------------------- sound6 = playSound ( "6.mp3", true ) setSoundVolume ( sound6, 0.5 ) setSoundPaused ( sound6, true ) addEventHandler("onClientRender", root, function() if (guiCheckBoxGetSelected(GUIEditor_Checkbox[6]) == true) then local theSpeed = getElementSpeed ( getPedOccupiedVehicle ( getLocalPlayer() ), "kmh" ) if theSpeed >= 20 then setSoundPaused ( sound6, false ) else setSoundPaused ( sound6, true ) end end end )
×
×
  • Create New...