09.03.2013, 13:54
Hello, I was wondering how you would get the players registered time/date. I use MySQL! But I cannot figure a way out on how to get the players time registered? I hope you can help me!
Thanks
Thanks
UPDATE `something` SET `something` = NOW()
stock MySQL_Register(playerid, passwordstring[])
{
new query[200], pname[24], IP[16];
GetPlayerName(playerid, pname, 24);
GetPlayerIp(playerid, IP, 16);
format(query, sizeof(query), "INSERT INTO playerdata (user, password, Adminlevel, score, money, IP) VALUES('%s', SHA1('%s'), 0, 0, 0, '%s')", pname, passwordstring, IP);
mysql_query(query);
SendClientMessage(playerid, INFO, ">> You have sucesfully registered a new account!");
Logged[playerid] = 1;
return 1;
}
format(query, sizeof(query), "INSERT INTO playerdata (user, password, Adminlevel, score, money, IP, register_date) VALUES('%s', SHA1('%s'), 0, 0, 0, '%s', NOW())", pname, passwordstring, IP);