admin chat help
#2

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;
}
Reply


Messages In This Thread
admin chat help - by tanush - 02.04.2011, 03:23
Re: admin chat help - by Marricio - 02.04.2011, 03:30
Re: admin chat help - by Joe Staff - 02.04.2011, 06:31

Forum Jump:


Users browsing this thread: 1 Guest(s)