Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

RegDate

$
0
0
I'm trying to show register date in /stats.

This is what i did in /stats command:

Code:

format(temp, sizeof(temp), ""WHITE"Register Date: "GREEN"%s\n\n",Player[playerid][RegisterDate]);
    strcat(info, temp);


Register date is saved without a single problem, it shows in RegisterDate row in mysql, i have trouble just with showing it. Because when i do stats, i get "Register Date: " (blank)

This is how i save it when a player creates an account:

Code:

       
        new query[128];
        format(query, sizeof(query), "UPDATE `notyourbusiness` SET `RegisterDate` = '%s' WHERE `user` = '%s'", ReturnDate(), Player[playerid][Name]);
        mysql_tquery(g_SQL, query);


ReturnDate:

Code:

ReturnDate()
{
        static
            date[36];

        getdate(date[2], date[1], date[0]);
        gettime(date[3], date[4], date[5]);

        format(date, sizeof(date), "%02d/%02d/%d, %02d:%02d", date[0], date[1], date[2], date[3], date[4]);
        return date;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>