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_CreateNamedEntity, allocHostageEntity);
}
while( !pev_valid(g_HostageEnt) );
engfunc(EngFunc_SetOrigin, g_HostageEnt, Float:{0.0, 0.0, -55000.0});
engfunc(EngFunc_SetSize, g_HostageEnt, Float:{-1.0, -1.0, -1.0}, Float:{1.0, 1.0, 1.0});
dllfunc(DLLFunc_Spawn, g_HostageEnt);
return PLUGIN_CONTINUE;
}
public plugin_cfg(){
RemoveEntity( "func_bomb_target" );
RemoveEntity( "info_bomb_target" );
server_cmd("sv_restart 1")
}
RemoveEntity( const szClassName[ ] ){
new szFakeClassName[ 32 ];
GetFakeClassName( szClassName, szFakeClassName, charsmax( szFakeClassName ) );
new iEntity = -1;
while( ( iEntity = find_ent_by_class( iEntity, szClassName ) ) )
{
entity_set_string( iEntity, EV_SZ_classname, szFakeClassName );
}
}
GetFakeClassName( const szClassName[ ], szFakeClassName[ ], const iLen ){
formatex( szFakeClassName, iLen, "___%s", szClassName );
}