Little Help
#1

Hey Guyz i want to make a command /A [Text]
For Admin chat
I Tried but i cant make it
Can you Guyz please make it for me
No d_cmd,Z_cmd,Y_cmd
Reply
#2

Any help please?
Reply
#3

i help you
Ther have the cod
pawn Код:
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USe: (/a)dmin [admin chat]");
                return 1;
            }

            new arank[64];
            if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Moderator"; }
            else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Level 2 Admin"; }
            else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Level 3 Admin"; }
            else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Level 4 Admin"; }
            else if(PlayerInfo[playerid][pAdmin] == 1337) { arank = "Lead Admin"; }
            else if(PlayerInfo[playerid][pAdmin] == 1338) { arank = "Scripter"; }
            else if(PlayerInfo[playerid][pAdmin] == 1339) { arank = "Co-Owner"; }
            else if(PlayerInfo[playerid][pAdmin] == 1340) { arank = "Owner"; }
            else { arank = "Moderator"; }

            format(string, sizeof(string), "*** %s %s *** %s", arank, sendername, result);
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                SendAdminMessage(COLOR_YELLOW, string);
            }
            printf("Admin %s: %s", sendername, result);
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)