hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.28. 17:46



Jelenlévő felhasználók

Jelenleg 267 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 265 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Google [Bot], MateaBoss az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 2 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: roundbest
HozzászólásElküldve: 2014.02.11. 17:26 
Offline
Senior Tag
Avatar

Csatlakozott: 2014.01.20. 13:00
Hozzászólások: 216
Megköszönt másnak: 89 alkalommal
Megköszönték neki: 14 alkalommal
Sziasztok!

Tudjatok van az a plugin ami chatben írja a kor legjobb jatekosat. hany fejes stb...
Na most nekem az a plugin kéne, csak az a verziója amibe nincs ékezet!

Valaki tudna linkelni?
;)

_________________
Kép
Kép
https://soundcloud.com/l-c-a-w


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: roundbest
HozzászólásElküldve: 2014.02.11. 17:43 
Offline
Senior Tag
Avatar

Csatlakozott: 2013.12.06. 18:38
Hozzászólások: 229
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 16 alkalommal
Szia, meg írtam! :)
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5. enum Color
  6. {
  7. NORMAL = 1, // clients scr_concolor cvar color
  8. GREEN, // Green Color
  9. TEAM_COLOR, // Red, grey, blue
  10. GREY, // grey
  11. RED, // Red
  12. BLUE, // Blue
  13. }
  14.  
  15. new TeamName[][] =
  16. {
  17. "",
  18. "TERRORIST",
  19. "CT",
  20. "SPECTATOR"
  21. }
  22.  
  23. ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
  24. {
  25. static message[256];
  26.  
  27. switch(type)
  28. {
  29. case NORMAL: // clients scr_concolor cvar color
  30. {
  31. message[0] = 0x01;
  32. }
  33. case GREEN: // Green
  34. {
  35. message[0] = 0x04;
  36. }
  37. default: // White, Red, Blue
  38. {
  39. message[0] = 0x03;
  40. }
  41. }
  42.  
  43. vformat(message[1], 251, msg, 4);
  44. message[192] = '^0';
  45.  
  46. static team, ColorChange, index, MSG_Type;
  47.  
  48. if(id)
  49. {
  50. MSG_Type = MSG_ONE;
  51. index = id;
  52. } else {
  53. index = FindPlayer();
  54. MSG_Type = MSG_ALL;
  55. }
  56.  
  57. team = get_user_team(index);
  58. ColorChange = ColorSelection(index, MSG_Type, type);
  59.  
  60. ShowColorMessage(index, MSG_Type, message);
  61.  
  62. if(ColorChange)
  63. {
  64. Team_Info(index, MSG_Type, TeamName[team]);
  65. }
  66. }
  67.  
  68. ShowColorMessage(id, type, message[])
  69. {
  70. message_begin(type, get_user_msgid("SayText"), _, id);
  71. write_byte(id)
  72. write_string(message);
  73. message_end();
  74. }
  75.  
  76. Team_Info(id, type, team[])
  77. {
  78. message_begin(type, get_user_msgid("TeamInfo"), _, id);
  79. write_byte(id);
  80. write_string(team);
  81. message_end();
  82.  
  83. return 1;
  84. }
  85.  
  86. ColorSelection(index, type, Color:Type)
  87. {
  88. switch(Type)
  89. {
  90. case RED:
  91. {
  92. return Team_Info(index, type, TeamName[1]);
  93. }
  94. case BLUE:
  95. {
  96. return Team_Info(index, type, TeamName[2]);
  97. }
  98. case GREY:
  99. {
  100. return Team_Info(index, type, TeamName[0]);
  101. }
  102. }
  103.  
  104. return 0;
  105. }
  106.  
  107. FindPlayer()
  108. {
  109. static i;
  110. i = -1;
  111.  
  112. while(i <= get_maxplayers())
  113. {
  114. if(is_user_connected(++i))
  115. {
  116. return i;
  117. }
  118. }
  119.  
  120. return -1;
  121. }
  122.  
  123.  
  124. #define PLUGIN "New Plugin"
  125. #define AUTHOR "Unknown"
  126. #define VERSION "1.0"
  127.  
  128. new g_iKills[32], g_iHS[32], g_iDmg[32]
  129.  
  130. public plugin_init()
  131. {
  132. register_plugin(PLUGIN, VERSION, AUTHOR)
  133.  
  134. RegisterHam(Ham_TakeDamage, "player", "hamTakeDamage")
  135. register_event("DeathMsg", "EventDeathMsg", "a")
  136. register_logevent("RoundEnd", 2, "1=Round_End")
  137. }
  138. public client_disconnect(id)
  139. {
  140. g_iDmg[id] = 0;
  141. g_iKills[id] = 0;
  142. g_iHS[id] = 0;
  143. }
  144. public hamTakeDamage(victim, inflictor, attacker, Float:damage, DamageBits)
  145. {
  146. if( 1 <= attacker <= 32)
  147. {
  148. if(cs_get_user_team(victim) != cs_get_user_team(attacker))
  149. g_iDmg[attacker] += floatround(damage)
  150. else
  151. g_iDmg[attacker] -= floatround(damage)
  152. }
  153. }
  154. public EventDeathMsg()
  155. {
  156. new killer = read_data(1)
  157. new victim = read_data(2)
  158. new is_hs = read_data(3)
  159.  
  160. if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim))
  161. {
  162. g_iKills[killer]++;
  163.  
  164. if(is_hs)
  165. g_iHS[killer]++;
  166. }
  167. else
  168. g_iKills[killer]--;
  169. }
  170. public RoundEnd()
  171. {
  172. new iBestPlayer = get_best_player()
  173.  
  174. new szName[32]
  175. get_user_name(iBestPlayer, szName, charsmax(szName))
  176.  
  177. ColorChat(0, NORMAL, "*^x03 A legjobb jatekos ebben a korben,^x04 %s^x03 volt!", szName)
  178. ColorChat(0, NORMAL, "*^x03 Megolt^x04 %i^x03 jatekost, ebbol^x04 %i^x03 fejessel!", g_iKills[iBestPlayer], g_iHS[iBestPlayer])
  179.  
  180. for(new i; i < 31; i++)
  181. {
  182. g_iDmg[i] = 0;
  183. g_iHS[i] = 0;
  184. g_iKills[i] = 0;
  185. }
  186. }
  187. get_best_player()
  188. {
  189. new players[32], num;
  190. get_players(players, num);
  191. SortCustom1D(players, num, "sort_bestplayer")
  192.  
  193. return players[0]
  194. }
  195. public sort_bestplayer(id1, id2)
  196. {
  197. if(g_iKills[id1] > g_iKills[id2])
  198. return -1;
  199. else if(g_iKills[id1] < g_iKills[id2])
  200. return 1;
  201. else
  202. {
  203. if(g_iDmg[id1] > g_iDmg[id2])
  204. return -1;
  205. else if(g_iDmg[id1] < g_iDmg[id2])
  206. return 1;
  207. else
  208. return 0;
  209. }
  210.  
  211. return 0;
  212. }
  213.  

Ők köszönték meg hallywood nek ezt a hozzászólást: bencike (2014.02.11. 17:52)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 2 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 15 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole