14.08.2011, 15:22
Код:
[17:07:42] errorid: 2014 | error: Commands out of sync; you can't run this command now | resultid: -1 | extraid: -1 | callback: NULL | query: SELECT `aLevel` FROM `accs` WHERE `pName` = 'Unknown123'
pawn Код:
stock getPlayerAdminLevel(playerid)
{
new string[82], playername[24], PlayerAdminLevel[2];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "SELECT `aLevel` FROM `accs` WHERE `pName` = '%s'", playername);
mysql_query(string);
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_get_field("AdminLevel", PlayerAdminLevel);
}
mysql_free_result();
return strval(PlayerAdminLevel);
}