Quote:
Originally Posted by Jefff
pawn Код:
CMD:aka(playerid,params[]) { new ID,DBResult:Result,Query[70]; if(sscanf(params,"u",ID)) SendClientMessage(playerid,-1,"USAGE: /aka [playerid]"); else if(!IsPlayerConnected(ID)) SendClientMessage(playerid,-1,"ERROR: Player not connected."); else{ format(Query,sizeof(Query),"SELECT * FROM `Accounts` WHERE `IP` = '%s'",IP[ID]); Result = db_query(DB,Query); if(!db_num_rows(Result)) SendClientMessage(playerid,-1,"ERROR: Results not found."); else{ new Nick[MAX_PLAYER_NAME + 1];
do { db_get_field_assoc(Result, "Name", Nick, sizeof(Nick)); // replace 'Name' to your real column name with player nicknames SendClientMessage(playerid, -1, Nick); } while(db_next_row(Result)) } db_free_result(Result); } return 1; }
|
thanks mate. +repped (sorry i can't give rep yet). thanks to you too Dwayne. +repped.