With '
SDKHook_PostThink' & 'SetEntProp(client, Prop_Send, "m_bInBombZone", 1);' I'm able to create a bombzone.
So I can plant the bomb. But I can't defuse such a planted bomb.
I found '
SetEntProp(client, Prop_Send, "m_bInNoDefuseArea", 1/0);' but can't get it work.
Also found and tried to force: '
SetEntProp(client, Prop_Send, "m_bIsDefusing", 1);'.
I also tried to create and fire the events "bomb_begindefuse" & "bomb_defused" without success.
PHP Code:
#include <sourcemod>
#include <sdkhooks>
bool bBomb[MAXPLAYERS+1] = {true, ...};
public void OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_PostThink, OnPostThink);
}
public void OnPostThink(int client)
{
if (bBomb[client])
{
SetEntProp(client, Prop_Send, "m_bInBombZone", 1);
SetEntProp(client, Prop_Send, "m_bInNoDefuseArea", 0); // also tested '1'
}
}
PHP Code:
Event event = CreateEvent("bomb_begindefuse", true);
SetEventInt(event, "userid", GetClientOfUserId(client));
SetEventBool(event, "haskit", true);
FireEvent(event,true);
any ideas?
__________________