Try this:
Code:
#include <amxmodx>
#include <fun>
new bool:g_bExplode
public plugin_init()
{
register_plugin("End Round Protect", "0.1", "zmd94")
register_logevent("RoundStart", 2, "1=Round_Start")
register_logevent("Bomb_Explode", 6, "3=Target_Bombed")
register_logevent("RoundEnd", 2, "1=Round_End")
}
public RoundStart()
{
g_bExplode = false
new iPlayers[32], iPlayerCount, i, iId
get_players(iPlayers, iPlayerCount, "a")
for(i = 0; i < iPlayerCount; i++)
{
iId = iPlayers[i]
set_user_godmode(iId, 0)
}
}
public RoundEnd()
{
if(!g_bExplode)
{
new iPlayers[32], iPlayerCount, i, iId
get_players(iPlayers, iPlayerCount, "a")
for(i = 0; i < iPlayerCount; i++)
{
iId = iPlayers[i]
set_user_godmode(iId, 1)
}
}
}
public Bomb_Explode()
{
g_bExplode = true
}