Admin Command Help?
#1

I have two types of commands
Here's one set
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;
}

CMD:a(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 3) {
        new string[128]; format(string, sizeof(string), "[ADMIN] %s: %s", PlayerName2(playerid), params[0] );
        MessageToAdmins(green,string);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be admin to use this command");
    return 1;
}

CMD:m(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 2) {
        new string[128]; format(string, sizeof(string), "[MOD] %s: %s", PlayerName2(playerid), params[0] );
        MessageToAdmins(green,string);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be moderator to use this command");
    return 1;
}

CMD:v(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 1) {
        new string[128]; format(string, sizeof(string), "[VIP] %s: %s", PlayerName2(playerid), params[0] );
        MessageToAdmins(green,string);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be a VIP to use this command");
    return 1;
}
And the second code
pawn Код:
//==============================================================================
// Vip Chat
//==============================================================================
    if(text[0] == '*' && AccInfo[playerid][pVip] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"|ChatVip| %s: %s",string,text[1]);
        MessageToPlayerVIP(0xDC686BAA,string);
        SaveIn("ChatVipLog",string);
        return 0;
    }
//==============================================================================
// Administration Chat
//==============================================================================
    if(text[0] == '#' && AccInfo[playerid][Level] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
        MessageToAdmins(green,string);
        GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"9Admin Chat: %s: %s",string,text[1]);
        IRC_GroupSay(gGroupID2, IRC_ADMINCHANNEL, string);
        #if ADM_CHAT_LOG == true
        SaveIn("AdmChatLog",string);
        #endif
        return 0;
    }
I would like the first code converted into the second code could anyone help me in doing so?
Reply


Messages In This Thread
Admin Command Help? - by Tass007 - 19.06.2013, 08:26
Re: Admin Command Help? - by Tass007 - 20.06.2013, 00:24
Re: Admin Command Help? - by SwisherSweet - 20.06.2013, 00:28
Re: Admin Command Help? - by Tass007 - 20.06.2013, 01:01
Re: Admin Command Help? - by Tass007 - 20.06.2013, 01:03
Re: Admin Command Help? - by SwisherSweet - 20.06.2013, 01:07
Re: Admin Command Help? - by SilverKiller - 20.06.2013, 01:17
Re: Admin Command Help? - by Tass007 - 20.06.2013, 03:30
Re: Admin Command Help? - by Tass007 - 22.06.2013, 03:10

Forum Jump:


Users browsing this thread: 2 Guest(s)