hlmod.hu
https://hlmod.hu/

Csatlakozó zene szerű plugint keresek.
https://hlmod.hu/viewtopic.php?f=9&t=26962
Oldal: 1 / 1

Szerző:  saxypro [ 2016.12.31. 20:11 ]
Hozzászólás témája:  Csatlakozó zene szerű plugint keresek.

Hello! Egy olyan plugint keresek, hogy amikor feljön egy admin hangot játszik le. DE! Minden megadott adminnál egy különálló, egyedi hangot, mindenkinek másikat. ELŐRE IS KÖSZÖNÖM A SEGÍTSÉGEKET! :)

Szerző:  regener [ 2017.01.03. 19:24 ]
Hozzászólás témája:  Re: Csatlakozó zene szerű plugint keresek.

  1. register_plugin("Join/Leave Message","1.2","BigBaller")

Elcsúszott a kezed.
https://forums.alliedmods.net/showthread.php?t=12016

Nem mellesleg ez se egy leány álom plugin.

Szerző:  The Peace [ 2017.01.03. 22:22 ]
Hozzászólás témája:  Re: Csatlakozó zene szerű plugint keresek.

Látom az author átírással nincs gond, csak a helyesírásal!



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

Szerző:  ultraibolya [ 2017.01.04. 14:21 ]
Hozzászólás témája:  Re: Csatlakozó zene szerű plugint keresek.

DE! Minden megadott adminnál egy különálló, egyedi hangot, mindenkinek másikat


Legalább azt,amit kér.

Teszt nem volt,nem 100%,ha esetleg hiba van,javítom.

  1. #include "amxmodx.inc"
  2. #define STEAMIDS 4
  3. new const STEAMID[][]={
  4.     "",
  5.     "STEAM_0:1",
  6.     "STEAM_0:2",
  7.     "STEAM_0:3"
  8. }
  9. #define HANGOKS 4
  10. new const HANGOK[][]={
  11.     "",
  12.     "misc/mappa/zene1.wav",
  13.     "misc/mappa/zene2.wav",
  14.     "misc/mappa/zene3.wav"
  15. }
  16. static auth[33]
  17. @client_putinserver(id){
  18.     get_user_authid(id,auth,charsmax(auth))
  19.     for(new i;i<STEAMIDS;i++) if(equali(STEAMID[i],auth)){
  20.         client_cmd(0,"spk %s",HANGOK[i])
  21.     }
  22. }
  23. @plugin_precache()
  24.     for(new a;a<HANGOKS;a++) precache_sound(HANGOK[a])

Szerző:  mforce [ 2017.01.04. 20:49 ]
Hozzászólás témája:  Re: Csatlakozó zene szerű plugint keresek.

https://github.com/mforce95/AMXX_plugins/tree/master/Unique%20Connect%20Sounds

Szerző:  saxypro [ 2017.01.05. 16:46 ]
Hozzászólás témája:  Re: Csatlakozó zene szerű plugint keresek.

Köszönöm szépen mindenkinek a hozzászólást, a héten kipróbálom őket! :)

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