Jump to content

x[سؤال]x


ivor

Recommended Posts

4 hours ago, Ja[V]a said:

هل هذا الكود صحيح؟

 


function music ()
addCommandHandler ( "shnohaza", music ) then
playSound(shnowhaza.mp3,true)

end

 



خطأ ...

 

function music ()
	sound = playSound( "shnowhaza.mp3" ) -- client only
	setSoundVolume(sound, 0.5) -- volume [ sound ]
end
addCommandHandler ( "shnohaza", music )

 

Link to comment
9 hours ago, Killer Project said:



خطأ ...

 


function music ()
	sound = playSound( "shnowhaza.mp3" ) -- client only
	setSoundVolume(sound, 0.5) -- volume [ sound ]
end
addCommandHandler ( "shnohaza", music )

 

الصوت يظهر لي انا والباقي لا !! 

Link to comment
15 minutes ago, Killer Project said:

تبي الصوت للكن يعني ؟

استخدم الترايجرات

 


triggerServerEvent -- root
triggerClientEvent

 

استخدم واحد منهم ولا الاثنين؟

Link to comment
1 minute ago, Killer Project said:

استخدم الكلينت الاول وبعد كدة السيرفر
لكن خلي في السيرفر رووت مش لوكال بلاير

انا حاط كودك في كلينت وسويته كذا

 


function music ()
	sound = playSound( "shnowhaza.mp3" ) -- client only
	setSoundVolume(sound, 0.5) -- volume [ sound ]
end
addCommandHandler ( "shnohaza", music )
addEvent( "sound", true )
addEventHandler( "sound", localPlayer, music )

اكمل الحين واسوي سيرفر؟

Link to comment
Just now, Ja[V]a said:

انا حاط كودك في كلينت وسويته كذا

 


function music ()
	sound = playSound( "shnowhaza.mp3" ) -- client only
	setSoundVolume(sound, 0.5) -- volume [ sound ]
end
addCommandHandler ( "shnohaza", music )
addEvent( "sound", true )
addEventHandler( "sound", localPlayer, music )

اكمل الحين واسوي سيرفر؟

 

جرب ذا

 

-- جرب

-- client
function playMySound ()
triggerServerEvent('playSound',localPlayer)
end
addCommandHandler ( "shnohaza", playMySound )

addEvent('playSound2',true)
addEventHandler('playSound2',root,
function ()

if ( isElement(Sound) ) then
destroyElement(Sound)
end

Sound = playSound( "music.mp3" )

end)

-- server

addEvent('playSound',true)
addEventHandler('playSound',root,
function ()

triggerClientEvent( root ,'playSound2',client)

end)

 

Edited by Killer Project
Link to comment
20 minutes ago, Killer Project said:

 

جرب ذا

 


-- جرب

-- client
function playMySound ()
triggerServerEvent('playSound',localPlayer)
end
addCommandHandler ( "shnohaza", playMySound )

addEvent('playSound2',true)
addEventHandler('playSound2',root,
function ()

if ( isElement(Sound) ) then
destroyElement(Sound)
end

Sound = playSound( "music.mp3" )

end)

-- server

addEvent('playSound',true)
addEventHandler('playSound',root,
function ()

triggerClientEvent( root ,'playSound2',client)

end)

 

كودك ظبط تمام , الحين لو ابي احط صورة اول مايجي الصوت وتروح لما ينتهي وش استخدم من الاكواد

Link to comment
Just now, #!Error.xD said:

ومع الصوت يوم يختفي بيسوي destroyElement?

-- client only

function KillerProject ()

if isElement ( sound ) then

local screenW, screenH = guiGetScreenSize()

dxDrawImage((screenW - 500) / 2, (screenH - 500) / 2, 500, 500, "image.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)

end

end

addEventHandler ( "onClientRender", root, KillerProject )



جرب

لا تنسى تضيف موقع الصورة

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...