OnPlayerText => OnPlayerCommandText
#2

Hope it helps you abit.
pawn Код:
dcmd_a(playerid, params[])
{
    new ChatMessage[128];
    if(PlayerInfo[i][AdminLevel] == 0) return SendClientMessage(playerid, COLOR_YELLOW, "Suck.");
    if(sscanf(params, "s", ChatMessage)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /a [message]");
   
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(string,sizeof(string),"** ADMIN CHAT %s [ID: %d]: %s",name,playerid,ChatMessage);

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][AdminLevel] >= 2)
        {
        SendClientMessage(i, COLOR_YELLOW, string);
        PlayerPlaySound(i, 1137, 0.0, 0.0, 0.0);
        }
    }
    return 0;
}
Reply


Messages In This Thread
OnPlayerText => OnPlayerCommandText - by Face9000 - 20.12.2010, 19:57
Re: OnPlayerText => OnPlayerCommandText - by Seven. - 20.12.2010, 20:02
Re: OnPlayerText => OnPlayerCommandText - by Face9000 - 20.12.2010, 20:04

Forum Jump:


Users browsing this thread: 1 Guest(s)