[Ajuda] info lider ultimo login
#5

ja sei oque й as variaveis estгo nulas(nгo estгo set/get nem um valor!) sem valor!


Da uma olhada nesse cуdigo й getado os Valores DIA MES.. para a variбvel array info[6][10]
@edit veja o cуdigo e sabera oque fazer ^^


pawn Код:
#include <a_samp>
#include <zcmd>

enum pInfo
{
    pLastLogin[20]
};
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" testes");
    print("--------------------------------------\n");


    cmd_dsds(0,#);
    return 1;
}


public OnPlayerConnect(playerid)
{
    strmid(PlayerInfo[playerid][pLastLogin], "0/0/0/0/0/0", 0, strlen("0/0/0/0/0/0"),255);
    return 1;
}
forward split(const strsrc[], strdest[][], delimiter);
public split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc)){
        if(strsrc[i]==delimiter || i==strlen(strsrc)){
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            strdest[aNum][len] = 0;
            li = i+1;
            aNum++;
        }
        i++;
    }
    return true;
}

CMD:dsds(playerid, params[])
{

    new dia,mes,ano,hora,mins,seg,string3[20];
    getdate(ano,mes,dia);
    gettime(hora,mins,seg);
    format(string3, sizeof(string3),"%d/%d/%d/%d/%d/%d",dia,mes,ano,hora,mins,seg);
    strmid(PlayerInfo[playerid][pLastLogin],string3,0,strlen(string3),255);

    new string2[3000];
    new Info[6][10];
    split(PlayerInfo[playerid][pLastLogin],Info,'/');
    format(string2, sizeof(string2), "Seu ъltimo login foi no dia %d/%d/%d horбrio %d:%d:%d",strval(Info[0]),strval(Info[1]),strval(Info[2]),strval(Info[3]),strval(Info[4]),strval(Info[5]));
    printf(#%s, string2);
    return true;
}
Reply


Messages In This Thread
info lider ultimo login - by Don_Speed - 11.12.2012, 10:51
Re: info lider ultimo login - by Baiano - 11.12.2012, 10:53
Re: info lider ultimo login - by Schocc - 11.12.2012, 11:03
Re: info lider ultimo login - by EditPawn - 11.12.2012, 11:05
Re: info lider ultimo login - by Schocc - 11.12.2012, 11:24
Re: info lider ultimo login - by Don_Speed - 11.12.2012, 12:45
Re: info lider ultimo login - by Don_Speed - 11.12.2012, 14:32
Re: info lider ultimo login - by Don_Speed - 11.12.2012, 19:00

Forum Jump:


Users browsing this thread: 2 Guest(s)