30.12.2013, 19:38
Sorry for 3x post,but it's important!
Where shall I put that code?
Where shall I put that code?
pawn Код:
mysql_tquery(connectionHandle, "SELECT (SELECT COUNT(*) FROM `users`) AS `user_count`, (SELECT COUNT(*) FROM `bans`) AS `ban_count`", "mysql_GetServerStats", "");
public mysql_GetServerStats()
{
if(cache_get_row_count())
{
new users = cache_get_field_content_int(0, "user_count");
new bans = cache_get_field_content_int(0, "ban_count");
new td_string[64];
format(td_string, sizeof(td_string), "Registered users: %d~n~Bans: %d", user_count, ban_count);
TextDrawSetString(textdraw_id, td_string);
}
return 1;
}

