Need team chat for my tdm!!!!!!!PLEASE - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need team chat for my tdm!!!!!!!PLEASE (
/showthread.php?tid=123822)
Need team chat for my tdm!!!!!!!PLEASE -
Nexotronix - 27.01.2010
I need team chat! like this:
i'm writin' "!" than message!
help plz
tnx
Re: Need team chat for my tdm!!!!!!!PLEASE -
Cry_Wolf - 27.01.2010
Script Request Thread #4.
Re: Need team chat for my tdm!!!!!!!PLEASE -
Nexotronix - 27.01.2010
Quote:
Originally Posted by Cry_Wolf
Script Request Thread #4.
|
tnx
Re: Need team chat for my tdm!!!!!!!PLEASE -
deather - 27.01.2010
public OnPlayerText(playerid,text[])
{
if(text[0] == '!')
{
new string[128];
format(string, sizeof(string), "Team Chat: %s", text[1]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, COLOR, string);
}
return 0;
}
Re: Need team chat for my tdm!!!!!!!PLEASE -
hvampire - 04.02.2010
Код:
//------------------------------------------------------------------------------------------------------
public OnPlayerText(playerid, text[])
{
new string[256];
new playername[MAX_PLAYER_NAME];
if(text[0] == '!' && text[1] != 0)
{
GetPlayerName( playerid, playername, MAX_PLAYER_NAME );
format( string, 128, "[Team] %s: %s", playername, text[1] );
for(new i = 0; i < MAX_PLAYERS; i++ )
{
if( IsPlayerConnected(i) && gTeam[playerid] == gTeam[i] )
SendClientMessage( i, UrColor, string );
}
return 0;
}
return 1;
}
//------------------------------------------------------------------------------------------------------
u just need to replace "UrColor" to the color u wanna use like : COLOR_RED , COLOR_GREEN , but they need to be defined