Jump to content

طلب كودد


pro

Recommended Posts

سلام عليكم 

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

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

ونشالله تكونو فهمتوني

 

Edited by pro
Link to comment
On ٤‏/٩‏/٢٠١٧ at 09:57, #BrosS said:

._.?

تحقق اذا الاغنية شغالة واستعمل

 


destroyElement or stopSound

 

ممكن تعملي مثال على هذا  

هي كود 

addEvent( "playS", true )
addEventHandler( "playS", localPlayer,
    function ( source )
        local sound = playSound( "nuts.mp3", false )
             outputChatBox ( getPlayerName( localPlayer ).."#067E06 deez nuts", 255, 255, 255, true )
        attachElements ( sound, source,  0,0,0,0,0,0)
    end
)


 

Spoiler
Spoiler

 

 

 

Edited by pro
Link to comment
addEventHandler("onClientGUIClick", root,
    function () 
        if source == أسم الزر then 
            if (sound and isElement(sound) and getElementType(sound) == "sound") then  
                destroyElement(sound) 
                sound = nil 
                return  
            end  
        sound = playSound("APTAL.mp3") 
        setSoundVolume(sound, 1) 
        end 
    end 
) 

 

Edited by #MR.NaiF
Link to comment
On ٤‏/٩‏/٢٠١٧ at 21:58, #MR.NaiF said:

addEventHandler("onClientGUIClick", root,
    function () 
        if source == أسم الزر then 
            if (sound and isElement(sound) and getElementType(sound) == "sound") then  
                destroyElement(sound) 
                sound = nil 
                return  
            end  
        sound = playSound("APTAL.mp3") 
        setSoundVolume(sound, 1) 
        end 
    end 
) 

 

زر شو

 

On ٤‏/٩‏/٢٠١٧ at 21:23, pro said:

ممكن تعملي مثال على هذا  

هي كود 


addEvent( "playS", true )
addEventHandler( "playS", localPlayer,
    function ( source )
        local sound = playSound( "nuts.mp3", false )
             outputChatBox ( getPlayerName( localPlayer ).."#067E06 deez nuts", 255, 255, 255, true )
        attachElements ( sound, source,  0,0,0,0,0,0)
    end
)


 

  Reveal hidden contents
  Reveal hidden contents

 

 

 

هي ملف سيرفر 

addCommandHandler ( "nuts",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playS", player, source )
		end
	end
)

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

Link to comment
52 minutes ago, #MR.NaiF said:

addEventHandler("onClientGUIClick", root,
    function () 
        if source == أسم الزر then 
            if (sound and isElement(sound) and getElementType(sound) == "sound") then  
                destroyElement(sound) 
                sound = nil 
                return  
            end  
        sound = playSound("APTAL.mp3") 
        setSoundVolume(sound, 1) 
        end 
    end 
) 

 

Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler
Spoiler

تخبيص

 

 

 

 

 

 

 

 

Link to comment
-- Server
addCommandHandler ( "nuts",
	function ( plr )
			triggerClientEvent (root, "playS",root, plr )
		end
	)

	
	
-- Client

addEvent( "playS", true )

addEventHandler( "playS",root,

    function (plr)

	if isElement(sound) then  return stopSound(sound)  end 
       
	   sound = playSound( "nuts.mp3", false )

       
	   outputChatBox (""..getPlayerName(plr) .."#067E06 deez nuts",root, 255, 255, 255, true )


   end

)

 

Edited by Ahmed Ly
Link to comment

هي ملف سيرفر شوفو 

addCommandHandler ( "movebitch",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playM", player, source )
		end
	end
)

addCommandHandler ( "nuts",
	function ( plr )
			triggerClientEvent (root, "playS",root, plr )
		end
	)


addCommandHandler ( "gay",
	function ( rr )
			triggerClientEvent ( root, "playU", root, rr )
		end
)



addCommandHandler ( "damn",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playY", player, source )
		end
	end
)




addCommandHandler ( "goat",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playT", player, source )
		end
	end
)




addCommandHandler ( "hello",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playR", player, source )
		end
	end
)




addCommandHandler ( "toosadforme",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playE", player, source )
		end
	end
)




addCommandHandler ( "damnson",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playW", player, source )
		end
	end
)


addCommandHandler ( "wow",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playQ", player, source )
		end
	end
)


addCommandHandler ( "thuglife",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playA", player, source )
		end
	end
)



addCommandHandler ( "surprise",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playD", player, source )
		end
	end
)



addCommandHandler ( "ridingdirty",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playF", player, source )
		end
	end
)



addCommandHandler ( "rofl",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playG", player, source )
		end
	end
)

addCommandHandler ( "thug3",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playJ", player, source )
		end
	end
)

addCommandHandler ( "S",
	function ( source )
		for k, player in ipairs( getElementsByType( "player" ) ) do
			triggerClientEvent ( player, "playk", player, source )
		end
	end
)

وهي كلينت

addEvent( "playM", true )
addEventHandler( "playM", localPlayer,
	function ( source )
		local sound = playSound( "movebitch.mp3", false )
				     outputChatBox ( getPlayerName( localPlayer ).."#067E06 wants you to get out of his way!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	 

addEvent( "playS", true )

addEventHandler( "playS", root,

    function (plr)

	if isElement(sound) then  return stopSound(sound)  end 
       
	   sound = playSound( "nuts.mp3", false )

       
	   outputChatBox (""..getPlayerName(plr) .."#067E06 deez nuts",root, 255, 255, 255, true )


   end

)	 	


addEvent( "playU", true )
addEventHandler( "playU", root,

	function ( rr )
	
	if isElement(sound) then  return stopSound(sound)  end 
	
		 sound = playSound( "gay.mp3", false )
		     outputChatBox (""..getPlayerName( rr ).."#067E06 thinks that's gay!",root, 255, 255, 255, true )
	end
)	

addEvent( "playY", true )
addEventHandler( "playY", localPlayer,
	function ( source )
		local sound = playSound( "damn.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 boooon", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	


addEvent( "playT", true )
addEventHandler( "playT", localPlayer,
	function ( source )
		local sound = playSound( "goat.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06  screams like a goat!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	

addEvent( "playR", true )
addEventHandler( "playR", localPlayer,
	function ( source )
		local sound = playSound( "hello.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06  is rolling on floor laughing!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)

addEvent( "playE", true )
addEventHandler( "playE", localPlayer,
	function ( source )
		local sound = playSound( "toosadforme.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 feels sorry for you!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)

addEvent( "playW", true )
addEventHandler( "playW", localPlayer,
	function ( source )
		local sound = playSound( "damnson.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 damnson", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	



addEvent( "playQ", true )
addEventHandler( "playQ", localPlayer,
	function ( source )
		local sound = playSound( "wow.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 wow;)", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	

addEvent( "playJ", true )
addEventHandler( "playJ", localPlayer,
	function ( source )
		local sound = playSound( "thug3.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 is living a thug life!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	

addEvent( "playA", true )
addEventHandler( "playA", localPlayer,
	function ( source )
		local sound = playSound( "thuglife.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 thuglife", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	


addEvent( "playD", true )
addEventHandler( "playD", localPlayer,
	function ( source )
		local sound = playSound( "surprise.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 made you a surprise!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	



addEvent( "playF", true )
addEventHandler( "playF", localPlayer,
	function ( source )
		local sound = playSound( "ridingdirty.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06 is going on a trip!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)	


addEvent( "playG", true )
addEventHandler( "playG", localPlayer,
	function ( source )
		local sound = playSound( "rofl.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06  is rolling on floor laughing!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)


addEvent( "playK", true )
addEventHandler( "playK", localPlayer,
	function ( source )
		local sound = playSound( "goodbye.mp3", false )
		     outputChatBox ( getPlayerName( localPlayer ).."#067E06  says goodbye!", 255, 255, 255, true )
		attachElements ( sound, source,  0,0,0,0,0,0)
	end
)


 

Edited by pro
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...