02.04.2011, 03:23
When i do /achat FUAUJPAOGJ it will show to everyone that is connected to server, please help
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 < 10; ++i)
{
if(PlayerData[playerid][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;
}