20.03.2009, 21:29
Код:
format(query,256,"SELECT * FROM `users` WHERE `username`='%s' AND `password`='%s'",playername,phash);
samp_mysql_query(query);
samp_mysql_store_result();
new rows = samp_mysql_num_rows();
if(rows != 1) return SendClientMessage(playerid,COLOR_RED,"Invalid Login - Please try again.");
SendClientMessage(playerid,COLOR_LIME,"You have successfully logged in!");
new fieldvalue[128];
new field[128];
new line[1024];
samp_mysql_fetch_row(line);
samp_mysql_get_field("username", fieldvalue);
printf("%s ", fieldvalue);
samp_mysql_get_field("money", fieldvalue);
printf("%% ", fieldvalue);
there arent any compiling errors, but when i /login (this is the /login code), the server crashes.
Please help!

