13.10.2013, 12:48
pawn Код:
public OnPlayerText(playerid, text[])
{
SetPlayerChatBubble(playerid, text, 0xE3E3E3FF, 100.0, 10000);
new String[180];
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid,Nome,sizeof(Nome));
if(text[0] == '!')
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][CV] == 1)
{
format(String,sizeof(String),"[Chat Comando Vermelho]: %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][CV] == 1)
SendClientMessage(i,COLOR_CV,String);
}
if(PlayerInfo[playerid][ADA] == 2)
{
format(String,sizeof(String),"[Chat Amigo dos Amigos]: %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][ADA] == 2)
SendClientMessage(i,COLOR_ADA,String);
}
if(PlayerInfo[playerid][TCP] == 3)
{
format(String,sizeof(String),"[Chat Terceiro Comando Puro]: %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][TCP] == 3)
SendClientMessage(i,COLOR_TCP,String);
}
if(PlayerInfo[playerid][Nada] == 4)
{
format(String,sizeof(String),"[Chat Outra Organizaзгo]: %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][Nada] == 4)
SendClientMessage(i,-1,String);
}
return 0;
}
}
return true;
}