hlmod.hu
https://hlmod.hu/

Üdvözlő üzenet .mp3 formátumba.
https://hlmod.hu/viewtopic.php?f=9&t=21100
Oldal: 1 / 1

Szerző:  DecToR [ 2015.06.20. 20:27 ]
Hozzászólás témája:  Üdvözlő üzenet .mp3 formátumba.

Hali! kérnék egy olyan plugint ami amikor belépsz a szerverre akkor lejátszik egy .mp3 kiterjesztésű hangot. előre is köszi :)

Szerző:  JoZsi [ 2015.06.26. 09:04 ]
Hozzászólás témája:  Re: Üdvözlő üzenet .mp3 formátumba.

DecToR írta:
Hali! kérnék egy olyan plugint ami amikor belépsz a szerverre akkor lejátszik egy .mp3 kiterjesztésű hangot. előre is köszi :)


Tessék:
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include <amxmodx>
  3.  
  4. // change this number to the amount of sounds u have
  5. #define Maxsounds 1
  6.  
  7. // add here your sounds, sounds must be somewhere in <ModDir>/sounds
  8. // format must be like: {"misc/sound1","ambience/sound2"}
  9. new soundlist[Maxsounds][] = {"misc/welcome_sound"}
  10.  
  11. new plugin_author[] = "S.p.0_o.N"
  12. new plugin_version[] = "1.2.3"
  13.  
  14. public plugin_init(){
  15. register_plugin("Join_Music",plugin_version,plugin_author)
  16. register_cvar("join_music_version",plugin_version,FCVAR_SERVER)
  17. }
  18.  
  19. public plugin_precache(){
  20. for ( new a = 0; a < Maxsounds; a++ ){
  21. new temp[128]
  22. format(temp,127,"sound/%s.mp3", soundlist[a])
  23. if ( file_exists(temp) ){
  24. new soundfile[128]
  25. format(soundfile,127,"%s.mp3", soundlist[a])
  26. precache_sound( soundfile )
  27. }
  28. }
  29. }
  30.  
  31. public client_putinserver(id){
  32. set_task(1.0,"consound",100+id)
  33. }
  34.  
  35. public consound(timerid_id){
  36. new id = timerid_id - 100
  37. new Usertime
  38. Usertime = get_user_time(id, 0)
  39. if ( Usertime <= 0 ){
  40. set_task(1.0,"consound",timerid_id)
  41. }else{
  42. new i = random(Maxsounds)
  43. client_cmd(id,"spk ^"%s^"",soundlist[i])
  44. }
  45.  
  46. return PLUGIN_CONTINUE
  47. }

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