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 My Fun server: My DD server:
nikitafloy Posted February 22, 2017 Posted February 22, 2017 46 minutes ago, Turbo777 said: root There must be another argument root - applies to all Нужен скриптер?Benuff Server - Russian Site MTA:SA - Updating, Client, Game, Problem Solving, Help for Russian Players and etc.
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? My Fun server: My DD server:
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'? Нужен скриптер?Benuff Server - Russian Site MTA:SA - Updating, Client, Game, Problem Solving, Help for Russian Players and etc.
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 My Fun server: My DD server:
nikitafloy Posted February 22, 2017 Posted February 22, 2017 6 minutes ago, Turbo777 said: players in the my gang Do u use createTeam or? Нужен скриптер?Benuff Server - Russian Site MTA:SA - Updating, Client, Game, Problem Solving, Help for Russian Players and etc.
Turbe$Z Posted February 22, 2017 Author Posted February 22, 2017 no, i create a team in admin panel My Fun server: My DD server:
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 Нужен скриптер?Benuff Server - Russian Site MTA:SA - Updating, Client, Game, Problem Solving, Help for Russian Players and etc.
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 [REL]Cinema Experience Beta 2.0 [TUT]Object offsets with OOP. [TUT] Adding a Discord bot to your server. Discord: Loki#7355
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 My Fun server: My DD server:
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