- 听众
- 收听
- 积分
- 7
- 主题
- 回帖
- 0
- 精华
注册时间2011-3-8
最后登录1970-1-1
该用户从未签到
|
- #include <amxmod>
- #include <amxmisc>
- new gMsgScreenFade
- public admin_flash(id,level,cid)
- {
- if (!cmd_access(id,level,cid,3)) {
- return PLUGIN_HANDLED
- }
- new victim[32]
- read_argv(1,victim,31)
- new arg2[32]
- read_argv(2,arg2,31)
- new number=strtonum(arg2)
- if (number==0) number=1
- if (victim[0]=='@') {
- new team[32], inum
- get_players(team,inum,"e",victim[1])
- if (inum==0) {
- console_print(id,"[AMX] No clients found on such team.")
- return PLUGIN_HANDLED
- }
- for (new i=0;i<inum;++i) {
- new ids[1]
- ids[0] = team
- Flash(ids)
- if(number > 1)
- set_task(1.0, "Flash", 5145102+team, ids, 1, "a", number-2)
- emit_sound(team,CHAN_BODY, "weapons/flashbang-2.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)
- //client_print(id,print_chat,"[AMX] You Flashed all %s's.",victim[1])
- client_print(id,print_chat,"[OGYAi] A{u{FH %s's `@ %i .",victim[1],number)
- }
- }
- else if (victim[0]=='*') {
- new all[32], inum
- get_players(all,inum)
- for (new i=0;i<inum;++i) {
- new ids[1]
- ids[0] = all
- Flash(ids)
- if(number > 1)
- set_task(1.0, "Flash", 2422141+all, ids, 1, "a", number-2)
- emit_sound(all,CHAN_BODY, "weapons/flashbang-2.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)
- //client_print(id,print_chat,"[AMX] You Flashed everyone.")
- client_print(id,print_chat,"[OGYAi] [url=mailto:A%7Bu%7BFC@H]A{u{FC@H[/url] %i .",number)
- }
- }
- else {
- new player = cmd_target(id,victim,0)
- new playername[32]
- get_user_name(player,playername,31)
- if (!player) {
- return PLUGIN_HANDLED
- }
- new ids[1]
- ids[0] = player
- Flash(ids)
- if(number > 1)
- set_task(1.0, "Flash", 34571124+player, ids, 1, "a", number-2)
- emit_sound(player,CHAN_BODY, "weapons/flashbang-2.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)
- //client_print(id,print_chat,"[AMX] You Flashed %s.",playername)
- client_print(id,print_chat,"[OGYAi] A{u{F %s `@ %i .",playername,number)
- }
- return PLUGIN_HANDLED
- }
- public Flash(ids[])
- {
- new id = ids[0]
- message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id)
- write_short( 1<<15 )
- write_short( 3600 )
- write_short( 1<<12 )
- write_byte( 255 )
- write_byte( 255 )
- write_byte( 255 )
- write_byte( 255 )
- message_end()
- }
- public plugin_init()
- {
- register_plugin("Admin Flash","1.1","AssKicR")
- register_concmd("amx_flash","admin_flash",ADMIN_LEVEL_A,"< Wr, #s, @, * > <time in sec> flashes selected client(s)")
- gMsgScreenFade = get_user_msgid("ScreenFade")
- return PLUGIN_CONTINUE
- }
-
- public plugin_precache()
- {
- // FLASHBANG SOUND
- precache_sound( "weapons/flashbang-2.wav" )
- }
复制代码
|
|