[求助]请高手帮忙改个插件颜色!
请高手帮我改个插件(flashbangs.sma彩色闪光)把他改成绿色的!先谢谢了!插件源码:
#include <amxmodx>
#define PLUGIN "Colored Flashbangs"
#define VERSION "1.0"
#define AUTHOR "v3x"
new g_nMsgScreenFade
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("ScreenFade","FlashedEvent","be","4=0","5=0","6=0","7>199")
g_nMsgScreenFade = get_user_msgid("ScreenFade")
// Cvars
register_cvar("amx_fb_mode", "1")
register_cvar("amx_fb_r", "0")
register_cvar("amx_fb_g", "0")
register_cvar("amx_fb_b", "0")
}
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,0,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
}
回复: [求助]请高手帮忙改个插件颜色!
我晕~~~这源码中明明说明可以在"amxx.cfg"中自定义颜色,
amx_fb_r 1 // 红色
amx_fb_g 255 // 绿色
amx_fb_b 1 // 蓝色
回复: [求助]请高手帮忙改个插件颜色!
HHHHHHHHHHHHHHH回复: [求助]请高手帮忙改个插件颜色!
Post by Ryu2877我晕~~~
这源码中明明说明可以在"amxx.cfg"中自定义颜色,
谢谢Ryu
我用了这个参数的~怎么变成灰黑色的呢~:brick:
回复: [求助]请高手帮忙改个插件颜色!
Post by qweasdwwwqqqamxx.cfg
/变量:
fbl_enabled "1" ; /开关
fbl_radius "100" ;/闪光照亮半径
fbl_color "1 456 3" ;/闪光颜色,默认白色, in format "R G B"
幻想老大~你这好象是闪光的光影呢!~
:cry:
页:
[1]