[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


Messages In This Thread
[AJUDA] Comando /orgs Bugado - by Spencer1 - 26.02.2012, 22:28
Re: [AJUDA] Comando /orgs Bugado - by paulor - 26.02.2012, 23:27
Respuesta: [AJUDA] Comando /orgs Bugado - by Spencer1 - 27.02.2012, 00:13
Re: [AJUDA] Comando /orgs Bugado - by Etton - 27.02.2012, 02:02
Respuesta: [AJUDA] Comando /orgs Bugado - by Spencer1 - 27.02.2012, 03:35

Forum Jump:


Users browsing this thread: 1 Guest(s)