[AJUDA] Sistema de sub 444 e 555
#4

Tenta Esse Aqui
pawn Код:
if(strcmp(cmd, "/promover", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Use:  /Promover [ID/Nick] [Cargos 1 - 555]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            if(level > 555 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Cargos de 0 a 555!"); return 1; }
            if (PlayerInfo[playerid][pLider] >= 1)
            {
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        if(PlayerInfo[para1][pMembro] != PlayerInfo[playerid][pLider]){ SendClientMessage(playerid,COLOR_YELLOW,"Este player nгo й da sua organizaзгo."); return 1; }
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pCargo] = level;
                        format(string, sizeof(string), "   Voce foi promovido pelo lнder %s", sendername);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "   Voce promoveu %s ao cargo %d.", giveplayer,level);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        new org = PlayerInfo[playerid][pLider];
                        new arquivoi[256];
                        format(arquivoi, sizeof(arquivoi), "/Orgs/Infoorg%d.ini", org);
                        if(level == 555) { strmid(InfoOrg[org][iSub555],giveplayer,0,strlen(giveplayer),255); dini_Set(arquivoi, "Sub555", giveplayer); }
                        else if(level == 444) { strmid(InfoOrg[org][iSub444],giveplayer,0,strlen(giveplayer),255); dini_Set(arquivoi, "Sub444", giveplayer); }
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo й um lнder!");
            }
        }
        return 1;
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)