csgo-retakes icon indicating copy to clipboard operation
csgo-retakes copied to clipboard

Players can plant the bomb during pauses

Open Useless39rus opened this issue 7 years ago • 2 comments

During a pause, I can put a bomb.

Expected behavior

The bomb should not be installed during a pause.

Actual behavior

During a pause, I can put a bomb.

Steps to reproduce

  • Plugin version: csgo-retakes build 131
  • Sourcemod version: Sourcemod 1.8 build 6014

P.S. Sorry for my English.

Useless39rus avatar Jun 24 '17 18:06 Useless39rus

You can use SDKHook WeaponCanSwitchTo to block players ability to use bomb Something like this:

SDKHook(client , SDKHook_WeaponCanSwitchTo, CanUse_Func);
public Action CanUse_Func(int client, int ent)
{
	char weapon[20]; 
	if (isPaused() && isFreezeTime() && GetEntityClassname(ent, weapon, sizeof(weapon)) && StrEqual(weapon, "weapon_c4"))
        return Plugin_Handled;
	
    return Plugin_Continue;
} 

But, i think, could be clearer way, cuz you also need to change everyone weapon to something else, if player using bomb at this moment

supaflyENJOY avatar Oct 28 '17 22:10 supaflyENJOY

Or you can just disable voting, hence disable pausing with sv_allow_votes 0. Put it to cfg/sourcemod/retakes/retakes_game.cfg

I don't think you need to pause a retake anyway.

borzaka avatar Sep 03 '19 09:09 borzaka