if(IsPlayerConnected(playerid)) { if(text[0] == '!') { SendClientMessage(playerid, 0xAA0000AA, "You are sending a gang message"); new name[24], string[128]; GetPlayerName(playerid, name, 24); format(string, sizeof(string), "[Team Chat]%s: %s", name, text[1]); printf("%s", string); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][gang_member] || PlayerInfo[i][gang_leader] == PlayerInfo[playerid][gang_member] || PlayerInfo[playerid][gang_leader]) SendClientMessage(i, GetPlayerColor(playerid), string); } } return 0; } } |
if(IsPlayerConnected(playerid))
{
if(text[0] == '!')
{
SendClientMessage(playerid, 0xAA0000AA, "You are sending a gang message");
new name[24], string[128];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[Team Chat]%s: %s", name, text[1]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][gang_member] || PlayerInfo[i][gang_leader] == PlayerInfo[playerid][gang_member] || PlayerInfo[playerid][gang_leader])
SendClientMessage(i, GetPlayerColor(playerid), string);
}
}
return 0;
}
}
GetPlayerColor(playerid)
if(IsPlayerConnected(playerid))
{
if(text[0] == '!')
{
SendClientMessage(playerid, 0xAA0000AA, "You are sending a gang message");
new name[24], string[128];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[Team Chat]%s: %s", name, text[1]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][gang_member] || PlayerInfo[i][gang_leader] == PlayerInfo[playerid][gang_member] || PlayerInfo[playerid][gang_leader])
SendClientMessage(i, COLOR_LIGHTBLUE, string);//<<<<
}
}
return 0;
}
}
SendClientMessage(i, COLOR_LIGHTBLUE, string);
//or
SendClientMessage(i, 0x33CCFFAA, string);