17.03.2013, 21:32
Why a loop, Jefff? It can be done with an easier way though.
pawn Код:
CMD:aka(playerid,params[])
{
new ID,DBResult:Result,Query[250];
if(sscanf(params,"u",ID)) return SendClientMessage(playerid,-1,"USAGE: /aka [playerid]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,-1,"ERROR: Player not connected.");
format(Query,sizeof(Query),"SELECT * FROM `Accounts` WHERE `IP` = '%s'",IP[ID]);
Result = db_query(DB,Query);
if(db_num_rows(Result) == 1)
{
db_get_field_assoc(Result,"Field_Name_Here",Query,/* LENGHT/VALUE_OF_FIELD_HERE */);
}
db_free_result(Result);
return 1;
}