Rcon Only Chat
#1

Hello i was wondering if anyone knew how to change
pawn Код:
CMD:o(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 7) {
        new string[128]; format(string, sizeof(string), "[OWNER] %s: %s", PlayerName2(playerid), params[0] );
        MessageToAdmins(green,string);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be owner to use this command");
    return 1;
}
Into of sending it to all of the admins to just the level 7 admins? does anyone know how to do this?
Reply
#2

Use this
pawn Код:
forward MessageToOwner(color,const string[]);
public MessageToOwner(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) == 1)
        if(PlayerInfo[i][Level] >= 7){
        SendClientMessage(i, color, string); }
    }
    return 1;
}
CMD:o(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 7) {
        new string[128]; format(string, sizeof(string), "[OWNER] %s: %s", PlayerName2(playerid), params[0] );
        MessageToOwner(green,string);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be owner to use this command");
    return 1;
}
Reply
#3

I fixed it...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)