NuamNume Posted May 19, 2020 Report Share Posted May 19, 2020 Nu stiu ce are... Baza de date: ID Name Password Email RegisterDate LastLogin 4 R4uL parola123 none 0000-00-00 0000-00-00 ce are fratilor? cod: gQuery[0] = (EOS); mysql_format(SQL, gQuery, sizeof gQuery, "INSERT INTO `users` (Name, Password, RegisterDate, LastLogin) VALUES ('%e', '%e', '%e', '%e')", GetPlayerNameEx(playerid), inputtext, GetDateTime()); mysql_pquery(SQL, gQuery, "", ""); // se salveaza (cred) la register am si functia asta: stock GetDateTime() { new string[64], hour, minute, second, year, month, day; gettime(hour, minute, second); getdate(year, month, day); format(string, sizeof string, "%02d:%02d:%02d - %02d/%02d/%0d", hour, minute, second, day, month, year); SendClientMessageToAll(-1, string); return string; } Quote Link to comment Share on other sites More sharing options...
0 BaFFyJunior Posted May 19, 2020 Report Share Posted May 19, 2020 stock GetDateTime() { new zStr[ 30 ], liDate[ 6 ]; getdate( liDate[ 0 ], liDate[ 1 ], liDate[ 2 ] ); gettime( liDate[ 3 ], liDate[ 4 ], liDate[ 5 ] ); format( zStr, 30, "%02d:%02d %02d/%02d/%d", liDate[ 3 ], liDate[ 4 ], liDate[ 2 ], liDate[ 1 ], liDate[ 0 ] ); return zStr; } mysql_format(SQL, gQuery, sizeof gQuery, "INSERT INTO `users` (Name, Password, RegisterDate, LastLogin) VALUES ('%e', '%e', '%e', '%e')", GetPlayerNameEx(playerid), inputtext, GetDateTime(), GetDateTime()); Quote Link to comment Share on other sites More sharing options...
Question
NuamNume
Nu stiu ce are...
Baza de date:
ce are fratilor? cod:
gQuery[0] = (EOS);
mysql_format(SQL, gQuery, sizeof gQuery, "INSERT INTO `users` (Name, Password, RegisterDate, LastLogin) VALUES ('%e', '%e', '%e', '%e')", GetPlayerNameEx(playerid), inputtext, GetDateTime());
mysql_pquery(SQL, gQuery, "", ""); // se salveaza (cred) la register
am si functia asta: stock GetDateTime()
{
new string[64], hour, minute, second, year, month, day;
gettime(hour, minute, second);
getdate(year, month, day);
format(string, sizeof string, "%02d:%02d:%02d - %02d/%02d/%0d", hour, minute, second, day, month, year);
SendClientMessageToAll(-1, string);
return string;
}
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.