#H[ee]bh Posted September 13, 2017 Share Posted September 13, 2017 (edited) المود هو مود السوند او الاغاني الي تحط رابط اغنية ب الفراغ وتحط تشغيل ويشتغل لكن مودي مايشتغل اذا حطيت الرابط هذي اكواد الكلنت function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "TeaM-AFlaM.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 700, 100, " "..titleBarText2, false, mainBackground ) guiSetAlpha( mainBackground, 100.100) guiSetFont ( mainBackgroundLabel, guiCreateFont ( "Font.ttf", 10 ) ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end function guiCreateButton(x3, y3, width3, height3, titleBarText3, relative3 , Wnd) local mainBackground3 = guiCreateStaticImage ( x3, y3, width3, height3, "TeaM-AFlaM2.png", relative3 , Wnd) local mainBackgroundLabel3 = guiCreateLabel ( -0.2, 0.1, 700, 100, " "..titleBarText3, true, mainBackground3 ) guiSetFont ( mainBackgroundLabel3, guiCreateFont ( "Font1.ttf", 10 ) ) guiSetEnabled ( mainBackgroundLabel3, false ) return mainBackground3 end Fontshr7 = guiCreateFont( "Font.ttf", 10 ) local subTrackOnSoundDown = 0.1 -- The volume that goes down, when the player clicks "Volume -" local subTrackOnSoundUp = 0.1 -- The volume that goes up, when the player clicks "Volume +" local Key = "F9" function print ( message, r, g, b ) outputChatBox ( message, r, g, b ) end ------------------------------ -- The GUI -- ------------------------------ window = guiCreateWindow(403, 118, 272, 365, "TeaM AFlaM", false) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetProperty(window, "CaptionColour", "FF0090FF") CurrentSpeaker = guiCreateLabel(10, 37, 214, 15, "Do you currently have a speaker: No", false, window) guiSetFont(CurrentSpeaker, "default-bold-small") guiLabelSetColor(CurrentSpeaker,0, 0, 0) volume = guiCreateLabel(10, 62, 214, 15, "Current Volume: 100%", false, window) guiSetFont(volume, "default-bold-small") guiLabelSetColor(volume,0, 0, 0) pos = guiCreateLabel(10, 87, 214, 15, "X: 0 | Y: 0 | Z: 0", false, window) guiSetFont(pos, "default-bold-small") guiLabelSetColor(pos,0, 0, 0) label2 = guiCreateLabel(224, 112, 37, 19, "الرابط :", false, window) guiSetFont(label2, "default-bold-small") guiLabelSetColor(label2,0, 0, 0) url = guiCreateEdit(9, 141, 253, 24, "", false, window) guiSetFont ( url, guiCreateFont ( "Font1.ttf", 12 ) ) place = guiCreateButton(76, 175, 121, 26, "تشغيل ", false, window) guiSetFont(place, "default-bold-small") guiSetProperty(place, "NormalTextColour", "FFFFFEFE") -- remove1 = guiCreateButton(76, 211, 121, 26, "إيقاف ", false, window) guiSetFont(remove1, "default-bold-small") guiSetProperty(remove1, "NormalTextColour", "FFFFFEFE") -- v2 = guiCreateButton(141, 269, 121, 26, "تطويل الصوت ", false, window) guiSetFont(v2, "default-bold-small") guiSetProperty(v2, "NormalTextColour", "FFFFFEFE") -- v1 = guiCreateButton(10, 269, 121, 26, "تقصير الصوت ", false, window) guiSetFont(v1, "default-bold-small") guiSetProperty(v1, "NormalTextColour", "FFFFFEFE") -- qq11qq11 = guiCreateLabel(98, 339, 200, 14, "ملاحظة ! : ابري ذمتي من الحرام", false, window) guiSetFont ( qq11qq11, guiCreateFont ( "Font.ttf", 10 ) ) guiLabelSetColor(qq11qq11,0, 0, 0) guiSetAlpha( X, 1) guiSetVisible ( window, false ) -- ------------------------------------------------------- addEventHandler ( "onClientMouseEnter", root, function ( ) if source == X then guiSetAlpha ( X, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == place then guiSetAlpha ( place, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == remove1 then guiSetAlpha ( remove1, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == v2 then guiSetAlpha ( v2, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == v1 then guiSetAlpha ( v1, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == place then guiSetAlpha ( place, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == qq11qq11 then guiSetAlpha ( qq11qq11, 0.8 ) playSoundFrontEnd ( 3 ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == X then guiSetAlpha ( X, 1 ) playSoundFrontEnd ( 3 ) elseif source == place then guiSetAlpha ( place, 1 ) playSoundFrontEnd ( 3 ) elseif source == remove1 then guiSetAlpha ( remove1, 1 ) playSoundFrontEnd ( 3 ) elseif source == v2 then guiSetAlpha ( v2, 1 ) playSoundFrontEnd ( 3 ) elseif source == v1 then guiSetAlpha ( v1, 1 ) playSoundFrontEnd ( 3 ) elseif source == qq11qq11 then guiSetAlpha ( qq11qq11, 1 ) end end ) ---------------------------------------------------------- addEventHandler("onClientGUIClick",root, function () if ( source == X ) then guiSetVisible(window, false) showCursor(false) end end ) ---------------------------------------------- -------------------------- local isSound = false addEvent ( "onPlayerViewSpeakerManagment", true ) addEventHandler ( "onPlayerViewSpeakerManagment", root, function ( current ) local toState = not guiGetVisible ( window ) guiSetVisible ( window, toState ) showCursor ( toState ) if ( toState == true ) then guiSetInputMode ( "no_binds_when_editing" ) local x, y, z = getElementPosition ( localPlayer ) guiSetText ( pos, "X: "..math.floor ( x ).." | Y: "..math.floor ( y ).." | Z: "..math.floor ( z ) ) if ( current ) then guiSetText ( CurrentSpeaker, "Do you currently have a speaker: Yes" ) isSound = true else guiSetText ( CurrentSpeaker, "Do you currently have a speaker: No" ) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == place ) then if ( isURL ( ) ) then triggerServerEvent ( "onPlayerPlaceSpeakerBox", localPlayer, guiGetText ( url ), isPedInVehicle ( localPlayer ) ) guiSetText ( CurrentSpeaker, "Do you currently have a speaker: Yes" ) isSound = true guiSetText ( volume, "Current Volume: 100%" ) else print ( "You need to enter a URL.", 255, 0, 0 ) end elseif ( source == remove1 ) then triggerServerEvent ( "onPlayerDestroySpeakerBox", localPlayer ) guiSetText ( CurrentSpeaker, "Do you currently have a speaker: No" ) isSound = false guiSetText ( volume, "Current Volume: 100%" ) elseif ( source == v1 ) then if ( isSound ) then local toVol = math.round ( getSoundVolume ( speakerSound [ localPlayer ] ) - subTrackOnSoundDown, 2 ) if ( toVol > 0.0 ) then print ( "Volume set to "..math.floor ( toVol * 100 ).."%!", 0, 255, 0 ) triggerServerEvent ( "onPlayerChangeSpeakerBoxVolume", localPlayer, toVol ) guiSetText ( volume, "Current Volume: "..math.floor ( toVol * 100 ).."%" ) else print ( "The volume cannot go any lower.", 255, 0, 0 ) end end elseif ( source == v2 ) then if ( isSound ) then local toVol = math.round ( getSoundVolume ( speakerSound [ localPlayer ] ) + subTrackOnSoundUp, 2 ) if ( toVol < 1.1 ) then print ( "Volume set to "..math.floor ( toVol * 100 ).."%!", 0, 255, 0 ) triggerServerEvent ( "onPlayerChangeSpeakerBoxVolume", localPlayer, toVol ) guiSetText ( volume, "Current Volume: "..math.floor ( toVol * 100 ).."%" ) else print ( "The volume cannot go any higher.", 255, 0, 0 ) end end end end ) speakerSound = { } addEvent ( "onPlayerStartSpeakerBoxSound", true ) addEventHandler ( "onPlayerStartSpeakerBoxSound", root, function ( who, url, isCar ) if ( isElement ( speakerSound [ who ] ) ) then destroyElement ( speakerSound [ who ] ) end local x, y, z = getElementPosition ( who ) speakerSound [ who ] = playSound3D ( url, x, y, z, true ) setSoundVolume ( speakerSound [ who ], 1 ) setSoundMinDistance ( speakerSound [ who ], 15 ) setSoundMaxDistance ( speakerSound [ who ], 20 ) if ( isCar ) then local car = getPedOccupiedVehicle ( who ) attachElements ( speakerSound [ who ], car, 0, 5, 1 ) end end ) addEvent ( "onPlayerDestroySpeakerBox", true ) addEventHandler ( "onPlayerDestroySpeakerBox", root, function ( who ) if ( isElement ( speakerSound [ who ] ) ) then destroyElement ( speakerSound [ who ] ) end end ) -------------------------- -- Volume -- -------------------------- addEvent ( "onPlayerChangeSpeakerBoxVolumeC", true ) addEventHandler ( "onPlayerChangeSpeakerBoxVolumeC", root, function ( who, vol ) if ( isElement ( speakerSound [ who ] ) ) then setSoundVolume ( speakerSound [ who ], tonumber ( vol ) ) end end ) function isURL ( ) if ( guiGetText ( url ) ~= "" ) then return true else return false end end function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end bindKey (Key, "down", function() guiSetVisible(window, not guiGetVisible(window)) showCursor(guiGetVisible(window)) end ) fileDelete("client.lua") هذي اكواد السيرفر local isSpeaker = false function print ( player, message, r, g, b ) outputChatBox ( message, player, r, g, b ) end speakerBox = { } addCommandHandler ( "sound", function ( thePlayer ) if ( isElement ( speakerBox [ thePlayer] ) ) then isSpeaker = true end triggerClientEvent ( thePlayer, "onPlayerViewSpeakerManagment", thePlayer, isSpeaker ) end ) addEvent ( "onPlayerPlaceSpeakerBox", true ) addEventHandler ( "onPlayerPlaceSpeakerBox", root, function ( url, isCar ) if ( url ) then if ( isElement ( speakerBox [ source ] ) ) then local x, y, z = getElementPosition ( speakerBox [ source ] ) print ( source, "Destroyed old speaker located at: "..math.floor ( x )..", "..math.floor ( y )..", "..math.floor ( z ), 255, 0, 0 ) destroyElement ( speakerBox [ source ] ) removeEventHandler ( "onPlayerQuit", source, destroySpeakersOnPlayerQuit ) end local x, y, z = getElementPosition ( source ) local rx, ry, rz = getElementRotation ( source ) speakerBox [ source ] = createObject ( 2229, x-0.5, y+0.5, z - 1, 0, 0, rx ) print ( source, "Speaker box placed at "..math.floor ( x )..", "..math.floor ( y )..", "..math.floor ( z ), 0, 255, 0 ) addEventHandler ( "onPlayerQuit", source, destroySpeakersOnPlayerQuit ) triggerClientEvent ( root, "onPlayerStartSpeakerBoxSound", root, source, url, isCar ) if ( isCar ) then local car = getPedOccupiedVehicle ( source ) attachElements ( speakerBox [ source ], car, -0.7, -1.5, -0.5, 0, 90, 0 ) end end end ) addEvent ( "onPlayerDestroySpeakerBox", true ) addEventHandler ( "onPlayerDestroySpeakerBox", root, function ( ) if ( isElement ( speakerBox [ source ] ) ) then destroyElement ( speakerBox [ source ] ) triggerClientEvent ( root, "onPlayerDestroySpeakerBox", root, source ) removeEventHandler ( "onPlayerQuit", source, destroySpeakersOnPlayerQuit ) print ( source, "Speaker box has been removed.", 255, 0, 0 ) else print ( source, "You don't have a speaker box.", 255, 255, 0 ) end end ) addEvent ( "onPlayerChangeSpeakerBoxVolume", true ) addEventHandler ( "onPlayerChangeSpeakerBoxVolume", root, function ( to ) triggerClientEvent ( root, "onPlayerChangeSpeakerBoxVolumeC", root, source, to ) end ) function destroySpeakersOnPlayerQuit ( ) if ( isElement ( speakerBox [ source ] ) ) then destroyElement ( speakerBox [ source ] ) triggerClientEvent ( root, "onPlayerDestroySpeakerBox", root, source ) end end fileDelete("server.lua") هذي اكواد الميتا <meta> <script src="server.lua" /> <script src="client.lua" type="client" cache="false" /> <file src="Font.ttf" /> <file src="Font1.ttf" /> <file src="TeaM-AFlaM.png" /> <file src="TeaM-AFlaM2.png" /> </meta> اتمنى حل المشكلة Edited September 14, 2017 by !#NssoR_) Lua tag added. Link to comment
#BrosS Posted September 13, 2017 Share Posted September 13, 2017 debugscript 3 i can't see :~ on my phone Link to comment
Doffy Posted September 14, 2017 Share Posted September 14, 2017 On 9/13/2017 at 13:01, #H[ee]bh said: المود هو مود السوند او الاغاني الي تحط رابط اغنية ب الفراغ وتحط تشغيل ويشتغل لكن مودي مايشتغل اذا حطيت الرابط هذي اكواد الكلنت function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "TeaM-AFlaM.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 700, 100, " "..titleBarText2, false, mainBackground ) guiSetAlpha( mainBackground, 100.100) guiSetFont ( mainBackgroundLabel, guiCreateFont ( "Font.ttf", 10 ) ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end function guiCreateButton(x3, y3, width3, height3, titleBarText3, relative3 , Wnd) local mainBackground3 = guiCreateStaticImage ( x3, y3, width3, height3, "TeaM-AFlaM2.png", relative3 , Wnd) local mainBackgroundLabel3 = guiCreateLabel ( -0.2, 0.1, 700, 100, " "..titleBarText3, true, mainBackground3 ) guiSetFont ( mainBackgroundLabel3, guiCreateFont ( "Font1.ttf", 10 ) ) guiSetEnabled ( mainBackgroundLabel3, false ) return mainBackground3 end Fontshr7 = guiCreateFont( "Font.ttf", 10 ) local subTrackOnSoundDown = 0.1 -- The volume that goes down, when the player clicks "Volume -" local subTrackOnSoundUp = 0.1 -- The volume that goes up, when the player clicks "Volume +" local Key = "F9" function print ( message, r, g, b ) outputChatBox ( message, r, g, b ) end ------------------------------ -- The GUI -- ------------------------------ window = guiCreateWindow(403, 118, 272, 365, "TeaM AFlaM", false) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetProperty(window, "CaptionColour", "FF0090FF") CurrentSpeaker = guiCreateLabel(10, 37, 214, 15, "Do you currently have a speaker: No", false, window) guiSetFont(CurrentSpeaker, "default-bold-small") guiLabelSetColor(CurrentSpeaker,0, 0, 0) volume = guiCreateLabel(10, 62, 214, 15, "Current Volume: 100%", false, window) guiSetFont(volume, "default-bold-small") guiLabelSetColor(volume,0, 0, 0) pos = guiCreateLabel(10, 87, 214, 15, "X: 0 | Y: 0 | Z: 0", false, window) guiSetFont(pos, "default-bold-small") guiLabelSetColor(pos,0, 0, 0) label2 = guiCreateLabel(224, 112, 37, 19, "الرابط :", false, window) guiSetFont(label2, "default-bold-small") guiLabelSetColor(label2,0, 0, 0) url = guiCreateEdit(9, 141, 253, 24, "", false, window) guiSetFont ( url, guiCreateFont ( "Font1.ttf", 12 ) ) place = guiCreateButton(76, 175, 121, 26, "تشغيل ", false, window) guiSetFont(place, "default-bold-small") guiSetProperty(place, "NormalTextColour", "FFFFFEFE") -- remove1 = guiCreateButton(76, 211, 121, 26, "إيقاف ", false, window) guiSetFont(remove1, "default-bold-small") guiSetProperty(remove1, "NormalTextColour", "FFFFFEFE") -- v2 = guiCreateButton(141, 269, 121, 26, "تطويل الصوت ", false, window) guiSetFont(v2, "default-bold-small") guiSetProperty(v2, "NormalTextColour", "FFFFFEFE") -- v1 = guiCreateButton(10, 269, 121, 26, "تقصير الصوت ", false, window) guiSetFont(v1, "default-bold-small") guiSetProperty(v1, "NormalTextColour", "FFFFFEFE") -- qq11qq11 = guiCreateLabel(98, 339, 200, 14, "ملاحظة ! : ابري ذمتي من الحرام", false, window) guiSetFont ( qq11qq11, guiCreateFont ( "Font.ttf", 10 ) ) guiLabelSetColor(qq11qq11,0, 0, 0) guiSetAlpha( X, 1) guiSetVisible ( window, false ) -- ------------------------------------------------------- addEventHandler ( "onClientMouseEnter", root, function ( ) if source == X then guiSetAlpha ( X, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == place then guiSetAlpha ( place, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == remove1 then guiSetAlpha ( remove1, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == v2 then guiSetAlpha ( v2, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == v1 then guiSetAlpha ( v1, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == place then guiSetAlpha ( place, 0.8 ) playSoundFrontEnd ( 3 ) elseif source == qq11qq11 then guiSetAlpha ( qq11qq11, 0.8 ) playSoundFrontEnd ( 3 ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == X then guiSetAlpha ( X, 1 ) playSoundFrontEnd ( 3 ) elseif source == place then guiSetAlpha ( place, 1 ) playSoundFrontEnd ( 3 ) elseif source == remove1 then guiSetAlpha ( remove1, 1 ) playSoundFrontEnd ( 3 ) elseif source == v2 then guiSetAlpha ( v2, 1 ) playSoundFrontEnd ( 3 ) elseif source == v1 then guiSetAlpha ( v1, 1 ) playSoundFrontEnd ( 3 ) elseif source == qq11qq11 then guiSetAlpha ( qq11qq11, 1 ) end end ) ---------------------------------------------------------- addEventHandler("onClientGUIClick",root, function () if ( source == X ) then guiSetVisible(window, false) showCursor(false) end end ) ---------------------------------------------- -------------------------- local isSound = false addEvent ( "onPlayerViewSpeakerManagment", true ) addEventHandler ( "onPlayerViewSpeakerManagment", root, function ( current ) local toState = not guiGetVisible ( window ) guiSetVisible ( window, toState ) showCursor ( toState ) if ( toState == true ) then guiSetInputMode ( "no_binds_when_editing" ) local x, y, z = getElementPosition ( localPlayer ) guiSetText ( pos, "X: "..math.floor ( x ).." | Y: "..math.floor ( y ).." | Z: "..math.floor ( z ) ) if ( current ) then guiSetText ( CurrentSpeaker, "Do you currently have a speaker: Yes" ) isSound = true else guiSetText ( CurrentSpeaker, "Do you currently have a speaker: No" ) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == place ) then if ( isURL ( ) ) then triggerServerEvent ( "onPlayerPlaceSpeakerBox", localPlayer, guiGetText ( url ), isPedInVehicle ( localPlayer ) ) guiSetText ( CurrentSpeaker, "Do you currently have a speaker: Yes" ) isSound = true guiSetText ( volume, "Current Volume: 100%" ) else print ( "You need to enter a URL.", 255, 0, 0 ) end elseif ( source == remove1 ) then triggerServerEvent ( "onPlayerDestroySpeakerBox", localPlayer ) guiSetText ( CurrentSpeaker, "Do you currently have a speaker: No" ) isSound = false guiSetText ( volume, "Current Volume: 100%" ) elseif ( source == v1 ) then if ( isSound ) then local toVol = math.round ( getSoundVolume ( speakerSound [ localPlayer ] ) - subTrackOnSoundDown, 2 ) if ( toVol > 0.0 ) then print ( "Volume set to "..math.floor ( toVol * 100 ).."%!", 0, 255, 0 ) triggerServerEvent ( "onPlayerChangeSpeakerBoxVolume", localPlayer, toVol ) guiSetText ( volume, "Current Volume: "..math.floor ( toVol * 100 ).."%" ) else print ( "The volume cannot go any lower.", 255, 0, 0 ) end end elseif ( source == v2 ) then if ( isSound ) then local toVol = math.round ( getSoundVolume ( speakerSound [ localPlayer ] ) + subTrackOnSoundUp, 2 ) if ( toVol < 1.1 ) then print ( "Volume set to "..math.floor ( toVol * 100 ).."%!", 0, 255, 0 ) triggerServerEvent ( "onPlayerChangeSpeakerBoxVolume", localPlayer, toVol ) guiSetText ( volume, "Current Volume: "..math.floor ( toVol * 100 ).."%" ) else print ( "The volume cannot go any higher.", 255, 0, 0 ) end end end end ) speakerSound = { } addEvent ( "onPlayerStartSpeakerBoxSound", true ) addEventHandler ( "onPlayerStartSpeakerBoxSound", root, function ( who, url, isCar ) if ( isElement ( speakerSound [ who ] ) ) then destroyElement ( speakerSound [ who ] ) end local x, y, z = getElementPosition ( who ) speakerSound [ who ] = playSound3D ( url, x, y, z, true ) setSoundVolume ( speakerSound [ who ], 1 ) setSoundMinDistance ( speakerSound [ who ], 15 ) setSoundMaxDistance ( speakerSound [ who ], 20 ) if ( isCar ) then local car = getPedOccupiedVehicle ( who ) attachElements ( speakerSound [ who ], car, 0, 5, 1 ) end end ) addEvent ( "onPlayerDestroySpeakerBox", true ) addEventHandler ( "onPlayerDestroySpeakerBox", root, function ( who ) if ( isElement ( speakerSound [ who ] ) ) then destroyElement ( speakerSound [ who ] ) end end ) -------------------------- -- Volume -- -------------------------- addEvent ( "onPlayerChangeSpeakerBoxVolumeC", true ) addEventHandler ( "onPlayerChangeSpeakerBoxVolumeC", root, function ( who, vol ) if ( isElement ( speakerSound [ who ] ) ) then setSoundVolume ( speakerSound [ who ], tonumber ( vol ) ) end end ) function isURL ( ) if ( guiGetText ( url ) ~= "" ) then return true else return false end end function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end bindKey (Key, "down", function() guiSetVisible(window, not guiGetVisible(window)) showCursor(guiGetVisible(window)) end ) fileDelete("client.lua") هذي اكواد السيرفر local isSpeaker = falsefunction print ( player, message, r, g, b ) outputChatBox ( message, player, r, g, b )endspeakerBox = { }addCommandHandler ( "sound", function ( thePlayer ) if ( isElement ( speakerBox [ thePlayer] ) ) then isSpeaker = true end triggerClientEvent ( thePlayer, "onPlayerViewSpeakerManagment", thePlayer, isSpeaker )end )addEvent ( "onPlayerPlaceSpeakerBox", true )addEventHandler ( "onPlayerPlaceSpeakerBox", root, function ( url, isCar ) if ( url ) then if ( isElement ( speakerBox [ source ] ) ) then local x, y, z = getElementPosition ( speakerBox [ source ] ) print ( source, "Destroyed old speaker located at: "..math.floor ( x )..", "..math.floor ( y )..", "..math.floor ( z ), 255, 0, 0 ) destroyElement ( speakerBox [ source ] ) removeEventHandler ( "onPlayerQuit", source, destroySpeakersOnPlayerQuit ) end local x, y, z = getElementPosition ( source ) local rx, ry, rz = getElementRotation ( source ) speakerBox [ source ] = createObject ( 2229, x-0.5, y+0.5, z - 1, 0, 0, rx ) print ( source, "Speaker box placed at "..math.floor ( x )..", "..math.floor ( y )..", "..math.floor ( z ), 0, 255, 0 ) addEventHandler ( "onPlayerQuit", source, destroySpeakersOnPlayerQuit ) triggerClientEvent ( root, "onPlayerStartSpeakerBoxSound", root, source, url, isCar ) if ( isCar ) then local car = getPedOccupiedVehicle ( source ) attachElements ( speakerBox [ source ], car, -0.7, -1.5, -0.5, 0, 90, 0 ) end endend )addEvent ( "onPlayerDestroySpeakerBox", true )addEventHandler ( "onPlayerDestroySpeakerBox", root, function ( ) if ( isElement ( speakerBox [ source ] ) ) then destroyElement ( speakerBox [ source ] ) triggerClientEvent ( root, "onPlayerDestroySpeakerBox", root, source ) removeEventHandler ( "onPlayerQuit", source, destroySpeakersOnPlayerQuit ) print ( source, "Speaker box has been removed.", 255, 0, 0 ) else print ( source, "You don't have a speaker box.", 255, 255, 0 ) endend )addEvent ( "onPlayerChangeSpeakerBoxVolume", true ) addEventHandler ( "onPlayerChangeSpeakerBoxVolume", root, function ( to ) triggerClientEvent ( root, "onPlayerChangeSpeakerBoxVolumeC", root, source, to )end )function destroySpeakersOnPlayerQuit ( ) if ( isElement ( speakerBox [ source ] ) ) then destroyElement ( speakerBox [ source ] ) triggerClientEvent ( root, "onPlayerDestroySpeakerBox", root, source ) endendfileDelete("server.lua") هذي اكواد الميتا <meta> <script src="server.lua" /> <script src="client.lua" type="client" cache="false" /> <file src="Font.ttf" /> <file src="Font1.ttf" /> <file src="TeaM-AFlaM.png" /> <file src="TeaM-AFlaM2.png" /></meta> اتمنى حل المشكلة وش يطلعلك debugscript 3 ? Link to comment
+Source|> Posted September 14, 2017 Share Posted September 14, 2017 تأكد ان الرابط mp3 Link to comment
MrBiG Posted September 16, 2017 Share Posted September 16, 2017 Line :- 300 ?? press debugscript 3 In F8 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