Turbe$Z Posted February 22, 2017 Share Posted February 22, 2017 (edited) 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.. *sorry for my very bad English :c* Edited February 22, 2017 by Turbo777 Link to comment
nikitafloy Posted February 22, 2017 Share Posted February 22, 2017 46 minutes ago, Turbo777 said: root There must be another argument root - applies to all Link to comment
Turbe$Z Posted February 22, 2017 Author Share Posted February 22, 2017 1 minute ago, nikitafloy said: There must be another argument root - applies to all And what applies just to team mates? Link to comment
nikitafloy Posted February 22, 2017 Share Posted February 22, 2017 14 minutes ago, Turbo777 said: And what applies just to team mates? how do u define 'team mates'? Link to comment
Turbe$Z Posted February 22, 2017 Author Share Posted February 22, 2017 1 minute ago, nikitafloy said: how do u define 'team mates'? players in the my gang Link to comment
nikitafloy Posted February 22, 2017 Share Posted February 22, 2017 6 minutes ago, Turbo777 said: players in the my gang Do u use createTeam or? Link to comment
Turbe$Z Posted February 22, 2017 Author Share Posted February 22, 2017 no, i create a team in admin panel Link to comment
nikitafloy Posted February 22, 2017 Share Posted February 22, 2017 (edited) 3 minutes ago, Turbo777 said: no, i create a team in admin panel then u should use this getTeamName if getTeamName ( player ) == 'there ur name of team' then outputChatBox(..., player, ...) end Edited February 22, 2017 by nikitafloy Link to comment
Mr.Loki Posted February 22, 2017 Share Posted February 22, 2017 57 minutes ago, nikitafloy said: if getTeamName ( player ) == 'there ur name of team' then outputChatBox(..., player, ...) end if getTeamName ( player ) == getTeamName( source ) then outputChatBox(..., player, ...) end I don't think you want people from other teams to be talking in the same team lol Link to comment
RenanPG Posted February 22, 2017 Share Posted February 22, 2017 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) 1 Link to comment
Turbe$Z Posted February 22, 2017 Author Share Posted February 22, 2017 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
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