hlmod.hu
https://hlmod.hu/

Kör üzenet chatre
https://hlmod.hu/viewtopic.php?f=29&t=22770
Oldal: 1 / 1

Szerző:  PicantO [2015.11.27. 08:27 ]
Hozzászólás témája:  Kör üzenet chatre

Üdv. az alábbi plugint szeretném, ha valaki modosítaná úgy, hogy ne HUD üzenetbe, hanem a chatbe írja be minden kör elején, játékosszámmal együtt illetve színezhetőlegyen

"PREFIX Készülj fel a Csatára!^n%d. Forduló!. JATEKOSOK : XY "

plussz még szeretném, hogy hozzá tudjak adni 3darab általam kiválasztott WAW formátumú hangot

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. new const PLUGIN [] = "AMX Round Count"
  5. new const VERSION [] = "0.0.1"
  6. new const AUTHOR [] = "Duna"
  7.  
  8. new g_roundCount;
  9.  
  10. public plugin_init(){
  11. register_plugin(PLUGIN,VERSION,AUTHOR)
  12. register_event("RoundTime", "roundcount", "bc")
  13. register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
  14. return PLUGIN_CONTINUE
  15. }
  16.  
  17. public roundcount()
  18. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  19.  
  20. ++g_roundCount
  21.  
  22. new r = random(255)
  23. new g = random(255)
  24. new b = random(255)
  25.  
  26. set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
  27. show_hudmessage(0,"Készülj fel a Csatára!^n%d. Forduló!", g_roundCount)
  28.  
  29. }
  30.  
  31. public reset_counter(){
  32. g_roundCount = 0
  33. }

Szerző:  mforce [2015.11.27. 08:31 ]
Hozzászólás témája:  Re: Plugin átírás, hozzáadás

Témanév...
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "Plugin"
  4. #define VERSION "1.0"
  5. #define AUTHOR "mforce"
  6.  
  7. #define PREFIX "ProKillers"
  8.  
  9. new g_roundCount;
  10. new g_maxplayers;
  11.  
  12. public plugin_init(){
  13. register_plugin(PLUGIN,VERSION,AUTHOR)
  14. register_event("RoundTime", "roundcount", "bc")
  15. register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
  16. g_maxplayers = get_maxplayers();
  17. return PLUGIN_CONTINUE
  18. }
  19.  
  20. public roundcount()
  21. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  22.  
  23. ++g_roundCount
  24. new mp_maxrounds = get_cvar_pointer("mp_maxrounds")
  25. new maxrounds = get_pcvar_num(mp_maxrounds);
  26. new p_playernum;
  27. p_playernum = get_playersnum(1);
  28. ChatColor("^4[%s]^1 Kör:^3 %i^1/^3%i ^1Játékosok:^3 %i^1/^3%i", PREFIX, g_roundCount, maxrounds, p_playernum, g_maxplayers)
  29. }
  30.  
  31. public reset_counter() {
  32. g_roundCount = 0
  33. }
  34.  
  35. stock ChatColor(const szMessage[], any:...)
  36. {
  37. static pnum, players[32], szMsg[190], IdMsg;
  38. vformat(szMsg, charsmax(szMsg), szMessage, 2);
  39.  
  40. if(!IdMsg) IdMsg = get_user_msgid("SayText");
  41.  
  42. get_players(players, pnum, "ch");
  43.  
  44. for(new i; i < pnum; i++)
  45. {
  46. message_begin(MSG_ONE, IdMsg, .player = players[i]);
  47. write_byte(players[i]);
  48. write_string(szMsg);
  49. message_end();
  50. }
  51. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/