SA-MP Forums Archive
Rcon Only Chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Rcon Only Chat (/showthread.php?tid=355766)



Rcon Only Chat - Tass007 - 01.07.2012

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?


Re: Rcon Only Chat - Ironboy - 01.07.2012

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



Re: Rcon Only Chat - Tass007 - 06.08.2012

I fixed it...