25.07.2015, 09:24
Ok. Then you have to write it like this:
- Mencent
PHP код:
CMD:achat(playerid, params[])
{
if(pInfo[playerid][AdminLevel] < 1) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM ERROR]: You don't have the privilege to use that command.");
{
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof string, "{FF0000}|AdminChat| {FFFFFF}:%s: {FFFF33}%s", name, string);
SendMessageToAdmins(-1,string);
}
return 1;
}
//at the end of the script
stock SendMessageToAdmins(color,string[])
{
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i) || pInfo[i][AdminLevel] < 1)continue;
SendClientMessage(i,color,string);
}
return 1;
}