Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <fakemeta>
- #define PLUGIN "Semiclip"
- #define VERSION "1.0"
- #define AUTHOR "AJW1337//"
- new g_iMaxPlayers, g_iPlayerSolid[33], g_iPlayerRestore[33]
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_forward(FM_PlayerPreThink, "fwd_FM_PlayerPreThink")
- register_forward(FM_PlayerPostThink, "fwd_FM_PlayerPostThink")
- register_forward(FM_AddToFullPack, "fwd_FM_AddToFullPack", 1)
- g_iMaxPlayers = get_maxplayers()
- }
- FirstThink()
- {
- for (new iIndex = 1; iIndex <= g_iMaxPlayers; iIndex++)
- {
- if (!is_user_alive(iIndex))
- {
- g_iPlayerSolid[iIndex] = false
- continue
- }
- g_iPlayerRestore[iIndex] = pev(iIndex, pev_solid) == SOLID_SLIDEBOX ? true : false
- }
- }
- public fwd_FM_PlayerPreThink(id)
- {
- static iIndex, iLastThink
- if(iLastThink > id)
- FirstThink()
- iLastThink = id
- if (g_iPlayerSolid[id])
- return
- for (iIndex = 1; iIndex <= g_iMaxPlayers; iIndex++)
- {
- if (!g_iPlayerSolid[iIndex] || id == iIndex)
- continue
- set_pev(iIndex, pev_solid, SOLID_NOT)
- g_iPlayerRestore[iIndex] = true
- }
- }
- public fwd_FM_PlayerPostThink(id)
- {
- static iIndex
- for (iIndex = 1; iIndex <= g_iMaxPlayers; iIndex++)
- {
- if (g_iPlayerRestore[iIndex])
- {
- set_pev(iIndex, pev_solid, SOLID_SLIDEBOX)
- g_iPlayerRestore[iIndex] = false
- }
- }
- }
- public fwd_FM_AddToFullPack(es_handle, e, iEnt, iIndex, hostflags, pPlayer, pSet)
- {
- if (get_user_team(iIndex) != get_user_team(iEnt))
- return FMRES_IGNORED
- if (pPlayer && g_iPlayerSolid[iIndex] && g_iPlayerSolid[iEnt])
- {
- set_es(es_handle, ES_Solid, SOLID_NOT)
- }
- if (pPlayer && iIndex != iEnt && get_orig_retval() && is_user_alive(iIndex))
- {
- set_es(es_handle, ES_Solid, SOLID_NOT)
- }
- return FMRES_IGNORED
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement