CRoW,,# Posted March 6, 2013 Share Posted March 6, 2013 GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Window[1] = guiCreateWindow(0.6925,0.105,0.3088,0.5483,"sound By !{F}p^Bo~L|B|/\/-M#",true) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Checkbox[1] = guiCreateCheckBox(0.085,0.1094,0.1862,0.0486,"1",false,true,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) guiSetFont(GUIEditor_Checkbox[1],"clear-normal") GUIEditor_Checkbox[2] = guiCreateCheckBox(0.085,0.2888,0.1862,0.0486,"2",false,true,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[2],true) GUIEditor_Checkbox[3] = guiCreateCheckBox(0.085,0.4924,0.1862,0.0486,"3",false,true,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[3],true) GUIEditor_Checkbox[4] = guiCreateCheckBox(0.085,0.6748,0.1862,0.0486,"4",false,true,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[4],true) guiSetFont(GUIEditor_Checkbox[4],"clear-normal") GUIEditor_Checkbox[5] = guiCreateCheckBox(0.7773,0.1094,0.1781,0.0486,"5",false,true,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[5],true) guiSetFont(GUIEditor_Checkbox[5],"clear-normal") GUIEditor_Checkbox[6] = guiCreateCheckBox(0.7773,0.2948,0.1781,0.0486,"6",false,true,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[6],true) guiSetFont(GUIEditor_Checkbox[6],"clear-normal") GUIEditor_Checkbox[7] = guiCreateCheckBox(0.7773,0.5046,0.1781,0.0486,"7",false,true,GUIEditor_Window[1]) guiSetFont(GUIEditor_Checkbox[7],"clear-normal") GUIEditor_Checkbox[8] = guiCreateCheckBox(0.7773,0.6717,0.1781,0.0486,"8",false,true,GUIEditor_Window[1]) guiCheckBoxSetSelected(GUIEditor_Checkbox[8],true) guiSetFont(GUIEditor_Checkbox[8],"clear-normal") guiSetVisible (wnd, false) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F10", "down", OpenWin) addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) addEventHandler("onClientGUIClick", root, function () if ( source == GUIEditor_Checkbox[1] ) then 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 ( "1.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 ) elseif ( source == GUIEditor_Checkbox[2] ) then 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 ( "3.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 ) elseif ( source == GUIEditor_Checkbox[3] ) then 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 ( "4.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 ) elseif ( source == GUIEditor_Checkbox[4] ) then 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 ( "5.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 ) elseif ( source == GUIEditor_Checkbox[5] ) then 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 ( "6.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 ) elseif ( source == GUIEditor_Checkbox[6] ) then 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 ( "7.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) Link to comment
CRoW,,# Posted March 6, 2013 Author Share Posted March 6, 2013 هــــريــــسـه ههههههههههه يعني جايب العيد الكود كله غلط في غلط ؟ Link to comment
TAPL Posted March 6, 2013 Share Posted March 6, 2013 لا مو كله غلط عندك الأخطاء تبدأ من سطر 28 إلى آخر سطر في الكود Link to comment
CRoW,,# Posted March 6, 2013 Author Share Posted March 6, 2013 لا مو كله غلطعندك الأخطاء تبدأ من سطر 28 إلى آخر سطر في الكود طيب تقدر تعطيني مثال والباقي انا اكمل عليه Link to comment
Tete omar Posted March 6, 2013 Share Posted March 6, 2013 انت متآكد ان هالكود صانعه انت بنفسك؟ عششان اذا كانت اكوادك كذا يمديك تعرف خطأك وتعدله بكل سهولة Link to comment
iPrestege Posted March 6, 2013 Share Posted March 6, 2013 انت متآكد ان هالكود صانعه انت بنفسك؟عششان اذا كانت اكوادك كذا يمديك تعرف خطأك وتعدله بكل سهولة الاكواد شـايفها بـ موضوع ثاني نفسها لـ | عنآد ذذ Link to comment
HsSoN Posted March 6, 2013 Share Posted March 6, 2013 اذا تقول الاكواد انت الي مسويها ذا وش يسوي if guiGetVisible ( wnd ) then ؟ lol 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