|
发表于 2012-5-10 13:23:47
|
显示全部楼层
来自 中国–广西–钦州
你的OP登场插件源码少了 precache_sound("misc/op.wav") 这一条。我给你加上了。。
具体改动在下面红字
源码如下
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <fun>
#define TE_SPRITE 17
new exp, g_lightning, g_bluejet1;
new cvar_radius,icvar_num,icvar_time;
new light; //
public plugin_init()
{
register_plugin("AMX Admin Model", "1.1.1", "whitemike")
register_event("ResetHUD", "resetModel", "b")
register_plugin("glittering appearance","0.1","DaBears")
register_clcmd("QQ378036361","expme",ADMIN_SLAY)
register_clcmd("QQ378036361","explode",ADMIN_SLAY)
register_clcmd("aqq894790512","blastcircles",ADMIN_SLAY)
register_clcmd("aqq894790512","lightning_effects",ADMIN_SLAY)//A权限OP输入QQ378036361地图会变暗20秒
register_clcmd("aqq894790512","client_putinserver",ADMIN_SLAY)
cvar_radius = register_cvar("explosion_radius", "250")
icvar_num = register_cvar("explosion_num", "2");
icvar_time = register_cvar("explosion_time", "0.4");
register_event("ResetHUD","expme","be")
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_model("models/player/vip/vip.mdl")
exp = precache_model("sprites/shockwave.spr") //光圈spr
g_bluejet1 = precache_model("sprites/bluejet1.spr")
precache_sound("misc/op.wav")
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_SLAY) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "vip")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "vip")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
public blastcircles(id)
{
new origin[3]
get_user_origin(id, origin)
new blast = get_pcvar_num(cvar_radius)
message_begin(MSG_PAS, SVC_TEMPENTITY, origin)
write_byte(TE_BEAMCYLINDER)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2] - 16)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2] - 16 + blast)
write_short(exp)
write_byte(6)
write_byte(2)
write_byte(6)
write_byte(90) //光圈高度
write_byte(4) //
write_byte(238) //紫颜色
write_byte(130) //紫颜色
write_byte(238) //紫颜色
write_byte(160) //光圈亮度
write_byte(5)
message_end()
message_begin(MSG_PVS,SVC_TEMPENTITY,origin) //血珠代码
write_byte(TE_PARTICLEBURST) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_short(200) // 半径
write_byte(250) // 颜色
write_byte(2) // 持续时间
message_end()
message_begin(MSG_PVS,SVC_TEMPENTITY,origin) //血珠代码
write_byte(TE_PARTICLEBURST) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_short(250) // 半径
write_byte(100) // 颜色
write_byte(4) // 持续时间
message_end()
message_begin(MSG_PAS, SVC_TEMPENTITY, origin)
write_byte(TE_BEAMCYLINDER)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2] - 16)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2] - 2936 + blast /2)
write_short(exp)
write_byte(5)
write_byte(5)
write_byte(10)
write_byte(4)
write_byte(20)
write_byte(34)
write_byte(139)
write_byte(34)
write_byte(255)
write_byte(5)
message_end() //光圈2取消
}
public Shake(id)
{
}
public expme(id)
{
if(is_user_alive(id) && (get_user_flags(id) & ADMIN_SLAY))
{
client_cmd(0,"spk misc/op")
client_cmd(0,"g;clear")
explode_blastcircles(id);
set_task(get_pcvar_float(icvar_time), "explode_blastcircles", id,_,_,"a",get_pcvar_num(icvar_num));
set_task(8.0, "removerender", id);// set_lights("l")
set_task(7.0,"thunder_clap")
}
return PLUGIN_CONTINUE
}
public removerender(id)
{
if(is_user_connected(id))
{
cs_reset_user_model(id);
}
}
public explode_blastcircles(id)
{
new vorigin[ 3 ], pos[ 3 ];
get_user_origin( id, vorigin );
vorigin[ 2 ] -= 26;
pos[ 0 ] = vorigin[ 0 ] + 300; //大小
pos[ 1 ] = vorigin[ 1 ] + 30; //大小
//Thunder( pos, vorigin );
blastcircles(id);
explode(id);
deagle_explode(vorigin)
}
public explode(id)
{
new origin[3]
get_user_origin(id, origin)
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 17 )
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_short( g_bluejet1 )
write_byte( 250 ) //60
write_byte( 20 ) //250
message_end()
}
deagle_explode(vec1[3])
{
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_EXPLOSION)
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_short(g_lightning)
write_byte(100)
write_byte(80)
write_byte(TE_EXPLFLAG_NOSOUND)
message_end();
}
public client_putinserver(id)
{
set_task(0.5,"lightning0",_,_,_,"a",5);//次数x0.5
}
public lightning0()
{
new xy[2]
xy[0] = random_num(-2000,2200)
xy[1] = random_num(-2000,2200)
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(0)
write_coord(xy[0])
write_coord(xy[1])
write_coord(4000)
write_coord(xy[0])
write_coord(xy[1])
write_coord(-2000)
write_short(light)
write_byte(1) // framestart
write_byte(2) // framerate
write_byte(250) // life
write_byte(200) // width
write_byte(100) // noise
write_byte(248) // r, g, b
write_byte(248) // r, g, b
write_byte(255) // r, g, b
write_byte(200) // brightness
write_byte(200) //
message_end()
}
public lightning_effects(id, level, cid)//變黑
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
set_lights("d")
set_task(5.0,"thunder_clap")
return PLUGIN_HANDLED
}
public thunder_clap()//恢復
{
set_lights("#OFF")
} |
|