hlmod.hu
https://hlmod.hu/

Kedő hang
https://hlmod.hu/viewtopic.php?f=29&t=18363
Oldal: 1 / 1

Szerző:  Be$t.# [ 2014.12.05. 18:37 ]
Hozzászólás témája:  Kedő hang

halii valaki le irná az smáját amikor bele lépek a szerora akkor egy hangot játszon le?

Szerző:  pixxa112 [ 2014.12.05. 19:44 ]
Hozzászólás témája:  Re: Kedö hang

Be$t.# írta:
halii valaki le irná az smáját amikor bele lépek a szerora akkor egy hangot játszon le?


Try:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #define Maxsounds 1
  3. new soundlist[Maxsounds][] = {"misc/rtpn"} //zene neve �s helye
  4.  
  5. new plugin_author[] = "White Panther" // k�szit�
  6. new plugin_version[] = "1.2.3" // verzi�
  7.  
  8. public plugin_init( )
  9. {
  10. register_plugin("Connect Sound", plugin_version, plugin_author)
  11. register_cvar("connectsound_version", plugin_version, FCVAR_SERVER)
  12. }
  13.  
  14. public plugin_precache( )
  15. {
  16. new temp[128], soundfile[128]
  17. for ( new a = 0; a < Maxsounds; a++ )
  18. {
  19. format(temp, 127, "sound/%s.wav", soundlist[a])
  20. if ( file_exists(temp) )
  21. {
  22. format(soundfile, 127, "%s.wav", soundlist[a])
  23. precache_sound(soundfile)
  24. }
  25. }
  26. }
  27.  
  28. public client_putinserver( id )
  29. {
  30. set_task(1.0, "consound", 100 + id)
  31. }
  32.  
  33. public consound( timerid_id )
  34. {
  35. new id = timerid_id - 100
  36. new Usertime
  37. Usertime = get_user_time(id, 0)
  38. if ( Usertime <= 0 )
  39. {
  40. set_task(1.0, "consound", timerid_id)
  41. }else
  42. {
  43. new i = random(Maxsounds)
  44. client_cmd(id, "spk ^"%s^"", soundlist[i])
  45. }
  46.  
  47. return PLUGIN_CONTINUE
  48. }


UI: A hangformátuma .wav legyen!

Szerző:  Be$t.# [ 2014.12.05. 19:47 ]
Hozzászólás témája:  Re: Kedö hang

pixxa112 írta:
Be$t.# írta:
halii valaki le irná az smáját amikor bele lépek a szerora akkor egy hangot játszon le?


Try:
SMA Forráskód: [ Mindet kijelol ]#include <amxmodx>
#define Maxsounds 1
new soundlist[Maxsounds][] = {"misc/rtpn"} //zene neve �s helye
 
new plugin_author[] = "White Panther" // k�szit�
new plugin_version[] = "1.2.3" // verzi�
 
public plugin_init( )
{
register_plugin("Connect Sound", plugin_version, plugin_author)
register_cvar("connectsound_version", plugin_version, FCVAR_SERVER)
}
 
public plugin_precache( )
{
new temp[128], soundfile[128]
for ( new a = 0; a < Maxsounds; a++ )
{
format(temp, 127, "sound/%s.wav", soundlist[a])
if ( file_exists(temp) )
{
format(soundfile, 127, "%s.wav", soundlist[a])
precache_sound(soundfile)
}
}
}
 
public client_putinserver( id )
{
set_task(1.0, "consound", 100 + id)
}
 
public consound( timerid_id )
{
new id = timerid_id - 100
new Usertime
Usertime = get_user_time(id, 0)
if ( Usertime <= 0 )
{
set_task(1.0, "consound", timerid_id)
}else
{
new i = random(Maxsounds)
client_cmd(id, "spk ^"%s^"", soundlist[i])
}
 
return PLUGIN_CONTINUE
}

UI: A hangformátuma .wav legyen!



THX

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