pawn Код:
stock LoadPlayer(playerid)
{
new tmp[200];
format(tmp, sizeof(tmp), "SELECT * FROM players WHERE username = '%s'", p_data[playerid][name]);
mysql_query(tmp);
mysql_store_result();
if(mysql_num_rows() == 0) return printf("Failed to load data for %s he isn't registered!", p_data[playerid][name]);
while(mysql_fetch_row_format(tmp,"|"))
{
sscanf(tmp, "p<|>i{s[24]s[24]s[24]}i",
p_data[playerid][SQLID],
p_data[playerid][admin]);
}
return printf("Player %s loaded, values admin = %d | kills = %d", p_data[playerid][name] ,p_data[playerid][admin]);
}