Raised This Month: $51 Target: $400
 12% 

[csgo] defuse a bomb planted outside a default map bombspot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 08-12-2017 , 18:46   [csgo] defuse a bomb planted outside a default map bombspot
Reply With Quote #1

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(clientSDKHook_PostThinkOnPostThink);
}

public 
void OnPostThink(int client)
{
    if (
bBomb[client])
    {
        
SetEntProp(clientProp_Send"m_bInBombZone"1);
        
SetEntProp(clientProp_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?
__________________
coding & free software

Last edited by shanapu; 08-12-2017 at 18:49. Reason: format / readability
shanapu is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode