ja siedze w pawnie, pisanie pluginow pod amxmodx np. prosty endroundsound
- Kod: Zaznacz wszystko
#include <amxmodx>
#define PLUGIN "ers"
#define VERSION "1.0"
#define AUTHOR "darkman"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("SendAudio", "terro_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "cterro_win", "a", "2&%!MRAD_ctwin")
}
public terro_win() {
new rand = random_num( 0,4 )
client_cmd( 0, "stopsound")
client_cmd( 0, "mp3 stop")
switch(rand)
{
case 0 : client_cmd( 0, "mp3 play misc/twin")
case 1 : client_cmd( 0, "mp3 play misc/twin2")
case 2 : client_cmd( 0, "mp3 play misc/twin3")
case 3 : client_cmd( 0, "mp3 play misc/twin4")
case 4 : client_cmd( 0, "mp3 play misc/twin5")
}
return PLUGIN_HANDLED
}
public cterro_win() {
new rand = random_num( 0,4 )
client_cmd( 0, "stopsound")
client_cmd( 0, "mp3 stop")
switch(rand)
{
case 0 : client_cmd( 0, "mp3 play misc/ctwin")
case 1 : client_cmd( 0, "mp3 play misc/ctwin2")
case 2 : client_cmd( 0, "mp3 play misc/ctwin3")
case 3 : client_cmd( 0, "mp3 play misc/ctwin4")
case 4 : client_cmd( 0, "mp3 play misc/ctwin5")
}
return PLUGIN_HANDLED
}
public plugin_precache() {
precache_generic("misc/twin.mp3")
precache_generic("misc/twin2.mp3")
precache_generic("misc/twin3.mp3")
precache_generic("misc/twin4.mp3")
precache_generic("misc/twin5.mp3")
precache_generic("misc/ctwin.mp3")
precache_generic("misc/ctwin2.mp3")
precache_generic("misc/ctwin3.mp3")
precache_generic("misc/ctwin4.mp3")
precache_generic("misc/ctwin5.mp3")
}