dodostyle

#Teste TOP Torcida

Jun 21st, 2013
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. //Talvez de um pouco de lag... nas lops.
  2.  
  3. #define MAX_TORCIDA 20
  4. new OnTorcida[MAX_TORCIDA];
  5. stock GetOnTorcida()
  6. {
  7. for(new i = 1; i<MAX_TORCIDA; i++)
  8. {
  9. for(new o = 0; o<MAX_PLAYERS; o++)
  10. {
  11. if(PlayerInfo[o][pTorcida] == i)
  12. {
  13. OnTorcida[PlayerInfo[o][pTorcida]] ++;
  14. }
  15. }
  16. }
  17. }
  18. stock GetTOPTorcida(MAX_TORCIDA)
  19. {
  20. GetOnTorcida();
  21. new TempResultado;
  22. new TorcidaTOP;
  23. new temp[100];
  24. for(new t = 1; t<MAX_TORCIDA t++)
  25. {
  26. if(OnTorcida[t] >= TempResultado)
  27. {
  28. TorcidaTOP = t;
  29. }
  30. }
  31. format(temp, sizeof(temp), "%s com %d online's", GetTorcidaName(TorcidaTOP), OnTorcida[TorcidaTOP]);
  32. return temp;
  33. }
  34.  
  35. forward PegarTOPTorcida();
  36. public PegarTOPTorcida()
  37. {
  38. new string[128];
  39. format(string, sizeof(string), "TOP Torcida: A Torcida: %s", GetTOPTorcida(MAX_TORCIDA));
  40. SendClientMessageForAll(-1, string);
  41. return 0x01;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment