06.01.2011, 07:16
pawn Код:
//In OnPlayerCommandText
if(!strcmp(cmdtext,"/c",true))
{
if(Spieler[playerid][AdminLevel] <2)return SendClientMessage(playerid,COLOR_GREY,"You're cannot use this command");
GetPlayerName(playerid,string,24);
if(!cmdtext[3])return SendClientMessage(playerid,COLOR_GREY,"Use: /c [Text]");
format(string,sizeof(string), "Server - AdminChat [%d] %s: %s",playerid, string, cmdtext[3]);
print(string);
for(new player;player<MAX_PLAYERS;player++)
{
if(!IsPlayerConnected(player))continue;
if(Spieler[playerid][AdminLevel] <2)continue;
PlayerPlaySound(player,1057 ,0,0,0);
SendClientMessage(player,COLOR_LIGHTGREEN,string);
}
return 1;
}