AL-SAYED Posted May 23, 2013 Share Posted May 23, 2013 شلون اخلي اذا السيارة تحركت يصير صوت واذا وقفت يوقف الصوت Link to comment
AhmeD~9MoD Posted May 23, 2013 Share Posted May 23, 2013 playSound getPedOccupiedVehicle getVehicleEngineState stopSound Link to comment
iPrestege Posted May 23, 2013 Share Posted May 23, 2013 Client Side ! getElementSpeed isElement destroyElement playSound onClientRender Link to comment
AhmeD~9MoD Posted May 24, 2013 Share Posted May 24, 2013 Client Side !getElementSpeed isElement destroyElement playSound onClientRender stopSound or destroyElement Link to comment
AL-SAYED Posted May 24, 2013 Author Share Posted May 24, 2013 Client Side !getElementSpeed isElement destroyElement playSound onClientRender اذا بستخدم الgetElementSpeed لازم احط الFunction source؟ Link to comment
PaiN^ Posted May 24, 2013 Share Posted May 24, 2013 Useful Function أي فنكشن يكون أخضر في الويكي لازم تعرفه في المود عندك يعني ضيف الكود حقه في بداية المود getElementSpeed وبالنسبة للفنكشن الكود حقه : 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 outputDebugString("Not an element. Can't get speed") return false end end Link to comment
iPrestege Posted May 24, 2013 Share Posted May 24, 2013 function getElementSpeed(element,unit) -- وظيف سرعه الالمنت [ Wiki ] # 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 outputDebugString("Not an element. Can't get speed") return false end end addEventHandler("onClientRender",getRootElement( ), function ( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then if getElementSpeed ( vehicle , "km" ) > 0 then StartSound ( ) -- هنا تشغل لان السرعه فوق 0 else DestroySound ( ) -- هنا تسحب عشانة صارت السرعه 0 end end end ) Link to comment
Tete omar Posted May 24, 2013 Share Posted May 24, 2013 https://wiki.multitheftauto.com/wiki/IsElementMoving استخدم هذي افضل Link to comment
iPrestege Posted May 24, 2013 Share Posted May 24, 2013 ~ لم يتم التجربة ! -- # Client Side ! local FilePath = "Here Put File Or Url |الملف او الرابط هنآ ( =" 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 outputDebugString("Not an element. Can't get speed") return false end end addEventHandler("onClientRender",root, function ( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then if getElementSpeed ( vehicle , "kmh" ) > 0 then StartSound ( ) else DestroySound ( ) end end end ) function StartSound ( ) if isElement ( sound ) then return false end sound = playSound ( FilePath,true ) end function DestroySound ( ) if isElement ( sound ) then destroyElement ( sound ) end end Link to comment
hassan.k.s.a Posted May 25, 2013 Share Posted May 25, 2013 لو تبحث بالمواضيع القديمه راح تلاقي Link to comment
iPrestege Posted May 25, 2013 Share Posted May 25, 2013 اممم جربتة تمام تامد من ملف صوتك Link to comment
AhmeD~9MoD Posted May 25, 2013 Share Posted May 25, 2013 ماضبط تأكد من ملف الصوت عندك وهل انت ضايف الملف الصوتي في الميتا ؟؟ Link to comment
AL-SAYED Posted May 29, 2013 Author Share Posted May 29, 2013 جربت باصوات غير لكن ماضبط Link to comment
jafar Posted May 30, 2013 Share Posted May 30, 2013 جربت باصوات غير لكن ماضبط شغال 100 % Link to comment
AL-SAYED Posted May 30, 2013 Author Share Posted May 30, 2013 يمكن من نسخة الام تي اي Link to comment
jafar Posted May 30, 2013 Share Posted May 30, 2013 يمكن من نسخة الام تي اي أنا 1.3.2 شغال Link to comment
AL-SAYED Posted May 31, 2013 Author Share Posted May 31, 2013 addEventHandler("onClientRender",root, function( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then if getElementSpeed ( vehicle , "kmh" ) > 0 then StartSound ( ) else DestroySound ( ) end end end ) function StartSound ( ) if isElement ( sound ) then return false end sound = playSound ( ha7Sound,true ) end function DestroySound ( ) if isElement ( sound ) then destroyElement ( sound ) end end addEventHandler("onClientGUIClick",GUIEditor.button[6], function () triggerEvent ( "onClientRender", root) end ) طيب الحين ابغيه بزر سويت لكن ماضبط Link to comment
#Al-Ha[J]aRii Posted May 31, 2013 Share Posted May 31, 2013 addEventHandler("onClientRender",root, function( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then if getElementSpeed ( vehicle , "kmh" ) > 0 then StartSound ( ) else DestroySound ( ) end end end ) function StartSound ( ) if isElement ( sound ) then return false end sound = playSound ( ha7Sound,true ) end function DestroySound ( ) if isElement ( sound ) then destroyElement ( sound ) end end addEventHandler("onClientGUIClick",GUIEditor.button[6], function () triggerEvent ( "onClientRender", root) end ) طيب الحين ابغيه بزر سويت لكن ماضبط not checked ! function MAB_7( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then if getElementSpeed ( vehicle , "kmh" ) > 0 then StartSound ( ) else DestroySound ( ) end end end addEventHandler("onClientRender",root,MAB_7) function StartSound ( ) if isElement ( sound ) then return false end sound = playSound ( ha7Sound,true ) end function DestroySound ( ) if isElement ( sound ) then destroyElement ( sound ) end end addEventHandler("onClientGUIClick",GUIEditor.button[6], function () addEventHandler("onClientRender",root,MAB_7) end,false ) Link to comment
AL-SAYED Posted June 1, 2013 Author Share Posted June 1, 2013 كودي شغال تمام طيب اذا ابغيه بزر شلون؟ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now