Raised This Month: $ Target: $400
 0% 

No C4 crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-21-2015 , 05:42   Re: No C4 crash
Reply With Quote #1

Quote:
Originally Posted by Hartmann View Post
I decided to put this to an apart plugin. It works , if i see no crash i will come with a post.
siriusmd99 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-21-2015 , 08:19   Re: No C4 crash
Reply With Quote #2

Plugin that gave me Hartman works but if no objective is found on map then no end round is happening . So i did the right code :
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>


public plugin_precache()
{
    new 
g_HostageEnt;
    new 
allocHostageEntity engfunc(EngFunc_AllocString"hostage_entity");
    do
    {
        
g_HostageEnt engfunc(EngFunc_CreateNamedEntityallocHostageEntity);
    }
    while( !
pev_valid(g_HostageEnt) );
    
    
engfunc(EngFunc_SetOriging_HostageEntFloat:{0.00.0, -55000.0});
    
engfunc(EngFunc_SetSizeg_HostageEntFloat:{-1.0, -1.0, -1.0}, Float:{1.01.01.0});
    
dllfunc(DLLFunc_Spawng_HostageEnt);
    
    return 
PLUGIN_CONTINUE;
}

public 
plugin_cfg(){
    
RemoveEntity"func_bomb_target" );
    
RemoveEntity"info_bomb_target" );
    
server_cmd("sv_restart 1")
}

RemoveEntity( const szClassName[ ] ){
    new 
szFakeClassName32 ];
    
GetFakeClassNameszClassNameszFakeClassNamecharsmaxszFakeClassName ) );
    
    new 
iEntity = -1;
    while( ( 
iEntity find_ent_by_classiEntityszClassName ) ) )
    {
        
entity_set_stringiEntityEV_SZ_classnameszFakeClassName );
    }
}
GetFakeClassName( const szClassName[ ], szFakeClassName[ ], const iLen ){
    
formatexszFakeClassNameiLen"___%s"szClassName );

siriusmd99 is offline
Hartmann
Senior Member
Join Date: Nov 2014
Old 09-21-2015 , 15:25   Re: No C4 crash
Reply With Quote #3

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

new bool:hostageMade;

public 
plugin_precache()
{
    
register_forward(FM_KeyValue"fwd_KeyValue"1);
}

public 
fwd_KeyValue(entIdkvd_id)
{
    if(!
pev_valid(entId))
        return 
FMRES_IGNORED;
    
    static 
className[64];
    
get_kvd(kvd_idKV_ClassNameclassName63);
    
    if(
containi(className"func_bomb_target") != -1
    
|| containi(className"info_bomb_target") != -)
    
engfunc(EngFunc_RemoveEntityentId);
    
    if(!
hostageMade)
    {
        
hostageMade true;
        new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"hostage_entity"));
        
engfunc(EngFunc_SetOriginentFloat:{0.0,0.0,-55000.0});
        
engfunc(EngFunc_SetSizeentFloat:{-1.0,-1.0,-1.0}, Float:{1.0,1.0,1.0});
        
dllfunc(DLLFunc_Spawnent);
    }
    
    return 
FMRES_HANDLED;

__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx

Hartmann is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-22-2015 , 00:20   Re: No C4 crash
Reply With Quote #4

Thanks hartman. My plugin also works nice . Problem Solved.
siriusmd99 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 22:06.


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