Raised This Month: $ Target: $400
 0% 

Linux C4 OFFSET


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 01-03-2020 , 16:17   Linux C4 OFFSET
Reply With Quote #1

Prompt please offsets on Linux that the thrown out Bomb C4 was not removed at once from the earth

P.S. On Windows everything is in order

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

#define STEP 10.0
#define VERTICAL_SPEED 20.0
#define HORISONTAL_SPEED 60.0

enum (+= 1) {
    
STATUS_NONE 0,
    
STATUS_EFFECT,
    
STATUS_KILL
}

new 
g_CvarTimeout;

public 
plugin_init() {
    
register_plugin("Remove Drop Weapon""0.3""GordonFreeman & F@nt0M");
        
register_forward(FM_SetModel"FM_SetModel_Pre"0)
    
register_forward(FM_SetModel"CWeaponBox_ItemModel")
        
RegisterHam(Ham_Think"item_thighpack""fw_WeaponBoxThink")
    
RegisterHam(Ham_Think,"weapon_shield","fw_WeaponBoxThink")
    
RegisterHam(Ham_Think,"weaponbox","fw_WeaponBoxThink")
        
g_CvarTimeout register_cvar("weapon_time""30.0")
}

public 
FM_SetModel_Pre(const iEntity)
{
    
#define m_rgpPlayerItems2 39 // CBasePlayerItem *

    
new szClassName[32]; pev(iEntitypev_classnameszClassNamecharsmax(szClassName));
    if(!
equal(szClassName"weaponbox")) return FMRES_IGNORED;

    new 
pWeapon get_pdata_cbase(iEntitym_rgpPlayerItems24);

    if(!
pev_valid(pWeapon))
    {
         
set_pev(iEntitypev_nextthinkget_gametime() + get_pcvar_float(g_CvarTimeout));
    }
    
    return 
FMRES_IGNORED;
}

public 
CWeaponBox_ItemModel(const iEntity) {
    if(!
pev_valid(iEntity))
        return 
FMRES_IGNORED;
    
    static 
szClassName[32]
    
pev(iEntitypev_classnameszClassNamecharsmax(szClassName))
        
    if(
equal(szClassName"item_thighpack"))    
        {
        
set_pev(iEntitypev_impulseSTATUS_NONE);
        
set_pev(iEntitypev_nextthinkget_gametime() + get_pcvar_float(g_CvarTimeout));    
    }
    else if(
equal(szClassName"weapon_shield"))    
        {
                
set_task0.1"ChangeNextThinkTime"iEntity )
    }
    
    return 
FMRES_IGNORED;
}

public 
ChangeNextThinkTime( const iEntity ) {
       
    if( 
pev_valid(iEntity) ) {
        static 
szClassName[32]
        
pev(iEntitypev_classnameszClassNamecharsmax(szClassName))
        if(
equal(szClassName"weapon_shield"))    {
        
set_pev(iEntitypev_impulseSTATUS_NONE);
        
set_pev(iEntitypev_nextthinkget_gametime() + get_pcvar_float(g_CvarTimeout));
        }
    }
}

public 
fw_WeaponBoxThink(iEntity) {
    if (!
pev_valid(iEntity)) {
        return 
HAM_IGNORED;
    }
    
    switch(
pev(iEntitypev_impulse))    {
        case 
STATUS_NONE:{
            
set_pev(iEntitypev_movetypeMOVETYPE_FLY);
            
set_pev(iEntitypev_solidSOLID_NOT);
            
set_pev(iEntitypev_rendermodekRenderTransAlpha);
            
            
set_pev(iEntitypev_renderamt100.0);
            
set_pev(iEntitypev_velocityFloat:{0.00.0VERTICAL_SPEED});
            
set_pev(iEntitypev_avelocityFloat:{0.0HORISONTAL_SPEED0.0})
            
set_pev(iEntitypev_impulseSTATUS_EFFECT);        
        }
        case 
STATUS_EFFECT:    {
            if (
pev(iEntitypev_renderamt) > 0.0) {
                
set_pev(iEntitypev_renderamtfloatmax(0.0pev(iEntitypev_renderamt) - STEP));
            } else {
                
set_pev(iEntitypev_flagsFL_KILLME);
                
set_pev(iEntitypev_impulseSTATUS_KILL);
            }
        }
    }
    
    
set_pev(iEntity,pev_nextthink,get_gametime() + 0.1)
    
    return 
HAM_SUPERCEDE;

MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
 



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 02:45.


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