搜索
查看: 1832|回复: 1

改变闪光颜色问题

[复制链接]
发表于 2008-6-11 20:25:31 | 显示全部楼层 |阅读模式 来自 中国–广东
请问闪光爆炸为绿色怎么改,谢谢!

望各位指点迷津。。。

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")
// Cvars
register_cvar("amx_fb_mode", "1")
register_cvar("amx_fb_r",    "255")
register_cvar("amx_fb_g",    "25")
register_cvar("amx_fb_b",    "25")
}
public FlashedEvent( id )
{
new iMode = get_cvar_num("amx_fb_mode")
if ( !iMode ) return PLUGIN_CONTINUE
new iRed,iGreen,iBlue
switch( iMode )
{
  case 1:
  {
   iRed =   get_cvar_num("amx_fb_r")
   iGreen = get_cvar_num("amx_fb_g")
   iBlue =  get_cvar_num("amx_fb_b")
  }
  case 2:
  {
   iRed =   random_num(0,255)
   iGreen = random_num(0,255)
   iBlue =  random_num(0,255)
  }
}
if ( !( iRed ) || !( iGreen ) || !( iBlue ) )
{
  iRed =   100
  iGreen = 100
  iBlue =  100
}
message_begin( MSG_ONE,g_nMsgScreenFade,{0,255,0},id )
write_short( read_data( 1 ) ) // Duration
write_short( read_data( 2 ) ) // 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( 7 ) ) // Alpha
message_end()
return PLUGIN_HANDLED
}
发表于 2008-6-11 23:41:58 | 显示全部楼层 来自 中国–福建–龙岩

回复: 改变闪光颜色问题


amx_fb_r "0"
amx_fb_g "255"
amx_fb_b "0"
把上面的写到amxx.cfg就是绿色的了
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表