/setleader cmd
#7

You only get that message if you try set your self as a leader when you already are a leader, and if you try to set leader on someone else who not is a leader, he got the message "That player is...."
so the cmd doesnt work this way
Quote:
Originally Posted by Marricio
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/setleader", true) == 0)
    {
        if(PlayerBase[playerid][pAdmin] == 1337)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SCM(playerid, COLOR_GREEN, "Use: /setleader [playerid] [Combat Team]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SCM(playerid, COLOR_GREEN, "Use: /setleader [playerid][ Combat Team]");
                return 1;
            }
            if(GetPlayerTeam(giveplayerid) != 0)
            {
                SCM(giveplayerid, COLOR_GREEN, "That player is already in a team! ");
                return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendare, sizeof(sendare));
            points = strval(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(points == 0)
                {
                    SetPlayerSkin(giveplayerid, 272);
                    PlayerBase[giveplayerid][pLedare] = 0;
                    PlayerBase[giveplayerid][pRang] = 0;
                    PlayerBase[playerid][pMedlem] = 0;
                    SetPlayerPos(giveplayerid, 414.6559,2531.7651,19.1601);
                    SetPlayerTeam(playerid, 4);
                    SetPlayerColor(playerid, COLOR_WHITE);
                    format(text, sizeof(text), "You Are No Longer A Team Command Chief Master!");
                    SCM(giveplayerid, COLOR_RED, text);
                    format(text, sizeof(text), "You Just Took %s's Command Chief Master Permissions", giveplayer);
                    SCM(playerid, COLOR_RED, text);
                }
                if(points == 1)
                {
                    PlayerBase[giveplayerid][pLedare] = 1;
                    PlayerBase[giveplayerid][pRang] = 6;
                    PlayerBase[playerid][pMedlem] = 1;
                    SetPlayerColor(playerid, COLOR_BLUE);
                    SetPlayerTeam(playerid, 1);
                    UpdateRank(giveplayerid);
                    format(text, sizeof(text), "%s Just Made You To Command Chief Master Over Bluefoxes!", sendare);
                    SCM(giveplayerid, COLOR_GREEN, text);
                    format(text, sizeof(text), "You Just Made %s Command Chief Master Over Bluefoxes!", giveplayer);
                    SCM(playerid, COLOR_GREEN, text);
                }
                if(points == 2)
                {
                    PlayerBase[giveplayerid][pLedare] = 2;
                    PlayerBase[giveplayerid][pRang] = 6;
                    PlayerBase[playerid][pMedlem] = 2;
                    SetPlayerColor(playerid, COLOR_YELLOW);
                    SetPlayerTeam(playerid, 2);
                    UpdateRank(giveplayerid);
                    format(text, sizeof(text), "%s Just Made You To Command Chief Master Over Thunderbirds!", sendare);
                    SCM(giveplayerid, COLOR_GREEN, text);
                    format(text, sizeof(text), "You Just Made %s To Command Chief Master Over Thunderbirds!", giveplayer);
                    SCM(playerid, COLOR_GREEN, text);
                }
                if(points == 3)
                {
                    PlayerBase[giveplayerid][pLedare] = 3;
                    PlayerBase[giveplayerid][pRang] = 6;
                    PlayerBase[playerid][pMedlem] = 3;
                    SetPlayerColor(playerid, COLOR_GREY);
                    SetPlayerTeam(playerid, 3);
                    UpdateRank(giveplayerid);
                    format(text, sizeof(text), "%s Just Made You To Command Chief Master Over Airwolves!", sendare);
                    SCM(giveplayerid, COLOR_GREEN, text);
                    format(text, sizeof(text), "You Just Made %s To Command Chief Master Over Airwolves!", giveplayer);
                    SCM(playerid, COLOR_GREEN, text);
                }
            }
            else(SCM(playerid, COLOR_RED, "That Player Is Already In A Team!"));
        }
        else(SCM(playerid, COLOR_RED, "You Are Not An Admin!"));
        return 1;
    }
Reply


Messages In This Thread
/setleader cmd - by cruising - 02.04.2011, 20:37
Re: /setleader cmd - by Marricio - 02.04.2011, 20:38
Re: /setleader cmd - by cruising - 02.04.2011, 20:48
Re: /setleader cmd - by Rivera - 02.04.2011, 20:51
Re: /setleader cmd - by Marricio - 02.04.2011, 20:52
Re: /setleader cmd - by blackwave - 02.04.2011, 20:53
Re: /setleader cmd - by cruising - 02.04.2011, 21:03
Re: /setleader cmd - by cruising - 02.04.2011, 21:09
Re: /setleader cmd - by Marricio - 02.04.2011, 21:31
Re: /setleader cmd - by cruising - 03.04.2011, 02:33

Forum Jump:


Users browsing this thread: 3 Guest(s)