08.03.2012, 17:33
pawn Код:
format(query, sizeof(query), "SELECT `Number` FROM `accounts` WHERE `PlayerName` LIKE '%%%s%%'", player);
mysql_query(query);
mysql_store_result();
new rows = mysql_num_rows();
if(rows == 0)
{
SendClientMessage(playerid, COLOUR_GREY, "There was no numbers found with that name.");
}
else
{
new msnum = mysql_fetch_int();
format(string, sizeof(string), "%s - %d",player, msnum);
SendClientMessage(playerid, COLOUR_WHITE, string);
}
mysql_free_result();