SA-MP Forums Archive
[ajuda] /infolider com o ultimo login dos lideres - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [ajuda] /infolider com o ultimo login dos lideres (/showthread.php?tid=290939)



[ajuda] /infolider com o ultimo login dos lideres - master_mc - 17.10.2011

Bom eu jб tentei mas bem que nгo consegui e agora estou aqui pedindo ajuda para voces.
Eu queria que nesse cmd aparecesse o ъltimo login de cada lider mas ta aparecendo o meu ultimo login em todos os lideres o que se passa alguem consegue corrigir este errovlw desde jб pela atenзгo


Re: /infolider com o ultimo login dos lideres - Pharrel - 17.10.2011

cria um arquivo qdo o player conectar checa c й lider, c for lider escreve no arquivo o ultimo login em uma linha com o numero da organizaзгo q ele й lider qdo der o comando pra ver o ultimo login vc abre o arquivo e pega as strings


Re: /infolider com o ultimo login dos lideres - master_mc - 17.10.2011

xD nao entendi nada pode se explicar melhor mais com cуdigo?


Re: /infolider com o ultimo login dos lideres - Pharrel - 17.10.2011

Se eu fizer o codigo vc vai aprender?


Re: /infolider com o ultimo login dos lideres - master_mc - 17.10.2011

tbm iria aprender acho que й mais facil prk eu nao sei como comecar nao :P


Re: /infolider com o ultimo login dos lideres - Pharrel - 17.10.2011

aprende como criar um arquivo, aprende como por uma string dentro de um arquivo, aprende como pegar uma string de um arquivo... Sabendo essas 3 coisas vc consegue fazer isso.


Re: /infolider com o ultimo login dos lideres - master_mc - 17.10.2011

Bom o cуdigo que eu estou usando й este alguem me consegue ajudar e me explicar o que estб mal?

pawn Код:
if (strcmp("/infolider", cmdtext, true, 10) == 0)
    {
        new InfoDataOrg[6][10];
        new org;
        new id;
        if(PlayerInfo[playerid][pAdmin] < 1)
        {
            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um admin.");
            return 1;
        }
        id = GetPlayerID(InfoOrg[org][Lider]);
        split(PlayerInfo[id][pLastLogin],InfoDataOrg,'/');
        SendClientMessage(playerid, COLOR_WHITE, "|______________ Lideres das Organizaзхes ______________|");
        format(string, sizeof(string), "Policia Militar: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[1][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Rotam: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[2][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Exйrcito: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[3][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Mйdicos: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[4][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Aztecas: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[5][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Farc: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[6][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Prefeitura: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[7][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Hitmans: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[8][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Reporteres: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[9][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Taxistas: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[10][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Policia Federal: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[11][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Groove: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[14][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "GI: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[15][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Ballas: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[17][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Vagos: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[18][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Comando Vermelho: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[19][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "PCC: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[20][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Helpers: %s, Ъltimo Login: dia %d/%d/%d - horбrio %d:%d:%d", InfoOrg[21][Lider],strval(InfoDataOrg[0]),strval(InfoDataOrg[1]),strval(InfoDataOrg[2]),strval(InfoDataOrg[3]),strval(InfoDataOrg[4]),strval(InfoDataOrg[5]));
        SendClientMessage(playerid, COR_HELPER, string);
        return 1;
    }



Re: /infolider com o ultimo login dos lideres - Renato_Silva - 17.10.2011

eu tentei colocar no meu gm aii nun aparece o lider --'


Re: /infolider com o ultimo login dos lideres - master_mc - 17.10.2011

Suas variaveis sao iguais бs minhas?й que aqui no meu gm aparece tudinho direitinho so que na parte de ultimo login: dia .... aparece o meu ultimo login em todos se for outro player a digitar /infolider aparece o ultimo login dele


Re: /infolider com o ultimo login dos lideres - Renato_Silva - 17.10.2011

passa esse cmd pra mim to precisando , variaveis tudinho plz