|
#include <amxmodx>
#include <amxmisc>
#include <engine>
new semiclip = 1
public plugin_init() {
register_plugin("Semiclip", "1.0", "Crusher918")
register_concmd("amx_semiclip","cmd_semiclip",ADMIN_LEVEL_A,"<1|0>")
register_clcmd("fullupdate", "clcmd_fullupdate")
register_event("ResetHUD", "ResetHUD", "b")
register_event("HLTV", "new_round", "a", "1=0", "2=0")
}
public clcmd_fullupdate() {
return PLUGIN_HANDLED_MAIN
}
public cmd_semiclip(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new name[32]
new arg1[32]
read_argv(1,arg1,31)
new cvarnum = str_to_num(arg1)
semiclip = cvarnum
get_user_name(id,name,31)
new players[32], pnum
get_players(players,pnum,"a")
if(semiclip) {
for(new i=0;i<pnum;++i) {
entity_set_int(i, EV_INT_solid, SOLID_TRIGGER)
}
client_print(0,print_chat,"[AMXX] ADMIN %s: set semiclip on",name)
}
else if(!semiclip) {
for(new i=0;i<pnum;++i) {
entity_set_int(i, EV_INT_solid, SOLID_BBOX)
}
client_print(0,print_chat,"[AMXX] ADMIN %s: unset semiclip off",name)
}
return PLUGIN_HANDLED
}
public ResetHUD(id) {
if(semiclip)
entity_set_int(id, EV_INT_solid, SOLID_TRIGGER)
else if(!semiclip)
entity_set_int(id, EV_INT_solid, SOLID_BBOX)
}
public new_round() {
new players[32], pnum
get_players(players,pnum,"a")
if(semiclip) {
for(new i=0;i<pnum;++i) {
entity_set_int(i, EV_INT_solid, SOLID_TRIGGER)
}
}
else if(!semiclip) {
for(new i=0;i<pnum;++i) {
entity_set_int(i, EV_INT_solid, SOLID_BBOX)
}
}
return PLUGIN_HANDLED
}
这个插件有个很大的BUG
当没有人接近人体的时候。我希望那个人是以实体的形式出现的
以上这个插件就没有达到这种效果。搞得像隐身一样。
接近人体的时候我就希望是插件的效果
如图:
求修复 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|