03.05.2010, 06:15
Quote:
Originally Posted by ̘ᴄᴛȧᴄ̙
Better to use sscanf 2.0
|
pawn Код:
public OnPlayerLogin(playerid,password[])
{
mysql_real_escape_string(password,password);
mysql_query("SELECT * FROM players WHERE id=%d AND password='%s' LIMIT 1");
mysql_store_result();
if(mysql_retrieve_row())
{
new result[128];
mysql_fetch_field_row(result,"level"); PlayerInfo[playerid][pLevel] = strval(result);
mysql_fetch_field_row(result,"admin"); PlayerInfo[playerid][pAdmin] = strval(result);
//etc
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Wrong password.");
}
mysql_free_result();
return 1;
}