hlmod.hu
https://hlmod.hu/

Statisztika nullázó hang
https://hlmod.hu/viewtopic.php?f=10&t=26383
Oldal: 1 / 2

Szerző:  apple [ 2016.10.08. 22:49 ]
Hozzászólás témája:  Statisztika nullázó hang

Sziasztok!
Valaki bele írná a hogy játsszon le hangot? amikor be írja hogy /rs
Előre is köszi!


  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5.  
  6. #define adtime   600.0 //Default of 10 minuites
  7.  
  8. new pcvar_Advertise
  9. new pcvar_Display
  10.  
  11. public plugin_init()
  12. {
  13.     register_plugin("Reset Score", "1.0", "Silenttt")
  14.  
  15.  
  16.     register_clcmd("say /resetscore", "reset_score")
  17.     register_clcmd("say /rs", "reset_score")
  18.  
  19.  
  20.     pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
  21.     pcvar_Display = register_cvar("sv_rsdisplay", "0")
  22.  
  23.     if(get_cvar_num("sv_rsadvertise") == 1)
  24.     {
  25.         set_task(adtime, "advertise", _, _, _, "b")
  26.     }
  27. }
  28.  
  29. public reset_score(id)
  30. {
  31.     cs_set_user_deaths(id, 0)
  32.     set_user_frags(id, 0)
  33.     cs_set_user_deaths(id, 0)
  34.     set_user_frags(id, 0)
  35.  
  36.     if(get_pcvar_num(pcvar_Display) == 1)
  37.     {
  38.         new name[33]
  39.         get_user_name(id, name, 32)
  40.         client_print(0, print_chat, "%s nullazta a statjat.", name)
  41.     }
  42.     else
  43.     {
  44.         client_print(id, print_chat, "A statod sikeresen lenullazva!")
  45.     }
  46. }
  47.  
  48. public advertise()
  49. {
  50.     set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
  51.     show_hudmessage(0, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz")
  52. }
  53.  
  54. public client_putinserver(id)
  55. {
  56.     if(get_pcvar_num(pcvar_Advertise) == 1)
  57.     {
  58.         set_task(10.0, "connectmessage", id, _, _, "a", 1)
  59.     }
  60. }
  61.  
  62. public connectmessage(id)
  63. {
  64.     if(is_user_connected(id))
  65.     {
  66.         client_print(id, print_chat, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz (nem kell reconnectelned)")
  67.     }
  68. }

Szerző:  ReDSTAR [ 2016.10.08. 23:03 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5.  
  6. #define adtime   600.0 //Default of 10 minuites
  7.  
  8. new pcvar_Advertise
  9. new pcvar_Display
  10.  
  11. public plugin_init()
  12. {
  13.     register_plugin("Reset Score", "1.0", "Silenttt")
  14.  
  15.  
  16.     register_clcmd("say /resetscore", "reset_score")
  17.     register_clcmd("say /rs", "reset_score")
  18.  
  19.  
  20.     pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
  21.     pcvar_Display = register_cvar("sv_rsdisplay", "0")
  22.  
  23.     if(get_cvar_num("sv_rsadvertise") == 1)
  24.     {
  25.         set_task(adtime, "advertise", _, _, _, "b")
  26.     }
  27. }
  28.  
  29. public reset_score(id)
  30. {
  31.     cs_set_user_deaths(id, 0)
  32.     set_user_frags(id, 0)
  33.     cs_set_user_deaths(id, 0)
  34.     set_user_frags(id, 0)
  35.  
  36.     if(get_pcvar_num(pcvar_Display) == 1)
  37.     {
  38.         new name[33]
  39.         get_user_name(id, name, 32)
  40.         client_print(0, print_chat, "%s nullazta a statjat.", name)
  41.     }
  42.     else
  43.     {
  44.                 client_cmd(id, "spk buttons/blip1.wav")
  45.         client_print(id, print_chat, "A statod sikeresen lenullazva!")
  46.     }
  47. }
  48.  
  49. public advertise()
  50. {
  51.     set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
  52.     show_hudmessage(0, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz")
  53. }
  54.  
  55. public client_putinserver(id)
  56. {
  57.     if(get_pcvar_num(pcvar_Advertise) == 1)
  58.     {
  59.         set_task(10.0, "connectmessage", id, _, _, "a", 1)
  60.     }
  61. }
  62.  
  63. public connectmessage(id)
  64. {
  65.     if(is_user_connected(id))
  66.     {
  67.         client_print(id, print_chat, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz (nem kell reconnectelned)")
  68.     }
  69. }

Szerző:  mforce [ 2016.10.09. 09:35 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4.  
  5. public plugin_init() {
  6.     register_clcmd("say /rs", "reset")
  7.     register_clcmd("say /resetscore", "reset")
  8.     register_clcmd("say !resetscore", "reset")
  9.     register_clcmd("say !rs", "reset")
  10.     register_clcmd("say_team /rs", "reset")
  11.     register_clcmd("say_team /resetscore", "reset")
  12.     register_clcmd("say_team !resetscore", "reset")
  13.     register_clcmd("say_team !rs", "reset")
  14. }
  15.  
  16. public reset(id) {
  17.     if(is_user_connected(id)) {
  18.         client_cmd(id, "spk buttons/blip1.wav");
  19.         ChatColor(id, "^4[beszartam]^1 Sikeresen nulláztad a statisztikádat.");
  20.  
  21.         set_pev(id, pev_frags, 0.0);
  22.         set_pdata_int(id, 444, 0);
  23.        
  24.         static mScoreInfo; if(!mScoreInfo) mScoreInfo = get_user_msgid("ScoreInfo");
  25.         message_begin(MSG_ALL, mScoreInfo);
  26.         write_byte(id);
  27.         write_short(0);
  28.         write_short(0);
  29.         write_short(0);
  30.         write_short(0);
  31.         message_end();
  32.     }
  33.     return PLUGIN_HANDLED;
  34. }
  35.  
  36. stock ChatColor(const id, const szMessage[], any:...) {
  37.     static pnum, players[32], szMsg[190], IdMsg;
  38.     vformat(szMsg, charsmax(szMsg), szMessage, 3);
  39.  
  40.     if(!IdMsg) IdMsg = get_user_msgid("SayText");
  41.  
  42.     if(id) {
  43.         if(!is_user_connected(id)) return;
  44.         players[0] = id;
  45.         pnum = 1;
  46.     }
  47.     else get_players(players, pnum, "ch");
  48.  
  49.     for(new i; i < pnum; i++) {
  50.         message_begin(MSG_ONE, IdMsg, .player = players[i]);
  51.         write_byte(players[i]);
  52.         write_string(szMsg);
  53.         message_end();
  54.     }
  55. }

Szerző:  apple [ 2016.10.09. 17:04 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

Ment a gomb köszi, még annyi hogy az "spk buttons" az a mappa? mármint az sma ba?

Szerző:  theglorious [ 2016.10.09. 17:36 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

apple írta:
Ment a gomb köszi, még annyi hogy az "spk buttons" az a mappa? mármint az sma ba?

igen az az.

Szerző:  apple [ 2016.10.09. 17:39 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

hát nekem nem jó, nem töltötte le a zenét, és így nem is szól! :D
client_cmd(id, "misc/rs.wav");

Szerző:  mforce [ 2016.10.09. 18:12 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

  1. client_cmd(id, "spk misc/rs.wav");

Szerző:  apple [ 2016.10.09. 18:21 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

Így se jó

Szerző:  mforce [ 2016.10.09. 18:23 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

hát akkor nincs ott a hang

Szerző:  apple [ 2016.10.09. 18:25 ]
Hozzászólás témája:  Re: Statisztika nullázó hang

ns el - steam el próbáltam, .wav ra convertáltam a hangot sound on belül misc-be be raktam és sehol sámli :D

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