[+REP][URGENT]Help with a cmd!
#8

Yes change the old SendAdminMessage to this

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Usage: Example if you want to send to +1 admins(all admins) use SendAdminMessage(color, msg, 1)
if you want to send to +3 admins(don't send to 1 and 2) use SendAdminMessage(color, msg, 3)
Just add the new params to everywhere you used it

Well, you code becames
PHP код:
CMD:ma(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 1)
    {
        new 
msg[128];
        new 
logstring[128];
        new 
yearmonthdayhourminutesecond;
        
getdate(yearmonthday);
        
gettime(hourminutesecond);
        if(!
sscanf(params"s[128]"msg))
        {
            
strmid(sendernamePlayerRPName(playerid), 0MAX_PLAYER_NAME);
            new 
alevel[25];
            if(
PlayerInfo[playerid][pAdmin] == 1) { alevel "Moderator"; }
            if(
PlayerInfo[playerid][pAdmin] == 2) { alevel "Junior Admin"; }
            
format(stringsizeof(string), "* [MOD CHAT] %s %s: %s"alevelsendernamemsg);
            
format(logstringsizeof(logstring), "[%d/%d/%d - %d:%d:%d] * %s %s"daymonthyearhourminutesecondalevelsendernamemsg);
            
SendAdminMessage(COLOR_PINKstring1);//HERE
            
AchatLog(logstring);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WHITE"USAGE: (/mc)chat [MOD chat]");
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"   You are not authorized to use that command !");
    }
    return 
1;
}
CMD:adm(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 3)
    {
        new 
msg[128];
        new 
logstring[128];
        new 
yearmonthdayhourminutesecond;
        
getdate(yearmonthday);
        
gettime(hourminutesecond);
        if(!
sscanf(params"s[128]"msg))
        {
            
strmid(sendernamePlayerRPName(playerid), 0MAX_PLAYER_NAME);
            new 
alevel[25];
            if(
PlayerInfo[playerid][pAdmin] == 3) { alevel "Senior Admin"; }
            if(
PlayerInfo[playerid][pAdmin] == 4) { alevel "Head Admin"; }
            if(
PlayerInfo[playerid][pAdmin] == 1337) { alevel "Lead Head Admin"; }
            
format(stringsizeof(string), "*[ADM CHAT] %s %s: %s"alevelsendernamemsg);
            
format(logstringsizeof(logstring), "[%d/%d/%d - %d:%d:%d] * %s %s"daymonthyearhourminutesecondalevelsendernamemsg);
            
SendAdminMessage(COLOR_GREENstring3);//HERE
            
AchatLog(logstring);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WHITE"USAGE: (/adm)in [admin chat]");
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"   You are not authorized to use that command !");
    }
    return 
1;
}
CMD:ca(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 1338)
    {
        new 
msg[128];
        new 
logstring[128];
        new 
yearmonthdayhourminutesecond;
        
getdate(yearmonthday);
        
gettime(hourminutesecond);
        if(!
sscanf(params"s[128]"msg))
        {
            
strmid(sendernamePlayerRPName(playerid), 0MAX_PLAYER_NAME);
            new 
alevel[25];
            if(
PlayerInfo[playerid][pAdmin] == 1338) { alevel "Community Manager"; }
            if(
PlayerInfo[playerid][pAdmin] == 99999) { alevel "Community Developer"; }
            if(
PlayerInfo[playerid][pAdmin] == 100000) { alevel "Community Owner"; }
            
format(stringsizeof(string), "*[COM. ADM'S CHAT] %s %s: %s"alevelsendernamemsg);
            
format(logstringsizeof(logstring), "[%d/%d/%d - %d:%d:%d] * %s %s"daymonthyearhourminutesecondalevelsendernamemsg);
            
SendAdminMessage(COLOR_BLUEstring,1338);//HERE
            
AchatLog(logstring);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WHITE"USAGE: (/ca)dmin [COM. admin chat]");
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"   You are not authorized to use that command !");
    }
    return 
1;

Reply


Messages In This Thread
[+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 14:42
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 14:46
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 14:52
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 14:56
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 14:59
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 15:05
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 15:09
Re: [+REP][URGENT]Help with a cmd! - by Shinja - 12.08.2016, 15:15
Re: [+REP][URGENT]Help with a cmd! - by StrikerZ - 12.08.2016, 15:24
Re: [+REP][URGENT]Help with a cmd! - by JessThompson - 12.08.2016, 15:36

Forum Jump:


Users browsing this thread: 2 Guest(s)