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][pCivil] == 1)
{
format(String,sizeof(String),"[Chat Civis] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pCivil] == 1)
SendClientMessage(i,COR_AMARELO,String);
}
|
Deixe sua OnPlayerText retornando 1 , e se executar o "! Meu texto" retorne "0" (zero)
|
if(text[0] == '!')
return 0;
public OnPlayerText(playerid, text[])
{
new String[180];
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid,Nome,sizeof(Nome));
if(text[0] == '!')
return 0;
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pCivil] == 1)
{
format(String,sizeof(String),"[Chat Civil] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pCivil] == 1)
SendClientMessage(i,COR_Civil,String);
}
if(PlayerInfo[playerid][pReporteres] == 2)
{
format(String,sizeof(String),"[Chat Reporteres] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
if(PlayerInfo[i][pReporteres] == 2)
SendClientMessage(i,COR_REPORTERS,String);
}
}
return 1;
}