Jump to content

Why not working isPlayerMuted?


Turbe$Z

Recommended Posts

function privateMessage(thePlayer,commandName,sendToName,...)
	local pmWords = { ... }
	local pmMessage = table.concat( pmWords, " " )
	if sendToName then
		if (getPlayerFromParticalName (sendToName)) then
		toPlayer = (getPlayerFromParticalName (sendToName))
				if isPlayerMuted ( thePlayer ) then
					outputChatBox ( "You Cannot Send Pm Message, Because You Are Muted" thePlayer, r, g, b, true )
				else
			if not (toPlayer == thePlayer) then
				if not (pmMessage == "") then
					outputChatBox("#0088FF[#c8c8c8Privát]#FFFFFF Üzenet neki: #FFFFFF" .. getPlayerName(toPlayer) .. "#FF0000: " .. pmMessage, thePlayer, 255, 255, 255, true)
					outputChatBox("#0088FF[#c8c8c8Privát]#FFFFFF Üzenet tőle: #FFFFFF" .. getPlayerName(thePlayer) .. "#00FF00: " .. pmMessage, toPlayer, 255, 255, 255, true)
				else
					outputChatBox("#0088FF[#c8c8c8Privát]#FFFFFF Helytelen használat! Helyes:#FFFFFF /pm <név> <üzenet>", thePlayer, 255, 255, 255, true)
					return false
				end
			else
				outputChatBox("#0088FF[#c8c8c8Privát]#FFFFFF Magaddal nem tudsz csevegni#FFFFFF!", thePlayer, 255, 255, 255, true)
				return false
			end
		else
			outputChatBox("#0088FF[#c8c8c8Privát]#FFFFFF Játékos nem található! #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true)
			return false
		end
	else
		outputChatBox("#0088FF[#c8c8c8Privát]#FFFFFF Helytelen használat! Helyes:#FFFFFF /pm <név> <üzenet>", thePlayer, 255, 255, 255, true)
		return false
	end
end
addCommandHandler("pm", privateMessage)

i want, when a player muted, he cannot send pm to other player, why not working this? :| 

sorry for my very bad English:c

Edited by Turbo777
Link to comment
function privateMessage(thePlayer,commandName,sendToName,...)
	if ( sendToName ) then
		if (getPlayerFromParticalName (sendToName)) then
			local toPlayer = getPlayerFromParticalName (sendToName)
			if isPlayerMuted ( thePlayer ) then
				outputChatBox ( "You Cannot Send Pm Message, Because You Are Muted" thePlayer, r, g, b, true )
				return 
			end
			local pmMessage = table.concat( { ... }, " " )
			if not (toPlayer == thePlayer) then
				if not (pmMessage == "") then
					outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Uzenet neki: #FFFFFF" .. getPlayerName(toPlayer) .. "#FF0000: " .. pmMessage, thePlayer, 255, 255, 255, true)
					outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Uzenet t?le: #FFFFFF" .. getPlayerName(thePlayer) .. "#00FF00: " .. pmMessage, toPlayer, 255, 255, 255, true)
				else
					outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Helytelen haszn?lat! Helyes:#FFFFFF /pm <név> <üzenet>", thePlayer, 255, 255, 255, true)
					return false
				end
			else
				outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Magaddal nem tudsz csevegni#FFFFFF!", thePlayer, 255, 255, 255, true)
				return false
			end
		else
			outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF J?tékos nem tal?lhat?! #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true)
			return false
		end
	else
		outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Helytelen haszn?lat! Helyes:#FFFFFF /pm <név> <üzenet>", thePlayer, 255, 255, 255, true)
		return false
	end
end
addCommandHandler("pm", privateMessage)

 

  • Like 1
Link to comment
2 hours ago, !#NssoR_) said:

function privateMessage(thePlayer,commandName,sendToName,...)
	if ( sendToName ) then
		if (getPlayerFromParticalName (sendToName)) then
			local toPlayer = getPlayerFromParticalName (sendToName)
			if isPlayerMuted ( thePlayer ) then
				outputChatBox ( "You Cannot Send Pm Message, Because You Are Muted" thePlayer, r, g, b, true )
				return 
			end
			local pmMessage = table.concat( { ... }, " " )
			if not (toPlayer == thePlayer) then
				if not (pmMessage == "") then
					outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Uzenet neki: #FFFFFF" .. getPlayerName(toPlayer) .. "#FF0000: " .. pmMessage, thePlayer, 255, 255, 255, true)
					outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Uzenet t?le: #FFFFFF" .. getPlayerName(thePlayer) .. "#00FF00: " .. pmMessage, toPlayer, 255, 255, 255, true)
				else
					outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Helytelen haszn?lat! Helyes:#FFFFFF /pm <név> <üzenet>", thePlayer, 255, 255, 255, true)
					return false
				end
			else
				outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Magaddal nem tudsz csevegni#FFFFFF!", thePlayer, 255, 255, 255, true)
				return false
			end
		else
			outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF J?tékos nem tal?lhat?! #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true)
			return false
		end
	else
		outputChatBox("#0088FF[#c8c8c8Priv?t]#FFFFFF Helytelen haszn?lat! Helyes:#FFFFFF /pm <név> <üzenet>", thePlayer, 255, 255, 255, true)
		return false
	end
end
addCommandHandler("pm", privateMessage)

 

Thank you:D

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