Date Command Problem
#1

Hi recently i made the date of the last login to be saved in a database but when i tried to make command for sending the date to me it just send me 0 for the date
Here is my code:
pawn Код:
CMD:proveriaktivnost(playerid,params[])
{
    new data;
    new year,month,day;
    new str[500];
    new pname[MAX_PLAYER_NAME],query[300],makepl[500];
    if(PlayerInfo[playerid][pAdmin] < 1336) return SCM(playerid,red,"Greska: Nemozes da ja koristis ovaa komanda");
    if(sscanf(params,"s[24]",pname)) return SCM(playerid,COLOR_GREY,"KORISTI: /proveriaktivnost [ime na igrac]");
    //CheckMySQL();
    mysql_query(g_Handle, str);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        format(query, sizeof(query), "SELECT `data` = '%d/%d/%d' FROM `players` WHERE `ime` = '%s'",year,month,day,pname);
        mysql_query(g_Handle, str);
        format(str,sizeof(str),"Ime: {FF9900}%s",pname);
        SCM(playerid,-1,str);
        format(str,sizeof(str),"Data: {FF9900}%d/%d/%d",year,month,day);
        SCM(playerid,-1,str);
    }
    else
    {
        SCM(playerid,red,"Greska: Imeto ne postoi");
    }
    return 1;
}
Please help me if you can
Reply


Messages In This Thread
Date Command Problem - by Dancev96 - 27.04.2014, 10:06

Forum Jump:


Users browsing this thread: 1 Guest(s)