[AJUDA] Comando /orgs Bugado
#1

seguinte, tenho o GM do PH, e quando dou /orgs da Server Unknows Comand. aqui estб o Code.

pawn Код:
new org[128],org2[128],string[1024],Org[32],tmp[32],giveid;
    format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[Player[playerid][pMember]]);
    string = " ";
    Org = OrgsNames[GetPlayerOrg(playerid)];
    for(new i=0;i<sizeof(OrgsCargos);i++)
    {
        format(tmp,32,"%s",dini_Get(org,OrgsCargos[i]));
        giveid = ReturnUser(tmp);
        if(IsPlayerConnected(giveid))
            format(org2,128,"{C2A2DA}%s - %s - {00D900}Online\n",OrgsCargos[i],dini_Get(org,OrgsCargos[i]));
        else if(strcmp(dini_Get(org,OrgsCargos[i]),"Nenhum",true)==0)
                format(org2,128,"{C2A2DA}%s - Nenhum\n",OrgsCargos[i]);
        else
            format(org2,128,"{C2A2DA}%s - %s - {AA3333}Offline\n",OrgsCargos[i],dini_Get(org,OrgsCargos[i]));
        if(strlen(string) < 1000)
            format(string,2048,"%s %s",string, org2);
    }
    ShowPlayerDialog(playerid, 24, DIALOG_STYLE_MSGBOX, Org, string, "Fechar", "");
}

stock AddMembro(giveid)
{
    new org[128];
    format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[Player[giveid][pMember]]);
    if(!dini_Exists(org))
    {
        dini_Create(org);
        for(new i=0;i<sizeof(OrgsCargos);i++)
        {
            if(i==0 && Player[giveid][pLeader] != 0)
               dini_Set(org,"Lнder",Player[giveid][pName]);
            else
                dini_Set(org,OrgsCargos[i],"Nenhum");
        }
    }
    else
    {
        new l;
        if(Player[giveid][pRank] == 6)
            l=0;
        else if(Player[giveid][pRank] < 4)
            l=3;

        for(new i=l;i<sizeof(OrgsCargos);i++)
            if(strcmp(dini_Get(org,OrgsCargos[i]),"Nenhum",true)==0)
                return dini_Set(org,OrgsCargos[i],Player[giveid][pName]);

        return SendClientMessage(giveid,COLOR_RED,"[ERRO] Esta organizaзгo jб atingiu o limite de membros.");
    }
    return 1;
}

stock DelMembro(giveid)
{
    new org[128];
    format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[Player[giveid][pMember]]);

    for(new i=0;i<sizeof(OrgsCargos);i++)
        if(strcmp(dini_Get(org,OrgsCargos[i]),Player[giveid][pName],true)==0)
            return dini_Set(org,OrgsCargos[i],"Nenhum");

    return 1;
}
Reply
#2

O problema nгo esta no comando e sim no 'Frename'! Apague as linhas frename de seu GM e veja o resultado!
Reply
#3

ja tentei mano nao deu
Reply
#4

Talvez seja pela falta de uma return no final do comando... tente por return e vк se funciona.
Reply
#5

ta assim
pawn Код:
dcmd_orgs(playerid, params[])
    {
        #pragma unused params
        new org[128],org2[128],string[2048],tmp[32],giveid;
        for(new i = 1; i < MAX_ORGS; ++i)
        {
            format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[i]);
            format(tmp,32,"%s",dini_Get(org, OrgsCargos[0]));

            if(strlen(tmp) < 3)
                tmp = "Ninguйm";

            giveid = ReturnUser(tmp);
            if(IsPlayerConnected(giveid))
                format(org2,128,"{C2A2DA} %d >> %s: %s - {00D900}Online\n", i, OrgsNames[i], tmp);

            else
                format(org2,128,"{C2A2DA} %d >> %s: %s - {AA3333}Offline\n", i, OrgsNames[i], tmp);

            strcat(string, org2);
        }
        ShowPlayerDialog(playerid, 10000, DIALOG_STYLE_MSGBOX, "Organizaзхes", string, "Fechar", "");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)