I don't know if this has ever been solved, but its possible by poking around in the m_fFlags of the client.
m_flDefuseCountDown of the planted_C4 entity seems to store the point in GameTime, when the player started to defuse. It it is 0 after planting, and it is 0 again if the CT aborts the defusal.
Setting m_flDefuseCountDown of the planted_C4 entity to *doesnt matter what* defuses the bomb instantly. WTF??
m_flDefuseLength is obvious, but changes to it have no effect to the bomb or the defusing process whatsoever.
So it seems we are left with this:
PHP Code:
public bomb_begindefuse(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(!May_defuse)
{
SetEntProp(client, Prop_Send, "m_fFlags", 8);
PrintHintText(client, "You are not fulfilling the requirements to defusing");
}
else
{
SetEntProp(client, Prop_Send, "m_fFlags", 1);
}
}
However this introduces a stupid looking and sounding glitch. The defusal is started and stopped until the player let go of the use key.
There doesn't seem to be any other way.
(Setting the Flags to 1 when he may defuse is important, otherwise the player must jump one time before another try will succeed)
__________________