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

Gib Death 2.1


Post New Thread Reply   
 
Thread Tools Display Modes
papyrus_kn
Senior Member
Join Date: Feb 2009
Location: Bulgaria
Old 03-27-2010 , 08:37   Re: Gib Death 1.6
Reply With Quote #41

Quote:
Counter-Strike 1.6 v40 DigitalZone

non-steam = non support
__________________
papyrus_kn is offline
Send a message via Skype™ to papyrus_kn
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-27-2010 , 10:29   Re: Gib Death 1.7
Reply With Quote #42

Plugin updated.
__________________
<VeCo> is offline
V.I.P
Junior Member
Join Date: Jan 2010
Old 03-27-2010 , 18:49   Re: Gib Death 1.7
Reply With Quote #43

thanks for answering me
V.I.P is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 08-18-2010 , 04:45   Re: Gib Death 1.7
Reply With Quote #44

gj veco!
r14170 is offline
zippel
Member
Join Date: Mar 2011
Location: RF
Old 05-23-2011 , 00:21   Re: Gib Death 1.7
Reply With Quote #45

Sometimes player model doesn't removed before gib effect.
or rather do not see why not always disappearing corpses...

Last edited by zippel; 05-23-2011 at 00:58.
zippel is offline
Send a message via ICQ to zippel Send a message via Skype™ to zippel
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 05-11-2013 , 10:45   Re: Gib Death 1.7
Reply With Quote #46

Third gib is not working.
ZASTRELIS is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-02-2014 , 04:14   Re: Gib Death 2.0
Reply With Quote #47

Plugin updated!
Quote:
● Rewritten code.
● Added better method for hiding dead bodies.
● CVAR "gib_type" now uses flags, allowing users to enable/disable gibs by their own choice.
● Added "gib_count" and "gib_life" CVARs.
● Removed usage of fun module.
● Tweaked gib velocity values a bit.
also updated topic layout XD
__________________
<VeCo> is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-11-2014 , 03:43   Re: Gib Death 2.1
Reply With Quote #48

Some people requested to add support for "Zombie Plague" mod, where only zombies should transform into gibs.
Plugin updated!

Quote:
● To enable "Zombie Plague" support:
PHP Code:
//#define USE_ZP // uncomment this line to use Zombie Plague mode (gib effects apply only to zombies) 
__________________
<VeCo> is offline
Xaleer
Member
Join Date: May 2014
Location: Ukraine
Old 06-16-2014 , 18:27   Re: Gib Death 2.1
Reply With Quote #49

your plugin fixes my problem, can you help me? remove all effects and models to the corpse simply disappear, please ... https://forums.alliedmods.net/showthread.php?t=242055

Last edited by Xaleer; 06-16-2014 at 18:28.
Xaleer is offline
Send a message via Skype™ to Xaleer
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-05-2015 , 16:03   Re: Gib Death 2.1
Reply With Quote #50

<VeCo> I fixed your code to work with CS/CZ bots, to work you need have cs_ham_bots_api include and plugin.

PHP Code:
/*
---------------------------------------------------------
   #  #  #    #===    ###    ##    #
  #    ##     #===   #      #  #    #
   #   #      #===    ###    ##    #
---------------------------------------------------------
Gib Death 2.1

Plugin made by <VeCo>
Special thanks to:
 - IMBA : for removing the death bodies.
 - hateYou : for the optimization
 - papyrus_kn : for the video of the plugin
 - alan_el_more : for using Ham_Spawn instead of ResetHUD
 - Nextra : for the optimization
 - Arkshine : for fixing the bugs in version 1.7 and HLSDK
          constants

If you modify the code, please DO NOT change the author!
---------------------------------------------------------
Contacts:
e-mail: [email protected]
skype: veco_kn
---------------------------------------------------------
Changes log:
 -> v 1.0 = First release!
 -> v 1.1 = Optimization.
 -> v 1.2 = Fixed bug with spectators.
         Fixed bug with some of materials.
            Plugin needs fun module.
        Added two new materials.
 -> v 1.3 = Fixed part of code for removing 
        the death bodies.
        Plugin doesn't needs engine module.
        Added new material.
 -> v 1.4 = Changed ResetHUD to Ham_Spawn.
            Plugin needs hamsandwich module.
        Removed fun module.
 -> v 1.5 = Optimization.
            Added new material.
 -> v 1.6 = Added CVAR for changing the spread of the gibs.
            Optimization.
        Added new material.
 -> v 1.7 = Fixed a lot of bugs.
        Plugin doesn't need fakemeta module.
        Plugin needs engine and fun modules.
 -> v 2.0 = Rewritten code.
        Added better method for hiding dead bodies.
        CVAR "gib_type" now uses flags, allowing users
        to enable/disable gibs by their own choice.
        Added "gib_count" and "gib_life" CVARs.
        Removed usage of fun module.
        Tweaked gib velocity values a bit.
 -> v 2.1 = Added "Zombie Plague" support (see USE_ZP define).
---------------------------------------------------------
Don't forget to visit http://www.amxmodxbg.org :)
---------------------------------------------------------
*/

#include <amxmodx>
#include <hamsandwich>
#include <cs_ham_bots_api>
#include <engine>

//#define USE_ZP // uncomment this line to use Zombie Plague mode (gib effects apply only to zombies)

#if defined USE_ZP
#include <zombieplague>
#endif

#define BREAK_GLASS       0x01
#define BREAK_METAL       0x02
#define BREAK_FLESH       0x04
#define BREAK_WOOD        0x08
#define BREAK_CONCRETE    0x40

new const g_sz_Const_GibModels[][] =
{
    
"models/hgibs.mdl",
    
"models/glassgibs.mdl",
    
"models/woodgibs.mdl",
    
"models/metalplategibs.mdl",
    
"models/cindergibs.mdl",
    
"models/ceilinggibs.mdl",
    
"models/computergibs.mdl",
    
"models/rockgibs.mdl",
    
"models/bookgibs.mdl",
    
"models/garbagegibs.mdl",
    
"models/bonegibs.mdl",
    
"models/cactusgibs.mdl",
    
"models/webgibs.mdl"
}

new const 
g_i_Const_GibMaterials[sizeof g_sz_Const_GibModels] =
{
    
BREAK_FLESH,
    
BREAK_GLASS,
    
BREAK_WOOD,
    
BREAK_METAL,
    
BREAK_CONCRETE,
    
BREAK_CONCRETE,
    
BREAK_METAL,
    
BREAK_CONCRETE,
    
BREAK_FLESH,
    
BREAK_FLESH,
    
BREAK_FLESH,
    
BREAK_WOOD,
    
BREAK_FLESH
}

new 
g_i_CacheGibsMdl[sizeof g_sz_Const_GibModels],
g_i_CacheAvailableGibs[sizeof g_sz_Const_GibModels],g_i_CacheAvailableNum,
g_p_Cvar_GibType,g_p_Cvar_GibSpread,g_p_Cvar_GibCount,g_p_Cvar_GibLife
public plugin_precache() for(new i=0;i<sizeof g_sz_Const_GibModels;i++) g_i_CacheGibsMdl[i] = precache_model(g_sz_Const_GibModels[i])

public 
plugin_init()
{
    
register_plugin("Gib Death","2.1","<VeCo>")
    
    
    
g_p_Cvar_GibType register_cvar("zp_gib_type","a")
    
g_p_Cvar_GibSpread register_cvar("zp_gib_spread","10")
    
g_p_Cvar_GibCount register_cvar("zp_gib_count","20")
    
g_p_Cvar_GibLife register_cvar("zp_gib_life","30")
    
    
    
register_logevent("LogEvent_RoundStart",2,"1=Round_Start")
    
    
RegisterHam(Ham_Killed,"player","HamHook_Player_Killed_Post",1)
    
RegisterHamBots(Ham_Killed"HamHook_Player_Killed_Post",1)
    
#if !defined USE_ZP
    
set_msg_block(get_user_msgid("ClCorpse"), BLOCK_SET)
#else
    
register_message(get_user_msgid("ClCorpse"),"MessageHook_ClCorpse")
#endif
}

public 
LogEvent_RoundStart()
{
    
g_i_CacheAvailableNum 0
    
    
    
new sz_CacheCvar_Type[42]
    
get_pcvar_string(g_p_Cvar_GibTypesz_CacheCvar_Type,charsmax(sz_CacheCvar_Type))
    
    new 
i_CacheCvar_StrLen strlen(sz_CacheCvar_Type)
    
    
    for(new 
i=0;i<i_CacheCvar_StrLen;i++)
    {
        if(
sz_CacheCvar_Type[i] > 'm' || sz_CacheCvar_Type[i] < 'a') continue
        
        
g_i_CacheAvailableGibs[g_i_CacheAvailableNum++] = sz_CacheCvar_Type[i] - 'a'
    
}
}

public 
HamHook_Player_Killed_Post(id/*,killer,shouldgib*/)
{
#if defined USE_ZP
    
if(!zp_get_user_zombie(id)) return HAM_IGNORED
#endif
    
    
entity_set_int(id,EV_INT_effects,entity_get_int(id,EV_INT_effects) | EF_NODRAW)
    
    
    new 
i_GetGib g_i_CacheAvailableGibs[(g_i_CacheAvailableNum>1) ? random(g_i_CacheAvailableNum) : 0]
    
    
    new 
i_v_Origin[3]
    
get_user_origin(id,i_v_Origin)
    
    
message_begin(MSG_PVS,SVC_TEMPENTITYi_v_Origin)
    {
        
write_byte(TE_BREAKMODEL)
        
        
write_coord(i_v_Origin[0])
        
write_coord(i_v_Origin[1])
        
write_coord(i_v_Origin[2] + 16)
        
        
write_coord(32)
        
write_coord(32)
        
write_coord(32)
        
        
write_coord(0)
        
write_coord(0)
        
write_coord(25)
        
        
write_byte(get_pcvar_num(g_p_Cvar_GibSpread))
        
        
write_short(g_i_CacheGibsMdl[i_GetGib])
        
        
write_byte(get_pcvar_num(g_p_Cvar_GibCount))
        
write_byte(get_pcvar_num(g_p_Cvar_GibLife))
        
        
write_byte(g_i_Const_GibMaterials[i_GetGib])
    }
    
message_end()
    
    return 
HAM_HANDLED
}

#if defined USE_ZP
public MessageHook_ClCorpse(msgid,msgdest,id) return zp_get_user_zombie(get_msg_arg_int(12))
#endif 
__________________









Last edited by CrazY.; 10-05-2015 at 16:04.
CrazY. is offline
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 09:02.


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