PaiN^ Posted February 12, 2013 Posted February 12, 2013 إستخدم triggerServerEvent " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
yazan Posted February 12, 2013 Author Posted February 12, 2013 عناد انا ما ليا خبره كود نطرح من واحد حولت فيه ما قدرت ادمجه مع كلنت و كلنت اومره غير عن سيرفر سبحان الله ---------------------------------- LUA 56%
PaiN^ Posted February 12, 2013 Posted February 12, 2013 تكفى عناد قسم دخت وانا احاول اطرح الكود كامل تكفى " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
hassan.k.s.a Posted February 12, 2013 Posted February 12, 2013 (edited) جرب -- Client addEventHandler("onClientRender",getRootElement(),function() triggerServerEvent("getSpeed",localPlayer) end) addEvent("StartSound",true) addEventHandler("StartSound",getRootElement(),function() local sound = playSound("name.mp3") setSoundVolume(sound,0.9) end) addEvent("StopSound",true) addEventHandler("StopSound",getRootElement(),function() destroyElement(sound) end) -- Server 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 addEvent("getSpeed",true) addEventHandler("getSpeed",getRootElement(),function() local Veh = getPedOccupiedVehicle(source) local Speed = getElementSpeed (Veh,"kmh") if Speed > 120 then triggerClientEvent(source,"StartSound",source) else triggerClientEvent(source,"StopSound",source) end end) Edited February 12, 2013 by Guest http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
PaiN^ Posted February 12, 2013 Posted February 12, 2013 شلون أضيف ملف الصوت للميتا ؟؟ " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
yazan Posted February 12, 2013 Author Posted February 12, 2013 مشكور بجرب و برد خبر سبحان الله ---------------------------------- LUA 56%
yazan Posted February 12, 2013 Author Posted February 12, 2013 شلون أضيف ملف الصوت للميتا ؟؟ غير سسس سبحان الله ---------------------------------- LUA 56%
3NAD Posted February 12, 2013 Posted February 12, 2013 @ hassan.k.s.a كودك بيجيب لآق بالسيرفر .. جرب كلنت -- Client Side 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 sound = playSound ( "name.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) local theSpeed = getElementSpeed ( localPlayer, "kmh" ) if theSpeed > 10 then setSoundPaused ( sound, false ) else setSoundPaused ( sound, true ) end end end , 2500, 0 )
yazan Posted February 12, 2013 Author Posted February 12, 2013 قائمه شكر ض1 hassan.k.s.a 3nad alm برستيج دويكس اجرب و ارد خبر سبحان الله ---------------------------------- LUA 56%
hassan.k.s.a Posted February 12, 2013 Posted February 12, 2013 العفو http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
yazan Posted February 12, 2013 Author Posted February 12, 2013 عناد كودك خربان و كود حسان شغال تمام سبحان الله ---------------------------------- LUA 56%
PaiN^ Posted February 12, 2013 Posted February 12, 2013 العفو يالغالي " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
hassan.k.s.a Posted February 12, 2013 Posted February 12, 2013 (edited) جرب ذا احسن -- Client 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 setTimer(function() local Veh = getPedOccupiedVehicle(localPlayer) local Speed = getElementSpeed(Veh,"kmh") if Speed > 120 then if isElement(sound) then destroyElement(sound) end local sound = playSound("name.mp3") setSoundVolume(sound,0.9) else setSoundVolume(sound,0) end end,700,0) Edited February 12, 2013 by Guest http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
3NAD Posted February 12, 2013 Posted February 12, 2013 لوول نسيت احط تعريف السيارة بدال اللاعب بـ الكود ذا getElementSpeed ( localPlayer, "kmh" ) على العموم التصحيح -- Client Side 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 sound = playSound ( "name.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) local theSpeed = getElementSpeed ( theVehicle, "kmh" ) if theSpeed > 10 then if isSoundPaused ( sound ) then setSoundPaused ( sound, false ) end else if not isSoundPaused ( sound ) then setSoundPaused ( sound, true ) end end end end , 1000, 0 )
yazan Posted February 12, 2013 Author Posted February 12, 2013 مشكورين بس حسان ترا كودك يجيب لاق شنييييييييع سبحان الله ---------------------------------- LUA 56%
hassan.k.s.a Posted February 12, 2013 Posted February 12, 2013 مشكورين بس حسان ترا كودك يجيب لاق شنييييييييع العفو + اخر كود مايجيب لاق جرب اخر كود طرحته لك http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
yazan Posted February 12, 2013 Author Posted February 12, 2013 كود الاول معنه يجيب لاق لكنه من سرعه يسير مثل هاردز سبحان الله ---------------------------------- LUA 56%
3NAD Posted February 12, 2013 Posted February 12, 2013 -- Client Side 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 sound = playSound ( "name.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) local theSpeed = getElementSpeed ( theVehicle, "kmh" ) if theSpeed > 10 then if isSoundPaused ( sound ) then setSoundPaused ( sound, false ) end else if not isSoundPaused ( sound ) then setSoundPaused ( sound, true ) end end end end , 1000, 0 ) جربت هذا ؟؟
iPrestege Posted February 12, 2013 Posted February 12, 2013 -- Client Side 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 sound = playSound ( "name.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) local theSpeed = getElementSpeed ( theVehicle, "kmh" ) if theSpeed > 10 then if isSoundPaused ( sound ) then setSoundPaused ( sound, false ) end else if not isSoundPaused ( sound ) then setSoundPaused ( sound, true ) end end end end , 1000, 0 ) جربت هذا ؟؟ اي شغال تمام
iMr.Dawix~# Posted February 12, 2013 Posted February 12, 2013 -- Client Side 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 sound = playSound ( "name.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) local theSpeed = getElementSpeed ( theVehicle, "kmh" ) if theSpeed > 10 then if isSoundPaused ( sound ) then setSoundPaused ( sound, false ) end else if not isSoundPaused ( sound ) then setSoundPaused ( sound, true ) end end end end , 1000, 0 ) جربت هذا ؟؟ الصوت يمشي مع السياره؟ ويطلع للي ييسوق بس؟ <<ملقوف My E-mails: [ [email protected] ],[ [email protected] ],[ [email protected] ] " Manners Maketh Man " " الأخلاق تصنع الرجل " ░░░░░███████ ]▄▄▄▄▄▄▄▄ BooM ! ▂▄▅█████████▅▄▃▂ ███████████████████]. ◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙◤
yazan Posted February 12, 2013 Author Posted February 12, 2013 شتغل فلللله ههه عناد ارفعلي صوت الهردز ترا كان ودي تي تي مثل سياره الحقيقي سبحان الله ---------------------------------- LUA 56%
3NAD Posted February 12, 2013 Posted February 12, 2013 جربت هذا ؟؟ الصوت يمشي مع السياره؟ ويطلع للي ييسوق بس؟ <<ملقوف يمشي مع السيارة ويسمعه كل الركاب
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