Raised This Month: $32 Target: $400
 8% 

Nade Semiclip v2.7


Post New Thread Reply   
 
Thread Tools Display Modes
Lenilson
Junior Member
Join Date: Aug 2012
Old 11-20-2018 , 19:43   Re: Nade Semiclip v2.4
Reply With Quote #21

Quote:
Originally Posted by JusTGo View Post
Not sure about the problem, test this updated plugin and see if every thing is working correctly :

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

#define PLUGIN "Nade Semiclip"
#define VERSION "2.5"
#define AUTHOR "JustGo"

#define OFFSET_TEAM    114
#define is_user_valid(%1) (1 <= %1 <= g_MaxPlayers)
#define fm_get_user_team(%1)    get_pdata_int(%1,OFFSET_TEAM)
#define is_grenade_c4(%1)    (get_pdata_int(%1, 96) & (1<<8)) // 96 is the C4 offset

#define SEMI_CLIP_DISTANCE 100.0

new cvar_nade_semiclipg_nade_semiclip
new g_MaxPlayers

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
RegisterHam(Ham_Think"grenade""Think_Grenade")
    
    
register_forward(FM_SetModel"SetModel")
    
register_forward(FM_ShouldCollide"ShouldCollide")
    
    
cvar_nade_semiclip register_cvar"nade_semiclip""1" )

    
g_MaxPlayers get_maxplayers();
}

public 
event_round_start()
{
    
g_nade_semiclip get_pcvar_numcvar_nade_semiclip )
}

// Grenade Think Forward
public Think_Grenade(entity)
{
    if(!
g_nade_semiclip)
        return 
HAM_IGNORED
    
    
if(!pev_valid(entity))
        return 
HAM_IGNORED
    
    
if(is_grenade_c4(entity))
        return 
HAM_IGNORED
    
    
static Float:dmgtime
    pev
(entitypev_dmgtimedmgtime)
    
    if(
dmgtime <= get_gametime())
        
set_pev(entitypev_owner,pev(entity,pev_iuser2)); // fix for other plugin that gets flasher name or stuff like that.
    
    
return HAM_IGNORED;
}

public 
SetModel(iEntity, const Model[])
{
    if(!
g_nade_semiclip)
        return 
FMRES_IGNORED
        
    
if(!is_grenade(iEntity))
        return 
FMRES_IGNORED
        
    
static idid pev(iEntitypev_owner)

    if(!
is_user_valid(id))
        return 
FMRES_IGNORED

    
if(!pev(iEntity,pev_iuser2))  
    {
        
set_pev(iEntity,pev_iuser2,id//remeber the real nade owner
        
set_pev(iEntity,pev_iuser1,fm_get_user_team(id)) // remeber the nade owner team
    
}
        
    return 
FMRES_IGNORED
}

public 
ShouldCollide(playerindexentindex)
{
    if(!
g_nade_semiclip)
        return 
FMRES_IGNORED
        
    
if(!is_user_alive(playerindex) || !is_grenade(entindex))
        return 
FMRES_IGNORED
        
    
// Get damage time of grenade
    
static Float:dmgtime
    pev
(entindexpev_dmgtimedmgtime)
        
    if(
dmgtime <= get_gametime())
        return 
FMRES_IGNORED
    
    
if(close_enough(playerindex,entindex))
    {        
        if(
g_nade_semiclip == && (fm_get_user_teamplayerindex ) != pev(entindex,pev_iuser1)))
            return 
FMRES_IGNORED
        
        set_pev
(entindex,pev_owner,playerindex)
    }

    return 
FMRES_IGNORED
}

is_grenade(iEntity)
{
    if( !
pev_valid(iEntity) )
        return 
0
    
    
static class[9
    
pev(iEntitypev_classname, class, charsmax(class)) 
    if( !
equal(class, "grenade") )
        return 
0
    
    
if (is_grenade_c4(iEntity))
        return 
0
    
    
return 1
}

public 
bool:close_enough(ent1ent2)
{
    static 
Float:origin[3], Float:origin2[3]
    
    
pev(ent1pev_originorigin )
    
pev(ent2pev_originorigin2 )
    
    if( 
get_distance_foriginorigin2 ) <= SEMI_CLIP_DISTANCE )
        return 
true

    
return false    

it stopped displaying error in the logs, but it stopped working since I put the REGAME.DLL, it works on reHLDS normally, I expressed myself wrong earlier.
Lenilson is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 11-21-2018 , 11:49   Re: Nade Semiclip v2.4
Reply With Quote #22

Quote:
Originally Posted by Lenilson View Post
it stopped displaying error in the logs, but it stopped working since I put the REGAME.DLL, it works on reHLDS normally, I expressed myself wrong earlier.
show your liblist.gam contents ( You can find it in the cstrike folder )
__________________

Last edited by JusTGo; 11-21-2018 at 11:51.
JusTGo is offline
Lenilson
Junior Member
Join Date: Aug 2012
Old 11-21-2018 , 14:23   Re: Nade Semiclip v2.4
Reply With Quote #23

Quote:
Originally Posted by JusTGo View Post
show your liblist.gam contents ( You can find it in the cstrike folder )
game "Counter-Strike"
url_info "www.counter-strike.net"
url_dl ""
version "1.6"
size "184000000"
svonly "0"
secure "1"
type "multiplayer_only"
cldll "1"
hlversion "1111"
nomodels "1"
nohimodel "1"
mpentity "info_player_start"
gamedll "dlls\mp.dll"
gamedll_linux "dlls/cs.so"
gamedll_osx "dlls/cs.dylib"
trainmap "tr_1"
edicts "1800"
gamedll_linux "addons/metamod/dlls/metamod_i386.so"
Lenilson is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 11-21-2018 , 15:26   Re: Nade Semiclip v2.4
Reply With Quote #24

change it to :

PHP Code:
game "Counter-Strike"
url_info "www.counter-strike.net"
url_dl ""
version "1.6"
size "184000000"
svonly "0"
secure "1"
type "multiplayer_only"
cldll "1" 
hlversion "1111"
nomodels "1"
nohimodel "1"
mpentity "info_player_start"
gamedll_linux "addons/metamod/dlls/metamod_i386.so"
trainmap "tr_1"
edicts    "1800" 
__________________
JusTGo is offline
Lenilson
Junior Member
Join Date: Aug 2012
Old 11-21-2018 , 15:49   Re: Nade Semiclip v2.4
Reply With Quote #25

Quote:
Originally Posted by JusTGo View Post
change it to :

PHP Code:
game "Counter-Strike"
url_info "www.counter-strike.net"
url_dl ""
version "1.6"
size "184000000"
svonly "0"
secure "1"
type "multiplayer_only"
cldll "1" 
hlversion "1111"
nomodels "1"
nohimodel "1"
mpentity "info_player_start"
gamedll_linux "addons/metamod/dlls/metamod_i386.so"
trainmap "tr_1"
edicts    "1800" 
now the server does not start
Lenilson is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 11-22-2018 , 08:21   Re: Nade Semiclip v2.4
Reply With Quote #26

Quote:
Originally Posted by Lenilson View Post
now the server does not start
What is the error ?
__________________
JusTGo is offline
Lenilson
Junior Member
Join Date: Aug 2012
Old 11-22-2018 , 11:23   Re: Nade Semiclip v2.4
Reply With Quote #27

Quote:
Originally Posted by JusTGo View Post
What is the error ?
the log does not load and shows no errors.
Lenilson is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 11-22-2018 , 11:36   Re: Nade Semiclip v2.4
Reply With Quote #28

are you using metamod-r if not try installing it, my liblist.gam is like this and it works fine :

PHP Code:
game "Counter-Strike"
url_info "www.counter-strike.net"
url_dl ""
version "1.6"
size "184000000"
svonly "0"
secure "1"
type "multiplayer_only"
cldll "1" 
hlversion "1111"
nomodels "1"
nohimodel "1"
mpentity "info_player_start"
gamedll "dlls\mp.dll"
gamedll_linux "addons/metamod/metamod_i386.so"
gamedll_osx "dlls/cs.dylib"
trainmap "tr_1"
edicts    "1800" 
__________________
JusTGo is offline
Lenilson
Junior Member
Join Date: Aug 2012
Old 11-22-2018 , 18:32   Re: Nade Semiclip v2.4
Reply With Quote #29

I just tested with MetaMod v1.21p37 and it also did not work
Lenilson is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-23-2018 , 07:34   Re: Nade Semiclip v2.4
Reply With Quote #30

If you use ReHlds, you need to use Metamod-r
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
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 20:20.


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