11.06.2010, 12:42
if( (text[0] == '#' || text[0] == '@') && strlen(text) > 1)
{
new str[128];
new szPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
if(IsPlayerAdmin(playerid))
{
format(str, 128, "[Admin] %s: %s", szPlayerName, text[1]);
for(new iPlayerID; iPlayerID < MAX_PLAYERS; iPlayerID++)
{
if(!IsPlayerConnected(iPlayerID)) continue;
if(!IsPlayerAdmin(iPlayerID)) continue;
SendClientMessage(iPlayerID, 0xFFFF22AA, str);
}
}
return 0;
}
{
new str[128];
new szPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
if(IsPlayerAdmin(playerid))
{
format(str, 128, "[Admin] %s: %s", szPlayerName, text[1]);
for(new iPlayerID; iPlayerID < MAX_PLAYERS; iPlayerID++)
{
if(!IsPlayerConnected(iPlayerID)) continue;
if(!IsPlayerAdmin(iPlayerID)) continue;
SendClientMessage(iPlayerID, 0xFFFF22AA, str);
}
}
return 0;
}