#3

Try This mean:P
pawn Код:
if(strcmp(cmd, "/makeadmin", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Use: /makeadmin [PlayerID] [level(1-1340)]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pAdmin] = level;
                        printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
                        format(string, sizeof(string), "   You have been promoted to a level %d admin by %s", level, sendername);
                        SendClientMessage(para1, COLOR_WHITE, string);
                        format(string, sizeof(string), "   You have promoted %s to a level %d admin.", giveplayer,level);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not admin!");
            }
        }
        return 1;
    }
Reply


Messages In This Thread
help - by omer5198 - 11.02.2011, 12:34
Re: help - by omer5198 - 11.02.2011, 12:36
Re: help - by Elviss - 11.02.2011, 12:40

Forum Jump:


Users browsing this thread: 1 Guest(s)