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

Just Loking for a Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
QuickDroLLL
Senior Member
Join Date: Dec 2021
Location: AMX Mod X Land
Old 03-20-2023 , 16:20   Just Loking for a Plugin
Reply With Quote #1

Hello Every one QuickDroLLL, so basicly iam loking for plugin that make the he grenade when it tuch the ground it will explode directly i know there is plugin name Nade Modes but iam loking for plugin do that only you can say specify plugin sorry for my bad english and yeah hope any one find or create it to me bcz iam loking for it so much in my server done
QuickDroLLL is offline
Naeciof
Member
Join Date: Oct 2016
Location: Brazil
Old 03-21-2023 , 10:28   Re: Just Loking for a Plugin
Reply With Quote #2

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

new amxx_touch_explode_he
new amxx_touch_explode_fb
new amxx_touch_explode_sg

public plugin_init()
{
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
    
amxx_touch_explode_he register_cvar("amxx_touch_explode_he","1")
    
amxx_touch_explode_fb register_cvar("amxx_touch_explode_fb","1")
    
amxx_touch_explode_sg register_cvar("amxx_touch_explode_sg","1")
    
    
RegisterHam(Ham_Touch,"grenade","cmd_touch")
}

public 
cmd_touch(this)
{
    new 
cvar;
    switch(
Get_Grenade_Type(thisfalse))
    {
        case 
CSW_HEGRENADE:    cvar amxx_touch_explode_he;
        case 
CSW_FLASHBANG:    cvar amxx_touch_explode_fb;
        case 
CSW_SMOKEGRENADEcvar amxx_touch_explode_sg;
    }
    
    if(
cvar && get_pcvar_num(cvar))
    {
        
set_pev(thispev_dmgtime0.0)
    }
}

Get_Grenade_Typeentbool:bCheckClass true 
{
    const 
m_bIsC4 385;
    const 
m_usEvent_Grenade 228;
    
    if( 
bCheckClass 
    { 
        new class[
9
        
pev(entpev_classname, class, charsmax(class)) 
        if( !
equal(class, "grenade") ) 
        { 
            return 

        

    } 

    if( 
get_pdata_bool(entm_bIsC4) ) 
    { 
        return 
CSW_C4 
    


    new 
usEvent get_pdata_int(entm_usEvent_Grenade
    if( !
usEvent 
    { 
        return 
CSW_FLASHBANG 
    


    static 
m_usHgrenExplom_usSmokeExplo 
    
if( !m_usHgrenExplo 
    { 
        
m_usHgrenExplo engfunc(EngFunc_PrecacheEvent1"events/createexplo.sc"
        
m_usSmokeExplo engfunc(EngFunc_PrecacheEvent1"events/createsmoke.sc"
    } 

    return 
usEvent == m_usHgrenExplo CSW_HEGRENADE CSW_SMOKEGRENADE 
}

#define SHORT_BYTES      2
#define INT_BYTES        4 
#define BYTE_BITS        8 

stock bool:get_pdata_bool(entcharbased_offsetintbase_linuxdiff 5

    return !!( 
get_pdata_int(entcharbased_offset INT_BYTESintbase_linuxdiff) & (0xFF<<((charbased_offset INT_BYTES) * BYTE_BITS)) ) 
}

stock get_pdata_short(entshortbased_offsetintbase_linuxdiff 5

    return ( 
get_pdata_int(entshortbased_offset SHORT_BYTESintbase_linuxdiff)>>((shortbased_offset SHORT_BYTES) * BYTE_BITS) ) & 0xFFFF 


Last edited by Naeciof; 03-21-2023 at 10:31.
Naeciof is offline
QuickDroLLL
Senior Member
Join Date: Dec 2021
Location: AMX Mod X Land
Old 03-21-2023 , 12:51   Re: Just Loking for a Plugin
Reply With Quote #3

Quote:
Originally Posted by Naeciof View Post
Try this
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new amxx_touch_explode_he
new amxx_touch_explode_fb
new amxx_touch_explode_sg

public plugin_init()
{
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
    
amxx_touch_explode_he register_cvar("amxx_touch_explode_he","1")
    
amxx_touch_explode_fb register_cvar("amxx_touch_explode_fb","1")
    
amxx_touch_explode_sg register_cvar("amxx_touch_explode_sg","1")
    
    
RegisterHam(Ham_Touch,"grenade","cmd_touch")
}

public 
cmd_touch(this)
{
    new 
cvar;
    switch(
Get_Grenade_Type(thisfalse))
    {
        case 
CSW_HEGRENADE:    cvar amxx_touch_explode_he;
        case 
CSW_FLASHBANG:    cvar amxx_touch_explode_fb;
        case 
CSW_SMOKEGRENADEcvar amxx_touch_explode_sg;
    }
    
    if(
cvar && get_pcvar_num(cvar))
    {
        
set_pev(thispev_dmgtime0.0)
    }
}

Get_Grenade_Typeentbool:bCheckClass true 
{
    const 
m_bIsC4 385;
    const 
m_usEvent_Grenade 228;
    
    if( 
bCheckClass 
    { 
        new class[
9
        
pev(entpev_classname, class, charsmax(class)) 
        if( !
equal(class, "grenade") ) 
        { 
            return 

        

    } 

    if( 
get_pdata_bool(entm_bIsC4) ) 
    { 
        return 
CSW_C4 
    


    new 
usEvent get_pdata_int(entm_usEvent_Grenade
    if( !
usEvent 
    { 
        return 
CSW_FLASHBANG 
    


    static 
m_usHgrenExplom_usSmokeExplo 
    
if( !m_usHgrenExplo 
    { 
        
m_usHgrenExplo engfunc(EngFunc_PrecacheEvent1"events/createexplo.sc"
        
m_usSmokeExplo engfunc(EngFunc_PrecacheEvent1"events/createsmoke.sc"
    } 

    return 
usEvent == m_usHgrenExplo CSW_HEGRENADE CSW_SMOKEGRENADE 
}

#define SHORT_BYTES      2
#define INT_BYTES        4 
#define BYTE_BITS        8 

stock bool:get_pdata_bool(entcharbased_offsetintbase_linuxdiff 5

    return !!( 
get_pdata_int(entcharbased_offset INT_BYTESintbase_linuxdiff) & (0xFF<<((charbased_offset INT_BYTES) * BYTE_BITS)) ) 
}

stock get_pdata_short(entshortbased_offsetintbase_linuxdiff 5

    return ( 
get_pdata_int(entshortbased_offset SHORT_BYTESintbase_linuxdiff)>>((shortbased_offset SHORT_BYTES) * BYTE_BITS) ) & 0xFFFF 

its working thank you very much <3
QuickDroLLL is offline
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 09:37.


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