26.11.2014, 06:15
@basicllsw: You are doing it completely wrong.
pawn Код:
cmd:vhouse(pid,params[])
{
#pragma unused params
mysql_tquery(handle, "SELECT * FROM adminlog", "OnLoadAdminLog", "i", playerid);
return true;
}
forward OnLoadAdminLog(playerid);
public OnLoadAdminLog(playerid)
{
new d[32], a[32], p[32], r[32];
for(new i = 0; i != cache_get_row_count(); i++)
{
cache_get_field_content(i, "Date", d);
cache_get_field_content(i, "Admin", a);
cache_get_field_content(i, "Player", p);
cache_get_field_content(i, "Reason", r);
printf("Date: %s, Admin: %s, Player: %s, Reason: %s", d, a, p, r);
//sfm(playerid,-1,"Date: %s, Admin: %s, Player: %s, Reason: %s", d, a, p, r);
}
return true;
}