Jump to content

x[ Functions ]x Voice Room


Recommended Posts

When you add players to a Room you can setElementData and use the Room name then when a player uses voice onClientPlayerVoiceStart do a check to see if his data for the room's name matches yours if it does not then cancelEvent.

addEventHandler ( "onClientPlayerVoiceStart", root, 
	function() 
		if localPlayer ~= source then
			if getElementData(source, "VoiceRoom") ~= getElementData(localPlayer, "VoiceRoom") then 
				cancelEvent()
			end 
		end 
	end 
) 

 

 

 

  • Like 1
Link to comment
2 hours ago, Mr.Loki said:

When you add players to a Room you can setElementData and use the Room name then when a player uses voice onClientPlayerVoiceStart do a check to see if his data for the room's name matches yours if it does not then cancelEvent.


addEventHandler ( "onClientPlayerVoiceStart", root, 
	function() 
		if localPlayer ~= source then
			if getElementData(source, "VoiceRoom") ~= getElementData(localPlayer, "VoiceRoom") then 
				cancelEvent()
			end 
		end 
	end 
) 

 

Thanks , The Best Programmer :)

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