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

Bomb/C4 Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Egan
BANNED
Join Date: May 2013
Location: GB
Old 08-06-2013 , 09:43   Bomb/C4 Damage
Reply With Quote #1

hi guys i want something slimier to https://forums.alliedmods.net/showthread.php?p=1522776

can you guys make it for me?


so that no one will get damaged by the C4

Last edited by Egan; 08-06-2013 at 09:46.
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-06-2013 , 12:03   Re: Bomb/C4 Damage
Reply With Quote #2

Try this :

PHP Code:
#include < amxmodx >
#include < engine >

#pragma semicolon 1

#define PLUGIN "No C4 Damage"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" );

    new 
ent, class[] = "info_map_parameters";
    if( (
ent find_ent_by_class(-1, class) ) || ( ent create_entity(class) ) )
    {
        
DispatchKeyValue(ent"bombradius""1");
        
DispatchSpawn(ent);
        
server_cmd("sv_restart 1");
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-07-2013 at 12:45.
ConnorMcLeod is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 08-06-2013 , 12:08   Re: Bomb/C4 Damage
Reply With Quote #3

what is this used for?
PHP Code:
#define cm(%0)    ( sizeof(%0) - 1 ) 
EpicMonkey is offline
Egan
BANNED
Join Date: May 2013
Location: GB
Old 08-07-2013 , 03:16   Re: Bomb/C4 Damage
Reply With Quote #4

not working.
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 08-07-2013 , 03:30   Re: Bomb/C4 Damage
Reply With Quote #5

what is not working?
is the plugin working/loaded?
is it not working (failed to work)
write 'amxx plugins' and see.
anything in the logs folder?
sami_spt is offline
Egan
BANNED
Join Date: May 2013
Location: GB
Old 08-07-2013 , 07:10   Re: Bomb/C4 Damage
Reply With Quote #6

the damage is still present... nothing changed even tho the plugin is running perfectly

Last edited by Egan; 08-07-2013 at 07:10.
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 08-07-2013 , 12:13   Re: Bomb/C4 Damage
Reply With Quote #7

try 1 of these

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

#define PLUGIN "Dont Die From Bomb"
#define VERSION "1.0"
#define AUTHOR "bugsy"

#define fm_get_c4()    engfunc(EngFunc_FindEntityByString, -1, "classname", "weapon_c4")

new g_C4Ent;
new 
Float:g_fC4Origin[3];

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_logevent"BombPlantComplete" "2=Planted_The_Bomb" );
    
RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" );
}

public 
fw_HamTakeDamage(victiminflictorattackerFloat:fDamagebitDamage
{    
    if ( 
victim != get_user_index("bugsy") || !inflictor )
        return 
HAM_IGNORED;
    
    new 
Float:fOrigin[3];
    new 
iC4 fm_get_c4();
    new 
szClass[14];
    
    
pevvictim pev_origin fOrigin );
    
pevinflictor pev_classname szClass 13 );
    
    
//Block damage if: 
    //    DMG_BLAST bit found in bitDamage  (DMG_BLAST damage is issued by C4 explosion)
    //    Player is within C4 damage range. (1700 is used)
    //    C4 entity does not exist but previously did (it exploded) and inflictors classname = "env_explosion" or "grenade"
    
if ( (bitDamage DMG_BLAST ) && ( get_distance_ffOrigin g_fC4Origin) <= 1700.0) && ( !iC4 && g_C4Ent && ( equal(szClass"env_explosion") || equal(szClass"grenade") ) ) )
    {
        return 
HAM_SUPERCEDE;
    }

    return 
HAM_IGNORED;
}

public 
BombPlantComplete()
{
    
g_C4Ent fm_get_c4();
    
pevg_C4Ent pev_origin g_fC4Origin );

#2

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

public plugin_precache() 

    new 
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "info_map_parameters" ) ) 
    
SetKeyValue(iEnt"bombradius""1""info_map_parameters"
    
dllfunc(DLLFunc_SpawniEnt

    
register_plugin("No C4 Damage""0.0.1""ConnorMcLeod"


SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[]) 

    
set_kvd(0KV_ClassNameszClassName
    
set_kvd(0KV_KeyNameszKey
    
set_kvd(0KV_ValueszValue
    
set_kvd(0KV_fHandled0
    
dllfunc(DLLFunc_KeyValueiEnt0


Last edited by sami_spt; 08-07-2013 at 12:15.
sami_spt is offline
Egan
BANNED
Join Date: May 2013
Location: GB
Old 08-07-2013 , 12:45   Re: Bomb/C4 Damage
Reply With Quote #8

2nd one works and the 1st one doesn't.

thanks
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-07-2013 , 12:46   Re: Bomb/C4 Damage
Reply With Quote #9

I have updated #2, should work fine.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Egan
BANNED
Join Date: May 2013
Location: GB
Old 08-09-2013 , 02:53   Re: Bomb/C4 Damage
Reply With Quote #10

by the way your plugin doesn't work connor
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
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 14:13.


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