csgo-retakes
csgo-retakes copied to clipboard
Players can plant the bomb during pauses
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.
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
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.