谁有wall插件改进?我的墙怎么只冲着一面?
我用的amx_wall.amxx,但是无论我的头冲哪,墙的方向总是朝向一个面,这个比原来的wall.amxx改进的地方就是可以多加,但是墙却只能朝着一个面,请高手帮着做一个谢谢了。回复: 谁有wall插件改进?我的墙怎么只冲着一面?
能让墙的方向跟管理员的头冲的方向一致就好回复: 谁有wall插件改进?我的墙怎么只冲着一面?
最好改成 管理员能穿过,但是其他玩家不能穿过,原来的wall最不能用的地方就是只能立一个墙 哎 我把wall.sma也发过来吧 高手帮忙看看改下 可以多次立墙,墙的方向跟管理员头部方向一致,只有管理员能穿过,其他人不能穿过。谢谢了。 这2个sma哪个能修改成那样就帮忙改下。#include <amxmod>
#include <amxmisc>
#include <engine>
new boom
new wall
new smoke
new white
new fire
//----------------------------------------------------------------------------------------------
public plugin_init(){
register_plugin("wall","2.0","AssKicR")
register_clcmd("amx_wall","Ass_acc_wall",ADMIN_SLAY)
register_cvar("wall_radius", "0" )
register_cvar("wall_maxdamage", "0" )
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public plugin_precache() {
precache_model("models/wall.mdl")
smoke = precache_model("sprites/steam1.spr")
white = precache_model("sprites/white.spr")
fire = precache_model("sprites/explode1.spr")
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public Ass_acc_wall(id,level,cid) {
if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
Ass_wall(id)
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public Ass_wall(id) {
if (!is_user_alive(id)) {
client_print(id,print_chat,"**** Wall Placement Denied ****")
return PLUGIN_HANDLED
}
if (wall != 0)
{
new Float:vExplodeAt
entity_get_vector(wall, EV_VEC_origin, vExplodeAt)
blowUp(id, vExplodeAt)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(3)
write_coord(floatround(vExplodeAt))
write_coord(floatround(vExplodeAt))
write_coord(floatround(vExplodeAt))
write_short(boom)
write_byte(50)
write_byte(15)
write_byte(0)
message_end()
remove_entity(wall)
client_print(id,print_chat,"**** Wall Detonated ****")
wall = false
return PLUGIN_CONTINUE
} else if (wall == 0) {
wall = create_entity("info_target")
if(wall == 0) return PLUGIN_HANDLED_MAIN
entity_set_string(wall, EV_SZ_classname, "coool_wall")
entity_set_model(wall, "models/wall.mdl")
entity_set_float(wall, EV_FL_health, 1000.0)
new Float:PlayerOrigin
entity_get_vector(id, EV_VEC_origin, PlayerOrigin)
entity_set_origin(wall, PlayerOrigin)
entity_set_int(wall, EV_INT_solid, SOLID_BBOX)
entity_set_int(wall, EV_INT_movetype, MOVETYPE_FLY)
entity_set_edict(wall, EV_ENT_owner, id)
new Float:vRetVector
entity_get_vector(id, EV_VEC_v_angle, vRetVector)
vRetVector=float(0)
entity_set_vector(wall, EV_VEC_angles, vRetVector)
set_size(wall, Float:{-78.0,-5.0,-156.0}, Float:{78.0,5.0,156.0} )
client_print(id,print_chat,"**** Wall Placed ****")
}
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public blowUp( id, Float:vExplodeAt )
{
new distanceBetween
new damage, multiplier
new name
get_user_name(id,name,31)
set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16);
new FFOn= get_cvar_num("mp_friendlyfire")
new origin
origin=floatround(vExplodeAt)
origin=floatround(vExplodeAt)
origin=floatround(vExplodeAt)+37
explode(origin) // blowup even if dead
for(new a = 1; a <= 33; a++)
{
if( is_user_alive(a) && ( get_user_team(id) != get_user_team(a) || FFOn != 0 || a==id ) )
{
new origin1
get_user_origin(a,origin1)
distanceBetween = get_distance(origin, origin1 )
if( distanceBetween < get_cvar_num("wall_radius") )
{
multiplier=(get_cvar_num("wall_maxdamage")*get_cvar_num("wall_maxdamage"))/get_cvar_num("wall_radius")
damage=(get_cvar_num("wall_radius")-distanceBetween)*multiplier
damage=sqrt(damage)
ExtraDamage(a, a, damage, "Admin Wall")
} // distance
} // alive target...
} // loop
}
//----------------------------------------------------------------------------------------------
public explode( vec1 )
{
// blast circles
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 21 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1 + 16)
write_coord(vec1)
write_coord(vec1)
write_coord(vec1 + 1936)
write_short( white )
write_byte( 0 ) // startframe
write_byte( 0 ) // framerate
write_byte( 2 ) // life 2
write_byte( 20 ) // width 16
write_byte( 0 ) // noise
write_byte( 188 ) // r
write_byte( 220 ) // g
write_byte( 255 ) // b
write_byte( 255 ) //brightness
write_byte( 0 ) // speed
message_end()
//Explosion2
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 12 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1)
write_byte( 188 ) // byte (scale in 0.1's) 188
write_byte( 10 ) // byte (framerate)
message_end()
//TE_Explosion
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 3 )
write_coord(vec1)
write_coord(vec1)
write_coord(vec1)
write_short( fire )
write_byte( 60 ) // byte (scale in 0.1's) 188
write_byte( 10 ) // byte (framerate)
write_byte( 0 ) // byte flags
message_end()
//Smoke
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
write_byte( 5 ) // 5
write_coord(vec1)
write_coord(vec1)
write_coord(vec1)
write_short( smoke )
write_byte( 10 )// 2
write_byte( 10 )// 10
message_end()
}
//----------------------------------------------------------------------------------------------
/* Do Exta Damage to a Player */
public ExtraDamage(id, attacker, damage, weaponDescription[] )
{
if ( is_user_alive(id) )
{
new userHealth=get_user_health(id)
set_user_health(id, userHealth - damage )
if ( userHealth - damage <= 0 )
{
logKill(attacker,id, weaponDescription)
if ( get_user_team(id) != get_user_team(attacker) )
{
// The person dying shouldn't get negative credit for this kill (so add it back)
set_user_frags( id, get_user_frags(id) + 1 )
// The killing should get credit for the frag
set_user_frags( attacker, get_user_frags(attacker)+ 1 )
}
else
{
// The person dying shouldn't get negative credit for this kill (so add it back)
set_user_frags( id, get_user_frags(id)+ 1 )
// The killer killed a teammember or self
// Engine gives credit for the kill so let's take away that + 1
set_user_frags( attacker, get_user_frags(attacker) - 2)
}
message_begin( MSG_BROADCAST, get_user_msgid("DeathMsg"),{0,0,0},0)
write_byte(attacker)
write_byte(id)
write_byte(0)
write_string(weaponDescription)
message_end()
}
}
}
//----------------------------------------------------------------------------------------------
/* Log a kill using standard HL-logging format */
public logKill(attacker, victim, weaponDescription[] )
{
//Save Hummiliation
new namea,namev,authida,authidv,teama,teamv
//Info On Attacker
get_user_name(attacker,namea,23)
get_user_team(attacker,teama,7)
get_user_authid(attacker,authida,19)
//Info On Victim
get_user_name(victim,namev,23)
get_user_team(victim,teamv,7)
get_user_authid(victim,authidv,19)
//Log This Kill
log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"",
namea,get_user_userid(attacker),authida,teama,namev,get_user_userid(victim),authidv,teamv, weaponDescription )
}
//----------------------------------------------------------------------------------------------
public sqrt(num)
{
// Cool - Newton's Method - Ludwig
new div = num
new result = 1
while (div > result)
{// end when div == result, or just below
div = (div + result) / 2 // take mean value as new divisor
result = num / div
}
return div
}
//----------------------------------------------------------------------------------------------
回复: 谁有wall插件改进?我的墙怎么只冲着一面?
占个位置我打过两百个星期的cs1.5职业,
但现在更多的时候只能把CS当成娱乐,
跟大多数忠实的CS玩家一样,
没日没夜的继续着自己的理想,
也许有多多少少成绩,
也许没有多少人能记得我,
但是这就是我追求的快乐?......
http://d1.fm.qq.com/2007/07/9/627161...0707150727.wma
回复: 谁有wall插件改进?我的墙怎么只冲着一面?
请高手帮着做一个谢谢了:confused: 请高手帮着做一个谢谢了回复: 谁有wall插件改进?我的墙怎么只冲着一面?
请高手帮着做一个谢谢了:burn:请高手帮着做一个谢谢了CS之最終幻想
我打过两百个星期的cs1.5职业,
但现在更多的时候只能把CS当成娱乐,
跟大多数忠实的CS玩家一样,
没日没夜的继续着自己的理想,
也许有多多少少成绩,
也许没有多少人能记得我,
但是这就是我追求的快乐?......
http://d1.fm.qq.com/2007/07/9/627161...0707150727.wma
页:
[1]