25.08.2012, 20:48
hmm for some reason no :/ im going to give you another stock thats connected to that one and maybe that will sort it out
pawn Код:
stock LoginPlayer(playerid,const password[])
{
new EscapedText[60], Query[200];
mysql_real_escape_string(password, EscapedText);
format(Query,sizeof(Query),"SELECT * FROM `users` WHERE `username` = '%s' AND `password` = '%s'",PlayerName(playerid),EscapedText);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0) {
SendClientMessage(playerid,COLOR_GREEN,"You have been logged in!");
LoadStats(playerid);
}
else {
SendClientMessage(playerid,COLOR_RED,"Wrong password!");
Kick(playerid);
}
mysql_free_result();
return 1;
}