- 听众
- 收听
- 积分
- 5632
- 主题
- 回帖
- 0
- 精华
注册时间2005-10-28
最后登录1970-1-1
该用户从未签到
|
发表于 2010-4-12 19:34:47
|
显示全部楼层
semiclip.rar
semiclip.sma
- #include <amxmodx>
- #include <amxmisc>
- #include <fakemeta>
- #define PLUGIN "Semiclip"
- #define VERSION "1.31"
- #define AUTHOR "skyjur"
- new bool:plrSolid[33]
- new bool:plrRestore[33]
- new plrTeam[33]
- new maxplayers
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
-
- register_forward(FM_PlayerPreThink, "preThink")
- register_forward(FM_PlayerPostThink, "postThink")
-
- register_forward(FM_AddToFullPack, "addToFullPack", 1)
-
- maxplayers = get_maxplayers()
- }
- public addToFullPack(es, e, ent, host, hostflags, player, pSet)
- {
- if(player)
- {
- if(plrSolid[host] && plrSolid[ent] && plrTeam[host] == plrTeam[ent])
- {
- set_es(es, ES_Solid, SOLID_NOT)
- set_es(es, ES_RenderMode, kRenderTransAlpha)
- set_es(es, ES_RenderAmt, 85)
- }
- }
- }
- FirstThink()
- {
- for(new i = 1; i <= maxplayers; i++)
- {
- if(!is_user_alive(i))
- {
- plrSolid[i] = false
- continue
- }
-
- plrTeam[i] = get_user_team(i)
- plrSolid[i] = pev(i, pev_solid) == SOLID_SLIDEBOX ? true : false
- }
- }
- public preThink(id)
- {
- static i, LastThink
-
- if(LastThink > id)
- {
- FirstThink()
- }
- LastThink = id
-
- if(!plrSolid[id]) return
-
- for(i = 1; i <= maxplayers; i++)
- {
- if(!plrSolid[i] || id == i) continue
-
- if(plrTeam[i] == plrTeam[id])
- {
- set_pev(i, pev_solid, SOLID_NOT)
- plrRestore[i] = true
- }
- }
- }
- public postThink(id)
- {
- static i
-
- for(i = 1; i <= maxplayers; i++)
- {
- if(plrRestore[i])
- {
- set_pev(i, pev_solid, SOLID_SLIDEBOX)
- plrRestore[i] = false
- }
- }
- }
复制代码 |
|