KaLu17

[pawno.pl] -> #24804

Mar 18th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.66 KB | None | 0 0
  1. forward top_respekt();
  2. public top_respekt()
  3. {
  4.     new data[256], string[1000], i = 1, name_rep[MAX_PLAYER_NAME + 1], rep;
  5.     mysql_query("SELECT `nick`, `score` FROM `players` WHERE `score` > 0 ORDER BY `score` DESC LIMIT 5");
  6.     mysql_store_result();
  7.  
  8.     format(string, sizeof(string), "Top lista:");
  9.  
  10.     while(mysql_fetch_row(data, "|"))
  11.     {
  12.         sscanf(data, "p<|>s[24]d", name_rep, rep);
  13.         format(string, sizeof(string), "%s\n{A40000}%d. {008000}%s {FFFFFF}- {008000}%d {FFFFFF}respektu", string, i, name_rep, rep);
  14.         i++;
  15.     }
  16.     mysql_free_result();
  17.     if(strlen(string))
  18.     {
  19.         Create3DTextLabel(string, 0xFFFFFFFF, 2151.58, 1020.5, 10.39, 70.0, 0, 0);
  20.     }
  21.     return 1;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment