点通粉丝的 死后变小鸡+5HP 死后尸体不消失
首先感谢点通粉丝提供源码···唯一的缺点就是 死后尸体不消失·· 鸡是从身体里跳出来的··丑的要死····不如改为死后尸体消失后 再出现鸡··望点通粉丝 或者其他高手帮忙修改下··肯定还有人需要··
#include <amxmod>
//----------------------------------------------------------------------------------------------
public plugin_init()
{
// Plugin Info
register_plugin("H-XueBao","1.0","duper/Rockell & X-man")
register_cvar("amx_medkit", "1")
register_cvar("amx_medkithealth", "0")
register_event("ResetHUD", "newRound","b")
register_event("DeathMsg","deathevent","a")
}
//----------------------------------------------------------------------------------------------
public newRound()
{
new chocolate = find_ent_by_class(-1, "chocolate")
while(chocolate) {
remove_entity(chocolate)
chocolate = find_ent_by_class(chocolate, "chocolate")
}
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public deathevent()
{
if ( !get_cvar_num("amx_medkit") )
return PLUGIN_CONTINUE
new killer = read_data(1)
new victim = read_data(2)
if ( killer != victim )
{
createChocolate(victim)
}
if(is_user_connected(victim))
cs_reset_user_model(victim)
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public createChocolate(victim)
{
new Float:vAim, Float:vOrigin
entity_get_vector(victim, EV_VEC_origin, vOrigin)
VelocityByAim(victim, random_num(2, 4), vAim)
vOrigin += vAim
vOrigin += vAim
vOrigin += 30.0
new chocolate = create_entity("info_target")
entity_set_string(chocolate, EV_SZ_classname, "chocolate")
entity_set_model(chocolate, "models/chick.mdl")
entity_set_size(chocolate, Float:{-2.5, -2.5, -1.5}, Float:{2.5, 2.5, 1.5})
entity_set_int(chocolate, EV_INT_solid, 2)
entity_set_int(chocolate, EV_INT_movetype, 6)
entity_set_vector(chocolate, EV_VEC_origin, vOrigin)
}
//----------------------------------------------------------------------------------------------
public plugin_precache() {
precache_model("models/chick.mdl")
precache_sound( "misc/killChicken.wav")
}
//----------------------------------------------------------------------------------------------
public pfn_touch(ptr, ptd){
if(!is_valid_ent(ptd) || !is_valid_ent(ptr))
return PLUGIN_CONTINUE
if(!is_user_connected(ptd) || !is_user_alive(ptd))
return PLUGIN_CONTINUE
new classname
entity_get_string(ptr, EV_SZ_classname, classname, 31)
if(equal(classname, "chocolate"))
{
new gOrigHealth = get_user_health(ptd)
new health = gOrigHealth + get_cvar_num("amx_medkithealth")
set_user_health(ptd, health)
emit_sound(ptd,CHAN_VOICE,"misc/killChicken.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
remove_entity(ptr)
}
return PLUGIN_CONTINUE
}
public client_death(killer, victim, wpnindex, hitplace, TK)
{
if(wpnindex == CSW_C4&& is_user_connected(victim))
cs_reset_user_model(victim)
} 晕死 人到哪去了·· 帮忙顶一下!
我也想知道! 没图,不吸引人啊,LZ。 这个查件就是死后出现一只小鸡
而且尸体不消失 很难看!! 用血包插件改的,尸体当然不消失 消不消失有什么关糸..偶都用了一年多了..感觉不错啊 插件确实不错!
尸体消失就完美了!!! http://a19.photo.store.qq.com/http_imgload.cgi?/rurl4_s=0c330c9e6a2a593bb88e4ac844fbb08f3db34146d988a9cd89591daa760dd70ea0209705c12362e8cb27a521d3cbe8b00a99576a9800174f025da83170a708680b9e61e66330116d4644cafbc1445bf120d51d9f 没图,不吸引人啊,LZ。
页:
[1]