Raised This Month: $ Target: $400
 0% 

Semiclip Bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 07-29-2017 , 03:15   Re: Semiclip Bug
Reply With Quote #1

Sorry here is code

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

#define IsPlayer(%1) (1 <= %1 <= get_maxplayers())

new players[32], inumsemiclip_cvar

public plugin_init() {
    
register_plugin("Semiclip""1.1""Crusher918"// Edited by PurposeLess

    
RegisterHam(Ham_Player_PreThink"player""FwdHamPlayerPreThink"true)
    
RegisterHam(Ham_Killed"player""FwdHamPlayerKilled"true)
    
register_forward(FM_ShouldCollide"FwdShouldCollide")
    
register_forward(FM_AddToFullPack"FwdAddToFullPack"true)

    
semiclip_cvar register_cvar("semiclip""0")
}

public 
FwdHamPlayerPreThink(const id) {
    
Semiclip(idSOLID_NOT)
}

public 
client_PostThink(id) {
    
Semiclip(idSOLID_SLIDEBOX)
}

public 
FwdHamPlayerKilled() {
    
get_players(playersinum"a")
    for(new 
i=0inumi++) {
        
entity_set_int(players[i], EV_INT_solidSOLID_SLIDEBOX)
    }
}

public 
FwdShouldCollide(const touched, const other) {
    if(
get_user_team(touched) != get_user_team(other))
        return 
FMRES_IGNORED;

    if(
IsPlayer(touched) && IsPlayer(other)) {
        
forward_return(FMV_CELL0)
        return 
FMRES_SUPERCEDE;
    }
    return 
FMRES_IGNORED;
}

public 
FwdAddToFullPack(eseiEntidhostflagsplayerpSet) {
    if(
get_user_team(id) != get_user_team(iEnt))
        return

    if(
player && id != iEnt && get_orig_retval()) {
        
set_es(esES_SolidSOLID_NOT)
    }
}

Semiclip(const id, const solid) {
    if(
get_pcvar_num(semiclip_cvar)) {
        if(!
is_user_alive(id))
            return

        
get_players(playersinum"a")
        for(new 
0inumi++) {
            if(
id != players[i]) {
                if(
get_user_team(players[i]) != get_user_team(id))
                    return

                
entity_set_int(players[i], EV_INT_solidsolid)
            }
        }
    }

PurposeLessx is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode