Advertisement
mrdrifter

Untitled

Mar 19th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. OnGameModeInit:
  2. {
  3.  
  4. LabelInfo[LebelCount][llabel] = CreateDynamic3DTextLabel("Tu na razie jest ściernisko!\nAle będzie san Francisco:D", -1, posX, posY, posZ + 1.5, 20.0);
  5. UpdateLabels();
  6.  
  7.  
  8. }
  9.  
  10. funkcja
  11.  
  12. stock UpdateLabels()
  13. {
  14. new str[1024],Query[512], user[32], value, Float:value2, id=1, show[64];
  15.  
  16. for(new i;i<LebelCount;i++)
  17. {//przerób sobie zapytanie
  18. m_query("select nick,%s from "prefix"_players order by %s %s limit 10", topInfo[LabelInfo[i][lcat]][LabelInfo[i][ltype]][esql], topInfo[LabelInfo[i][lcat]][LabelInfo[i][ltype]][esql], LabelInfo[i][lsql]);
  19. mysql_store_result();
  20. format(str,sizeof str,"%s\n", topInfo[LabelInfo[i][lcat]][LabelInfo[i][ltype]][ename]);
  21. while(mysql_fetch_row(Query))
  22. {
  23. if(LabelInfo[i][lisFloat])
  24. {
  25. sscanf(Query,"p<|>s[32]f", user, value2);
  26. format(show, sizeof(show), "%.2f", value2);
  27. }
  28. else
  29. {
  30. sscanf(Query,"p<|>s[32]d", user, value);
  31. format(show, sizeof(show), "%d", value);
  32. }
  33.  
  34. if(!strcmp(show, "0", true)) show = "--";
  35. format(str,sizeof(str),"%s%d{FFFFFF}. %24s %64s\n",str, id++, user, show);
  36. }
  37. format(str,sizeof(str),"%s{EAB171}Aktualizacja co godzinę!",str);
  38. UpdateDynamic3DTextLabelText(LabelInfo[i][llabel], -1, str);
  39.  
  40. id=1;
  41. str[0] = EOS;
  42. user[0] = EOS;
  43. show[0] = EOS;
  44. Query[0] = EOS;
  45. }
  46. printf("labels updates");
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement