Jump to content

طلب كود بمود سور


mahmod3

Recommended Posts

السلام عليكم انا عملت مود سور واعملت كل شي

عموما

اريد لما اركب سيارة يروح معي الصوت يعني متل مود الاغاني


addEventHandler("onClientResourceStart", resourceRoot,
    function()
        img = guiCreateStaticImage(457, 296, 567, 472, "PNGG.png", false)
        guiSetVisible(img,false)
		 close = guiCreateButton(0, 0, 105, 36, "ايقاف", false,img)
        bacara = guiCreateButton(397, 43, 138, 31, "سورة البقرة", false, img)
        local font0_EmblemaOne = guiCreateFont("EmblemaOne.ttf", 10)
        guiSetFont(bacara, font0_EmblemaOne)
        guiSetProperty(bacara, "NormalTextColour", "FFFEFEFE")
        kahf = guiCreateButton(397, 126, 138, 31, "سورة الكهف", false, img)
        guiSetFont(kahf, font0_EmblemaOne)
        guiSetProperty(kahf, "NormalTextColour", "FF0ABF05")
        Eklas = guiCreateButton(35, 49, 138, 31, "سورة الاخلاص", false, img)
        guiSetFont(Eklas, font0_EmblemaOne)
        guiSetProperty(Eklas, "NormalTextColour", "FFB7A50B")
        flk = guiCreateButton(35, 126, 138, 31, "سورة الفلق", false, img)
        guiSetFont(flk, font0_EmblemaOne)
        guiSetProperty(flk, "NormalTextColour", "FF20A199")
        fatrha = guiCreateButton(230, 14, 94, 25, "سورة الفاتحه", false, img)
        guiSetFont(fatrha, font0_EmblemaOne)
        nas = guiCreateButton(35, 225, 138, 31, "سورة الناس", false, img)
        guiSetFont(nas, font0_EmblemaOne)
        guiSetProperty(nas, "NormalTextColour", "FF48417F")
        msd = guiCreateButton(35, 325, 138, 31, "سورة المسد", false, img)
        guiSetFont(msd, font0_EmblemaOne)
        guiSetProperty(msd, "NormalTextColour", "FFBF5D5D")
        nazeat = guiCreateButton(210, 370, 138, 31, "سورة النازعات", false, img)
        guiSetFont(nazeat, font0_EmblemaOne)
        guiSetProperty(nazeat, "NormalTextColour", "FFBF5D5D")
        nba = guiCreateButton(397, 233, 138, 31, "سورة النبأ", false, img)
        guiSetFont(nba, font0_EmblemaOne)
        guiSetProperty(nba, "NormalTextColour", "FFBA0909")
        tkatr = guiCreateButton(397, 325, 138, 31, "سورة التكاثر", false, img)
        guiSetFont(tkatr, font0_EmblemaOne)
        guiSetProperty(tkatr, "NormalTextColour", "FFBF5D5D")
        lable = guiCreateLabel(183, 157, 208, 175, "سور من القر أن الكريم طبعا\nهذه السور يمكنك سماعها والذي بجانبك \nايضالا يمكنه االسماع\nنتمنا لكم الاستمتاع في السيرفر \nوالسلام عليكم ورحمة الله", false, img)
        local font1_EmblemaOne = guiCreateFont("EmblemaOne.ttf", 13)
        guiSetFont(lable, font1_EmblemaOne)
        guiLabelSetColor(lable, 0, 0, 0)    
    end
)

function imgg()
if guiGetVisible(img) then
guiSetVisible(img,false)
showCursor(false)
else
guiSetVisible(img,true)
showCursor(true)
end
end
bindKey("F2","down",imgg)



addEventHandler("onClientGUIClick",root,
function ()
if source == bacara then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/002.mp3",x,y,z)
setSoundMaxDistance( fateha, 1000 )
ob = createObject(2229,x,y+1,z-1)
end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == fatrha then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/001.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)

end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == Eklas then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/112.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == kahf then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/018.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == flk then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/113.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == nas then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/114.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == nazeat then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/079.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == nba then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/078.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == tkatr then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/102.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == close then
destroyElement(ob)
stopSound(fateha)
end
end
)

 

Link to comment
23 hours ago, iPrestege said:

addEventHandler ( 'onClientVehicleEnter' )
isElement
destroyElement or stopSound

 

اعتذر منك توي أنتبه للي تبية استعمل 

playSound

انت مستعمل وظيفة في احداثيات معينة 

UPDATED

بعرف انا اريده بهاد الشكل + يعني ابي الاحداتيات تروح معي

Link to comment

addEventHandler("onClientVehicleEnter",root
function ()
if isElement ( fateha ) then
  attachElements ( fateha,source );
end
end
)

 

نفس الشي مايشتغل

شكلكم مافهمتو طلبي اريد السبيكر يركب معي في السيارة والصوت يروح معي في السيارة متل مود الاغاني

Link to comment
--server
function speaker ( client, command )
      local x, y, z = getElementPosition ( client )
      local speaker = createObject ( 2229, x, y, z -1 ) 
        if (getPedOccupiedVehicle(client)) then
            attachElements(speaker, getPedOccupiedVehicle(client),  0.3, -0.2, 1.1 )
end
end
addCommandHandler ( "spk", speaker )
--ذا مثال بسيط
--سو اذا ضغط زر التشغيل ينزل السبيكر او اذا دخل السيارة
--طبعا لا تنسى تسوي تريقر من كلينت ل سيرفر

 

Edited by ~#[N]exT
Link to comment

addEvent("speaker",true)
addEventHandler("speaker",root,
function speaker ( client, command )
      local x, y, z = getElementPosition ( client )
      local speaker = createObject ( 2229, x, y, z -1 ) 
        if (getPedOccupiedVehicle(client)) then
            attachElements(speaker, getPedOccupiedVehicle(client),  0.3, -0.2, 1.1 )
end
end
)
addCommandHandler ( "spk", speaker )

يعني سويت متلك

Link to comment

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        img = guiCreateStaticImage(457, 296, 567, 472, "PNGG.png", false)
        guiSetVisible(img,false)
		 close = guiCreateButton(0, 0, 105, 36, "ايقاف", false,img)
        bacara = guiCreateButton(397, 43, 138, 31, "سورة البقرة", false, img)
        local font0_EmblemaOne = guiCreateFont("EmblemaOne.ttf", 10)
        guiSetFont(bacara, font0_EmblemaOne)
        guiSetProperty(bacara, "NormalTextColour", "FFFEFEFE")
        kahf = guiCreateButton(397, 126, 138, 31, "سورة الكهف", false, img)
        guiSetFont(kahf, font0_EmblemaOne)
        guiSetProperty(kahf, "NormalTextColour", "FF0ABF05")
        Eklas = guiCreateButton(35, 49, 138, 31, "سورة الاخلاص", false, img)
        guiSetFont(Eklas, font0_EmblemaOne)
        guiSetProperty(Eklas, "NormalTextColour", "FFB7A50B")
        flk = guiCreateButton(35, 126, 138, 31, "سورة الفلق", false, img)
        guiSetFont(flk, font0_EmblemaOne)
        guiSetProperty(flk, "NormalTextColour", "FF20A199")
        fatrha = guiCreateButton(230, 14, 94, 25, "سورة الفاتحه", false, img)
        guiSetFont(fatrha, font0_EmblemaOne)
        nas = guiCreateButton(35, 225, 138, 31, "سورة الناس", false, img)
        guiSetFont(nas, font0_EmblemaOne)
        guiSetProperty(nas, "NormalTextColour", "FF48417F")
        msd = guiCreateButton(35, 325, 138, 31, "سورة المسد", false, img)
        guiSetFont(msd, font0_EmblemaOne)
        guiSetProperty(msd, "NormalTextColour", "FFBF5D5D")
        nazeat = guiCreateButton(210, 370, 138, 31, "سورة النازعات", false, img)
        guiSetFont(nazeat, font0_EmblemaOne)
        guiSetProperty(nazeat, "NormalTextColour", "FFBF5D5D")
        nba = guiCreateButton(397, 233, 138, 31, "سورة النبأ", false, img)
        guiSetFont(nba, font0_EmblemaOne)
        guiSetProperty(nba, "NormalTextColour", "FFBA0909")
        tkatr = guiCreateButton(397, 325, 138, 31, "سورة التكاثر", false, img)
        guiSetFont(tkatr, font0_EmblemaOne)
        guiSetProperty(tkatr, "NormalTextColour", "FFBF5D5D")
        lable = guiCreateLabel(183, 157, 208, 175, "سور من القر أن الكريم طبعا\nهذه السور يمكنك سماعها والذي بجانبك \nايضالا يمكنه االسماع\nنتمنا لكم الاستمتاع في السيرفر \nوالسلام عليكم ورحمة الله", false, img)
        local font1_EmblemaOne = guiCreateFont("EmblemaOne.ttf", 13)
        guiSetFont(lable, font1_EmblemaOne)
        guiLabelSetColor(lable, 0, 0, 0)    
    end
)

function imgg()
if guiGetVisible(img) then
guiSetVisible(img,false)
showCursor(false)
else
guiSetVisible(img,true)
showCursor(true)
end
end
bindKey("F2","down",imgg)



addEventHandler("onClientGUIClick",root,
function ()
if source == bacara then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/002.mp3",x,y,z)
setSoundMaxDistance( fateha, 1000 )
ob = createObject(2229,x,y+1,z-1)
end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == fatrha then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/001.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)

end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == Eklas then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/112.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == kahf then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/018.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)


addEventHandler("onClientGUIClick",root,
function ()
if source == flk then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/113.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == nas then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/114.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == nazeat then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/079.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == nba then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/078.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == tkatr then
destroyElement(ob)
stopSound(fateha)
local x,y,z = getElementPosition(localPlayer)
fateha = playSound3D("http://server12.mp3quran.net/maher/102.mp3",x,y,z)
ob = createObject(2229,x,y+1,z-1)
end
end
)

addEventHandler("onClientGUIClick",root,
function ()
if source == close then
destroyElement(ob)
stopSound(fateha)
end
end
)

addEventHandler("onClientVehicleEnter",root,
function ()
triggerServerEvent("speaker",localPlayer)
end
)

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...