Turbe$Z Posted April 30, 2017 Share Posted April 30, 2017 (edited) 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 April 30, 2017 by Turbo777 Link to comment
!#NssoR_) Posted April 30, 2017 Share Posted April 30, 2017 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) 1 Link to comment
Turbe$Z Posted April 30, 2017 Author Share Posted April 30, 2017 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
Simi23 Posted April 30, 2017 Share Posted April 30, 2017 (edited) --Off-- TheVR logó Edited April 30, 2017 by Simi23 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now