12.11.2015, 09:38
(
Последний раз редактировалось jlalt; 12.11.2015 в 10:16.
)
try this i did not test it but it should work i think 

PHP код:
CMD:reports(playerid,params[]) {
if(IsPlayerAdmin(playerid)) {
new Query[250];
mysql_format(mysql, Query, sizeof(Query),"SELECT * FROM `reports` LIMIT 10"); // read player account
mysql_tquery(mysql, Query, "Reports", "i", playerid); // to read if player account exist
} else return SendClientMessage(playerid,-1,"ERROR:You should be rcon to use this command");
return 1;
}
forward Reports1(playerid);
public Reports1(playerid) {
new rows, fields;
cache_get_data(rows, fields, mysql);
if(rows) {
new string[500];
new Name[MAX_PLAYER_NAME+1],Reason[128],Date[128];
cache_get_field_content(0, "Name", Name, mysql, sizeof(Name));
cache_get_field_content(0, "Reason", Reason, mysql, sizeof(Reason));
cache_get_field_content(0, "Date", Date, mysql, sizeof(Date));
format(string,sizeof string,"Name\tReason\tDate\n\%s\t%s\t%s",Name,Reason,Date);
ShowPlayerDialog(playerid, -1, DIALOG_STYLE_TABLIST_HEADERS, "Reports",string,"Exit", "");
}
}