Turbe$Z Posted February 22, 2017 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
nikitafloy Posted February 22, 2017 Posted February 22, 2017 46 minutes ago, Turbo777 said: root There must be another argument root - applies to all
Turbe$Z Posted February 22, 2017 Author 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?
nikitafloy Posted February 22, 2017 Posted February 22, 2017 14 minutes ago, Turbo777 said: And what applies just to team mates? how do u define 'team mates'?
Turbe$Z Posted February 22, 2017 Author Posted February 22, 2017 1 minute ago, nikitafloy said: how do u define 'team mates'? players in the my gang
nikitafloy Posted February 22, 2017 Posted February 22, 2017 6 minutes ago, Turbo777 said: players in the my gang Do u use createTeam or?
nikitafloy Posted February 22, 2017 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
Mr.Loki Posted February 22, 2017 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
Turbe$Z Posted February 22, 2017 Author 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
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