#include <amxmodx> #include <fakemeta> #include <engine> #include <cstrike> #define PLUGIN "Real Flashbang" #define VERSION "0.5" #define AUTHOR "v3x / VoivoD" new g_nMsgScreenFade new g_fbomfg[33] #define MINIMUM_FEARTIME 0.1 #define MAXIMUM_FEARTIME 3.0 public plugin_init() { register_plugin(PLUGIN,VERSION,AUTHOR) register_event("ScreenFade","FlashedEvent","be","4=255","5=255","6=255","7>199") g_nMsgScreenFade = get_user_msgid("ScreenFade") register_logevent("fbnew_round", 2, "1=Round_Start") // Cvars register_cvar("amx_fb_effect", "1") register_cvar("amx_fb_r", "2") register_cvar("amx_fb_g", "1") register_cvar("amx_fb_b", "1") } public plugin_precache() { precache_sound("marihuanaserwer/flashbang/flashbanged2.wav") precache_sound("marihuanaserwer/flashbang/jamuzaraz.wav") precache_sound("marihuanaserwer/flashbang/okurwa.wav") precache_sound("marihuanaserwer/flashbang/pomocy.wav") } public fbnew_round( id ) { client_cmd(id,"room_type 0") } public client_connect(id) { client_cmd(id,"room_type 0") //to be sure that the echo didnt survived after mapchange... } //...if the fault was this effect or predefined echo on the map(cs_siege,rats etc.) public FlashedEvent( id ) { if(get_cvar_num("amx_fb_effect")==1) { new iRed,iGreen,iBlue iRed = get_cvar_num("amx_fb_r") iGreen = get_cvar_num("amx_fb_g") iBlue = get_cvar_num("amx_fb_b") if ( !( iRed ) || !( iGreen ) || !( iBlue ) ) { iRed = 100 iGreen = 100 iBlue = 100 } message_begin( MSG_ONE,g_nMsgScreenFade,{0,0,0},id ) write_short( read_data( 1 ) ) // Duration write_short( read_data( 1 ) ) // Hold time write_short( read_data( 3 ) ) // Fade type write_byte ( iRed ) // Red write_byte ( iGreen ) // Green write_byte ( iBlue ) // Blue write_byte ( read_data( 0 ) ) // Alpha message_end() set_task(1.5,"omgivebeenflashbanged",id) //stunned this long then waking+heartbeat and breathe sounds set_task(5.0,"fb_effectsfade1",id) //fading set_task(6.0,"fb_effectsfade2",id) //of set_task(7.0,"fb_effectsfade3",id) //echo set_task(8.0,"fb_effectisstopped",id) client_cmd(id,"room_type 6;room_delay 0.3;room_lp 1;room_mod 5;room_feedback 0.85;room_size 0.9;room_left 0.5;room_refl 2") set_task(1.0,"fb_loudyeffectstop",id) client_cmd(id,"spk marihuanaserwer/flashbang/flashbanged2") //u hear the stunning sound return PLUGIN_HANDLED } return PLUGIN_HANDLED } public fb_loudyeffectstop( id ) //stop the LOUDY effect { client_cmd(id,"room_refl 0.92") } public fb_effectsfade1( id ) { if(is_user_alive(id)) { client_cmd(id,"room_delay 0.2") } else { set_task(0.1,"fb_effectisstopped",id) } } public fb_effectsfade2( id ) { if(is_user_alive(id)) { client_cmd(id,"room_delay 0.1") } else { set_task(0.1,"fb_effectisstopped",id) } } public fb_effectsfade3( id ) { if(is_user_alive(id)) { client_cmd(id,"room_delay 0.01") } else { set_task(0.1,"fb_effectisstopped",id) } } public fb_effectisstopped( id ) { client_cmd(id,"room_type 0") client_cmd(id,"room_size 0.09") //setting this to default is useless, but u may uncomment it // client_cmd(id,"room_mod 0") client_cmd(id,"room_lp 0") client_cmd(id,"room_left 0.01") } public omgivebeenflashbanged( id ) //you start waking { if((g_fbomfg[id]==0) || is_user_alive(id)) { g_fbomfg[id]=1 //hmm im stunned, i dont need more set_task(7.0,"flashstunn_unblocked",id) //the stunned player sounds are blocked new bitch[33] bitch[id] = (random_num(1,3)) if(bitch[id] == 1) { set_task(random_float(MINIMUM_FEARTIME, MAXIMUM_FEARTIME),"fb_fear1",id) } else if(bitch[id] == 2) { set_task(random_float(MINIMUM_FEARTIME, MAXIMUM_FEARTIME),"fb_fear2",id) } else if(bitch[id] == 3) { set_task(random_float(MINIMUM_FEARTIME, MAXIMUM_FEARTIME),"fb_fear3",id) } else { set_task(0.1,"fb_effectisstopped",id) } } //return FMRES_IGNORED } public flashstunn_unblocked( id ) { g_fbomfg[id]=0 //hey i want to be stunned again <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/smile.gif' class='bbc_emoticon' alt=':)' /> } public fb_fear1( id ) { emit_sound(id, CHAN_AUTO, "marihuanaserwer/flashbang/pomocy.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) } public fb_fear2( id ) { emit_sound(id, CHAN_AUTO, "marihuanaserwer/flashbang/okurwa.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) } public fb_fear3( id ) { emit_sound(id, CHAN_AUTO, "marihuanaserwer/flashbang/jamuzaraz.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) }
Poniewaz w logach pokazuje mi taki error.
L 07/22/2008 - 01:05:48: Start of error session. L 07/22/2008 - 01:05:48: Info (map "de_westwood") (file "addons/amxmodx/logs/error_20080722.log") L 07/22/2008 - 01:05:48: Invalid player id 32 L 07/22/2008 - 01:05:48: [AMXX] Run time error 10 (plugin "real_flashbang.amxx") (native "client_cmd") - debug not enabled! L 07/22/2008 - 01:05:48: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 07/22/2008 - 01:06:00: Invalid player id 32 L 07/22/2008 - 01:06:00: [AMXX] Run time error 10 (plugin "real_flashbang.amxx") (native "client_cmd") - debug not enabled! L 07/22/2008 - 01:06:00: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 07/22/2008 - 01:06:29: Invalid player id 32 L 07/22/2008 - 01:06:29: [AMXX] Run time error 10 (plugin "real_flashbang.amxx") (native "client_cmd") - debug not enabled! L 07/22/2008 - 01:06:29: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 07/22/2008 - 01:06:44: Invalid player id 32 L 07/22/2008 - 01:06:44: [AMXX] Run time error 10 (plugin "real_flashbang.amxx") (native "client_cmd") - debug not enabled! L 07/22/2008 - 01:06:44: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 07/22/2008 - 01:07:32: Invalid player id 32 L 07/22/2008 - 01:07:32: [AMXX] Run time error 10 (plugin "real_flashbang.amxx") (native "client_cmd") - debug not enabled! L 07/22/2008 - 01:07:32: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 07/22/2008 - 01:08:31: Invalid player id 32 L 07/22/2008 - 01:08:31: [AMXX] Run time error 10 (plugin "real_flashbang.amxx") (native "client_cmd") - debug not enabled! L 07/22/2008 - 01:08:31: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 07/22/2008 - 01:10:09: Invalid player id 32 L 07/22/2008 - 01:10:09: [AMXX] Run time error 10 (plugin "real_flashbang.amxx") (native "client_cmd") - debug not enabled! L 07/22/2008 - 01:10:09: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Bardzo bym prosil o poprawienie tego plugina jak by ktos wiedzial o co tu chodzi. Z gory dziekuje.