求个武器在地上发光的插件
不是旋转发光的那个插件!以前我见过!现在找不到了!有的共享下!谢谢 本帖最后由 kk阿朗 于 2010-6-8 14:29 编辑/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "0.1"
#define AUTHOR "K.K.Lv"
new g_pCvarEnable;
new g_MaxPlayers;
public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR );
g_pCvarEnable = register_cvar( "wg_enable", "1" );
register_forward( FM_SetModel,"forward_model" );
g_MaxPlayers = get_maxplayers();
}
public forward_model( ent, const model[] ) {
if ( !pev_valid( ent ) && !get_pcvar_num( g_pCvarEnable ) )
return FMRES_IGNORED;
//use random color
static id;
id = pev( ent, pev_owner );
if ( !( 1<= id <= g_MaxPlayers ) )
return FMRES_IGNORED;
static red, green, blue;
red = random_num( 1, 255 );
green = random_num( 1, 255 );
blue = random_num( 1, 255 );
fm_set_rendering( ent, kRenderFxGlowShell, red, green, blue, kRenderNormal, 15 );
return FMRES_IGNORED;
}
stock fm_set_rendering( ent, fx = kRenderFxNone, r = 0, g = 0, b = 0, mode = kRenderNormal, amount = 16 ) {
static Float:RenderColor[ 3 ];
RenderColor[ 0 ] = float( r );
RenderColor[ 1 ] = float( g );
RenderColor[ 2 ] = float( b );
set_pev( ent, pev_renderfx, fx );
set_pev( ent, pev_rendercolor, RenderColor );
set_pev( ent, pev_rendermode, mode );
set_pev( ent, pev_renderamt, float( amount ) );
}测试过!自己可以 改一下不要随机颜色! 谢谢了!可怎么改随即颜色啊!偶对源码晕的很!先谢谢大哥了! 26. red = random_num( 1, 255 ); 27. green = random_num( 1, 255 ); 28. blue = random_num( 1, 255 );
是这段吗? 如果加个权限呢?具有某个权限的玩家丢出去的武器才发光 比如 通道权限。 加什么权限啊!让所有的放光多好啊! 我试用了一下 貌似人物也是发光的有个别人物不发光 不会吧!我还没有试呢!人物发光什么颜色! 人物发光颜色也是随机啊 晕!要人物发光干嘛!KK郎哥!看下到底怎么回事!
页:
[1]
2