Jump to content

Why show in global chat the teamsay?


Turbe$Z

Recommended Posts

local function ujteamsay(message, messageType)
	if messageType == 2 then
        cancelEvent()
		outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, root, red, green, blue, true )
	end
end
addEventHandler("onPlayerChat", root, ujteamsay)

how to fix this? i want just team mates see the message.. :S

 

*sorry for my very bad English :c*

Edited by Turbo777
Link to comment
local function ujteamsay(message, messageType)
	if messageType == 2 then
        cancelEvent()
    	local team = getPlayerTeam(source)
    	if(team) then
      		for i,player in pairs(getPlayersInTeam(team)) do
				outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, player, red, green, blue, true )
        	end
      	end
	end
end
addEventHandler("onPlayerChat", root, ujteamsay)

 

  • Like 1
Link to comment
1 hour ago, Hornet said:

local function ujteamsay(message, messageType)
	if messageType == 2 then
        cancelEvent()
    	local team = getPlayerTeam(source)
    	if(team) then
      		for i,player in pairs(getPlayersInTeam(team)) do
				outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, player, red, green, blue, true )
        	end
      	end
	end
end
addEventHandler("onPlayerChat", root, ujteamsay)

 

Thaanks :DD

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