Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. bool BuildHUDandScoreboard(int index)
  2. {
  3. if(!entArray[index][ent_hud])
  4. return false;
  5.  
  6. char szGameText[128];
  7. //strcopy(szClantag, 32, g_EntArray[index][ent_short]);
  8. int client = entArray[index][ent_ownerid];
  9. if(client == -1) {
  10. return false;
  11. }
  12. if(IsClientInGame(client) && IsPlayerAlive(client))
  13. {
  14. switch(entArray[index][ent_mode])
  15. {
  16. case 1:
  17. {
  18. FormatEx(szGameText, 128, "%s[+]: %N", entArray[index][ent_shortname], entArray[index][ent_ownerid]);
  19. }
  20. case 2:
  21. {
  22. if(entArray[index][ent_cooldowntime] <= 0) {
  23. FormatEx(szGameText, 128, "%s[R]: %N", entArray[index][ent_shortname], entArray[index][ent_ownerid]);
  24. }else {
  25. FormatEx(szGameText, 128, "%s[%d]: %N", entArray[index][ent_shortname], entArray[index][ent_cooldowntime], entArray[index][ent_ownerid]);
  26. }
  27. }
  28. case 3:
  29. {
  30. if (entArray[index][ent_uses] < entArray[index][ent_maxuses]) {
  31. FormatEx(szGameText, 128, "%s[%d/%d]: %N", entArray[index][ent_shortname], entArray[index][ent_uses], entArray[index][ent_maxuses], entArray[index][ent_ownerid]);
  32. }else {
  33. FormatEx(szGameText, 128, "%s[D]: %N", entArray[index][ent_shortname], entArray[index][ent_ownerid]);
  34. }
  35. }
  36. case 4:
  37. {
  38. if(entArray[index][ent_cooldowntime] <= 0)
  39. {
  40. if(entArray[index][ent_maxuses] > entArray[index][ent_uses]) {
  41. FormatEx(szGameText, 128, "%s[%d/%d]: %N", entArray[index][ent_shortname], entArray[index][ent_uses], entArray[index][ent_maxuses], entArray[index][ent_ownerid]);
  42. }else {
  43. FormatEx(szGameText, 128, "%s[D]: %N", entArray[index][ent_shortname], entArray[index][ent_ownerid]);
  44. }
  45. }
  46. else {
  47. FormatEx(szGameText, 128, "%s[R]: %N", entArray[index][ent_shortname], entArray[index][ent_ownerid]);
  48. FormatEx(szGameText, 128, "%s[%d]: %N", entArray[index][ent_shortname], entArray[index][ent_cooldowntime], entArray[index][ent_ownerid]);
  49. }
  50. }
  51. case 5:
  52. {
  53. if(entArray[index][ent_cooldowntime] <= 0) {
  54. FormatEx(szGameText, 128, "%s[R]: %N", entArray[index][ent_shortname], entArray[index][ent_ownerid]);
  55. }else {
  56. FormatEx(szGameText, 128, "%s[%d]: %N", entArray[index][ent_shortname], entArray[index][ent_cooldowntime], entArray[index][ent_ownerid]);
  57. }
  58. }
  59. default: {
  60. FormatEx(szGameText, 128, "%s[R]: %N", entArray[index][ent_shortname], entArray[index][ent_ownerid]);
  61. }
  62. }
  63. // if(entArray[index][ent_team] == 0) {
  64. // Format(g_szGlobalHud[0], 2048, "%s\n%s", g_szGlobalHud[0], szGameText);
  65. // Format(g_szGlobalHud[1], 2048, "%s\n%s", g_szGlobalHud[1], szGameText);
  66. // }else {
  67. // Format(g_szGlobalHud[entArray[index][ent_team] - 2], 2048, "%s\n%s", g_szGlobalHud[entArray[index][ent_team] - 2], szGameText);
  68. // }
  69.  
  70. int team = GetClientTeam(client);
  71. if(team == CS_TEAM_CT) {
  72. Format(g_szGlobalHud[HUMANS], sizeof(g_szGlobalHud[]), "%s\n%s", g_szGlobalHud[HUMANS], szGameText);
  73. }else if(team == CS_TEAM_T) {
  74. Format(g_szGlobalHud[ZOMBIE], sizeof(g_szGlobalHud[]), "%s\n%s", g_szGlobalHud[ZOMBIE], szGameText);
  75. }
  76.  
  77. return true;
  78. }
  79. return false;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement