hlmod.hu
https://hlmod.hu/

csatllakoző üzenet
https://hlmod.hu/viewtopic.php?f=29&t=22412
Oldal: 1 / 2

Szerző:  X.T Pistaba'csi [ 2015.10.17. 15:24 ]
Hozzászólás témája:  csatllakoző üzenet

sziasztok nekem egy ilyan pluginra lenne szükségem hogy csatlakozáskor lejátszik egy hangot
pl Köszöntünk téged

Szerző:  kengurumancs [ 2015.10.17. 15:30 ]
Hozzászólás témája:  Re: csatllakoző üzenet

Hali!
valami ilyesmire gondolsz?
viewtopic.php?f=95&t=10966&hilit=csatlakoz%C3%B3+%C3%BCzenetet

Szerző:  mforce [ 2015.10.17. 15:31 ]
Hozzászólás témája:  Re: csatllakoző üzenet

Nem, mert az eventscript. Amúgy ha a hangot megszerzed és feltöltöd, akkor csinálok egy szimpla plugint chat vagy hud meg ,hogy hang legyen-e állítható.

Szerző:  X.T Pistaba'csi [ 2015.10.17. 15:34 ]
Hozzászólás témája:  Re: csatllakoző üzenet

mforce írta:
Nem, mert az eventscript. Amúgy ha a hangot megszerzed és feltöltöd, akkor csinálok egy szimpla plugint chat vagy hud meg ,hogy hang legyen-e állítható.



hang az megvan

Szerző:  mforce [ 2015.10.17. 15:35 ]
Hozzászólás témája:  Re: csatllakoző üzenet

mforce írta:
Amúgy ha a hangot megszerzed és feltöltöd, akkor

Szerző:  X.T Pistaba'csi [ 2015.10.17. 15:44 ]
Hozzászólás témája:  Re: csatllakoző üzenet

mforce írta:
mforce írta:
Amúgy ha a hangot megszerzed és feltöltöd, akkor
[/quo

Csatolmányok:
hibabe.rar [15.91 KiB]
Letöltve 70 alkalommal.

Szerző:  mforce [ 2015.10.17. 15:46 ]
Hozzászólás témája:  Re: csatllakoző üzenet

Rittik nem azt töltötted fel, amit fenn írtál :D

Szerző:  X.T Pistaba'csi [ 2015.10.17. 15:48 ]
Hozzászólás témája:  Re: csatllakoző üzenet

mforce írta:
Rittik nem azt töltötted fel, amit fenn írtál :D



nem találtam

Szerző:  SmaCk [ 2015.10.17. 15:56 ]
Hozzászólás témája:  Re: csatllakoző üzenet

SMA Forráskód: [ Mindet kijelol ]
  1. /*
  2. * Plays a welcome sound to the player who connects
  3. * by S.p.0_o.N
  4. *
  5. * v1.0
  6. *
  7. * v1.1:
  8. * - addition to add easily own sounds
  9. *
  10. * v1.2.1:
  11. * - bug with not playing sounds to client fixed
  12. * - added file exist check for soundfile
  13. *
  14. * v1.2.3:
  15. * - changes:
  16. * - way of giving id to timer
  17. */
  18.  
  19. #include <amxmodx>
  20.  
  21. // change this number to the amount of sounds u have
  22. #define Maxsounds 1
  23.  
  24. // add here your sounds, sounds must be somewhere in <ModDir>/sounds
  25. // format must be like: {"misc/sound1","ambience/sound2"}
  26. new soundlist[Maxsounds][] = {"misc/welcome-by-Sp0oN"}
  27.  
  28. new plugin_author[] = "S.p.0_o.N"
  29. new plugin_version[] = "1.2.3"
  30.  
  31. public plugin_init(){
  32. register_plugin("Join_Music",plugin_version,plugin_author)
  33. register_cvar("join_music_version",plugin_version,FCVAR_SERVER)
  34. }
  35.  
  36. public plugin_precache(){
  37. for ( new a = 0; a < Maxsounds; a++ ){
  38. new temp[128]
  39. format(temp,127,"sound/%s.wav", soundlist[a])
  40. if ( file_exists(temp) ){
  41. new soundfile[128]
  42. format(soundfile,127,"%s.wav", soundlist[a])
  43. precache_sound( soundfile )
  44. }
  45. }
  46. }
  47.  
  48. public client_putinserver(id){
  49. set_task(1.0,"consound",100+id)
  50. }
  51.  
  52. public consound(timerid_id){
  53. new id = timerid_id - 100
  54. new Usertime
  55. Usertime = get_user_time(id, 0)
  56. if ( Usertime <= 0 ){
  57. set_task(1.0,"consound",timerid_id)
  58. }else{
  59. new i = random(Maxsounds)
  60. client_cmd(id,"spk ^"%s^"",soundlist[i])
  61. }
  62.  
  63. return PLUGIN_CONTINUE
  64. }

Szerző:  mforce [ 2015.10.17. 15:58 ]
Hozzászólás témája:  Re: csatllakoző üzenet

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "Simply Connect Messages"
  4. #define VERSION "1.0"
  5. #define AUTHOR "mforce"
  6.  
  7. #define PREFIX "ProKillers"
  8.  
  9. // Ha szeretnéd chat helyett HUD-ra iratni a szöveget, akkor vedd ki a //-t a # elől.
  10. //#define HUD
  11.  
  12. // Ha hangot is szeretnél lejátszani, akkor vedd ki a //-t a # elől.
  13. //#define SOUND
  14.  
  15. public plugin_init() {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17. }
  18.  
  19. #if defined SOUND
  20. public plugin_precache(id) {
  21. precache_sound("csatlakozo/hello.wav")
  22. }
  23. #endif
  24.  
  25. public client_putinserver(id) {
  26. if(!is_user_bot(id)) {
  27. static name[32];
  28. get_user_name(id, name, charsmax(name))
  29. #if defined HUD
  30. set_hudmessage(0, 255, 0, -1.0, 0.17, 1, 6.0, 3.0)
  31. show_hudmessage(0, "%s csatlakozott a szerverre.", name)
  32. #else
  33. print_color(0, "!g[%s]!t %s !ycsatlakozott a szerverre.", PREFIX, name)
  34. #endif
  35. #if defined SOUND
  36. client_cmd(id, "spk csatlakozo/hello.wav")
  37. #endif
  38. }
  39. }
  40.  
  41. public client_disconnect(id) {
  42. if(!is_user_bot(id)) {
  43. static name[32];
  44. get_user_name(id, name, charsmax(name))
  45. #if defined HUD
  46. set_hudmessage(0, 0, 255, -1.0, 0.17, 1, 6.0, 3.0)
  47. show_hudmessage(0, "%s lelépett a szerverről.", name)
  48. #else
  49. print_color(0, "!g[%s]!t %s !ylelépett a szerverről.", PREFIX, name)
  50. #endif
  51. }
  52. }
  53.  
  54. stock print_color(const id, const input[], any:...) {
  55. new count = 1, players[32]
  56. static msg[191]
  57. vformat(msg, 190, input, 3)
  58.  
  59. replace_all(msg, 190, "!g", "^4")
  60. replace_all(msg, 190, "!y", "^1")
  61. replace_all(msg, 190, "!t", "^3")
  62.  
  63. if (id) players[0] = id; else get_players(players, count, "ch")
  64. {
  65. for (new i = 0; i < count; i++)
  66. {
  67. if (is_user_connected(players[i]))
  68. {
  69. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  70. write_byte(players[i])
  71. write_string(msg)
  72. message_end()
  73. }
  74. }
  75. }
  76. return PLUGIN_HANDLED
  77. }
  78.  

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