Raised This Month: $ Target: $400
 0% 

ZP: Antiblock


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MEN
Junior Member
Join Date: Nov 2007
Old 10-21-2008 , 14:58   ZP: Antiblock
Reply With Quote #1

The plug-in allows to pass through players by pressing E button! Thanks jas0n for plug-in editing!

PHP Code:
#include <amxmodx>
#include <fakemeta>
 
enum CsTeams
{
    
CS_TEAM_UNASSIGNED    0,
    
CS_TEAM_T         1,
    
CS_TEAM_CT         2,
    
CS_TEAM_SPECTATOR     3
}
 
#define OFFSET_TEAM 114
#define cs_get_user_team(%1) CsTeams:get_pdata_int(%1, OFFSET_TEAM)
 
new cvar_antiblockFloat:g_lasttimetouched[33// lol
 
public plugin_init()
{
    
register_plugin("anti block""0.1""cheap_suit")
    
register_forward(FM_Touch"fwd_touch")
    
register_forward(FM_PlayerPreThink"fwd_playerprethink")
    
cvar_antiblock register_cvar("zp_antiblock""1")
}
 
public 
fwd_playerprethink(id)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED
 
    
static solidsolid pev(idpev_solid)
    if(
solid == SOLID_NOT && (get_gametime() - g_lasttimetouched[id]) > 0.34)
        
set_pev(idpev_solidSOLID_BBOX)
 
    return 
FMRES_IGNORED
}
 
public 
fwd_touch(blockerid)
{
    if(!
is_user_alive(blocker) || !is_user_alive(id) || !get_pcvar_num(cvar_antiblock))
        return 
FMRES_IGNORED
 
    
static button[2]
    
button[0] = pev(idpev_button), button[1] = pev(blockerpev_button)
 
    if(
button[0] & IN_USE || button[1] & IN_USE)
    {
        static 
CsTeams:team[2]
        
team[0] = cs_get_user_team(id), team[1] = cs_get_user_team(blocker)
 
        if(
team[0] != team[1])
            return 
FMRES_IGNORED
 
        set_pev
(blockerpev_solidSOLID_NOT), set_pev(idpev_solidSOLID_NOT)
 
        static 
Float:gametimegametime get_gametime()
        
g_lasttimetouched[id] = gametimeg_lasttimetouched[blocker] = gametime
    
}
    return 
FMRES_IGNORED


Last edited by MEN; 10-23-2008 at 14:19.
MEN is offline
Old 10-22-2008, 18:54
DruGzOG
This message has been deleted by DruGzOG. Reason: Off-topic...
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 05:30.


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