Raised This Month: $12 Target: $400
 3% 

Linux C4 OFFSET


Post New Thread Reply   
 
Thread Tools Display Modes
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
thEsp
BANNED
Join Date: Aug 2017
Old 01-04-2020 , 06:16   Re: Linux C4 OFFSET
Reply With Quote #2

I fear your thread isn't well-detailed. Are you using a translator?
thEsp is offline
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 01-04-2020 , 12:48   Re: Linux C4 OFFSET
Reply With Quote #3

Quote:
Originally Posted by thEsp View Post
I fear your thread isn't well-detailed. Are you using a translator?
On Windows, all discarded weapons are removed from the ground after the time has elapsed ( the Bomb is not removed).On Linux, the same thing happens with the Bomb.I need offsets that will not remove the Bomb from the ground on Linux
MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
Reply


Thread Tools
Display Modes

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 16:21.


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