Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <codmod>
- #define PLUGIN "Child Of Light"
- #define VERSION "1.0"
- #define AUTHOR "MasamuneDate"
- new bool:ma_klase[33];
- new const nazwa[] = "Child Of Light";
- new const opis[] = "1/10 chance to blinding the enemy";
- new const bronie = 1<<CSW_P90| 1<<CSW_USP ;
- new const zdrowie = 30;
- new const kondycja = 0;
- new const inteligencja = 0;
- new const wytrzymalosc = 15;
- new g_msg_screenfade;
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- register_event("Damage", "Damage", "b", "2!=0");
- cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
- g_msg_screenfade = get_user_msgid("ScreenFade");
- }
- public cod_class_enabled(id)
- {
- ma_klase[id] = true;
- }
- public cod_class_disabled(id)
- {
- ma_klase[id] = false;
- }
- public Damage(id)
- {
- new attacker = get_user_attacker(id);
- if(!is_user_alive(attacker) || !is_user_connected(attacker) || id == attacker)
- return PLUGIN_CONTINUE;
- if(ma_klase[attacker] && random(8) == 1)
- Display_Fade(id,1<<14,1<<14 ,1<<16,255,155,50,230);
- return PLUGIN_CONTINUE;
- }
- stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha)
- {
- message_begin( MSG_ONE, g_msg_screenfade,{0,0,0},id );
- write_short( duration ); // Duration of fadeout
- write_short( holdtime ); // Hold time of color
- write_short( fadetype ); // Fade type
- write_byte ( red ); // Red
- write_byte ( green ); // Green
- write_byte ( blue ); // Blue
- write_byte ( alpha ); // Alpha
- message_end();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement