02.04.2011, 03:30
pawn Код:
CMD:achat(playerid, params[])
{
if(PlayerData[playerid][AdminLevel] > 0)
{
new iName[MAX_PLAYER_NAME],iStr[128];
if(isnull(params)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /achat [text]");
GetPlayerName(playerid,iName,sizeof(iName));
for(new i = 0; i < MAX_PLAYERS; ++i) // i recommend using Foreach
{
if(PlayerData[i][AdminLevel] > 0 && IsPlayerConnected(i) && !IsPlayerNPC(i))
{
format(iStr,sizeof(iStr),"[ADMIN CHAT] %s: %s",iName,params);
SendClientMessage(i,0xFF9900AA,iStr);
}
}
}
else return 0;
return 1;
}