View Single Post
Author Message
hzqst
Senior Member
Join Date: Jul 2008
Old 04-22-2015 , 00:05   Module: SemiclipEx
Reply With Quote #1

SemiclipEx

Author: hzqst
Version: 1.0 (no more update maybe)
Description: this module allows player and bullet (traceline) to pass through any entities in condition that decided by amxx plugin author.
Quote:
The semiclip condition could be changed dynamically by amxx.
All kinds of entities could be semiclip, which means terrorists may go through a wall entity but CTs can not.
Linux:
Quote:
you have to compile this module yourself, the Detours library is useless so you can remove them.
I have compiled a sample plugin for you so just
Quote:
put everything from SemiclipEx\ to cstrike\
Example plugin:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <SemiclipEx>

#define PLUGIN "SemiclipEx Test"
#define VERSION "1.0.0"
#define AUTHOR "hzqst"

public PM_ShouldCollide(playerindexentindex)
{
    if(!
is_user_alive(entindex) || playerindex == entindex)
        return 
1;
    if(
get_user_team(playerindex) == get_user_team(entindex))
        return 
0;
    return 
1;
}

public 
ShouldCollide(playerindexentindex)
{
    new 
ret;
    if(!
is_user_alive(entindex) || playerindex == entindex)
        
ret 1;
    else if(
get_user_team(playerindex) == get_user_team(entindex))
        
ret 0;
    else
        
ret 1;
    
forward_return(FMV_CELLret);
    return 
FMRES_SUPERCEDE;
}

public 
AddToFullPack_Post(es_handle,e,ent,host,hostflags,player,pSet)
{
    if(
PM_ShouldCollide(hostent) == 0)
    {
        
set_es(es_handleES_SolidSOLID_NOT);
    }
    return 
FMRES_HANDLED;
}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
SCE_RegisterForward(func_PM_ShouldCollide"PM_ShouldCollide");
    
register_forward(FM_ShouldCollide"ShouldCollide")
    
//Just for client-side prediction
    
register_forward(FM_AddToFullPack,"fw_AddToFullPack_Post",1)

Attached Files
File Type: zip SemiclipEx_full.zip (141.1 KB, 841 views)

Last edited by hzqst; 04-22-2015 at 04:33.
hzqst is offline