26.06.2013, 15:16
As the topic says... This code tells the player it's wrong password. Wether it's wrong or right. And kicks them. Why?
pawn Код:
stock PlayerLogin(playerid, password)
{
new str[128];
format(str, sizeof(str),"SELECT * FROM users WHERE username = '%s' AND password = md5('%s')",pName(playerid),password);
mysql_query(str);
mysql_store_result();
if(!mysql_num_rows())
{
SendInfoMessage(playerid,"Wrong {a9c4e4}password{ffffff}! Kicked due to security reasons!");
Kick(playerid);
mysql_free_result();
return 1;
}
else
{
SendInfoMessage(playerid,"Successfully logged in. Welcome back!");
mysql_free_result();
return 1;
}
}