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

[DODS] Disable Flag Captures/Points


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tactical Sharts
New Member
Join Date: Dec 2015
Old 10-04-2022 , 11:58   [DODS] Disable Flag Captures/Points
Reply With Quote #1

I'm looking for a plugin that disables flag captures/points on any map. All plugins relating to this feature are mostly for TF2 and did not work when testing on my server.

Last edited by Tactical Sharts; 10-04-2022 at 11:58.
Tactical Sharts is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-04-2022 , 18:05   Re: [DODS] Disable Flag Captures/Points
Reply With Quote #2

*updated
- reset all capture points, set "Flag of the United Kingdom" 🇬🇧 🇬🇧


Here quick version...

This not reset home flags, need look another day.
- If try use entity input "SetOwner", it crash server. :/

PHP Code:

#include <sdktools>

#define CAP_POINT_TICK_FOR_BOMBS_REMAINING    (1<<2)

public void OnPluginStart()
{
    
HookEventEx("dod_round_start"dod_round_start);
}

public 
void dod_round_start(Event event, const char[] namebool dontBroadcast)
{
    
CreateTimer(1.0delay);
}

public 
Action delay(Handle timer)
{
    
int entity = -1;
    
    while((
entity FindEntityByClassname(entity"dod_capture_area")) != -1)
    {
        
AcceptEntityInput(entity"Disable");
        
//PrintToServer("dod_capture_area %i", entity);
    
}
    
    
entity FindEntityByClassname(-1"dod_control_point_master");

    if(
entity != -1)
        
AcceptEntityInput(entity"Disable");

    
    
entity FindEntityByClassname(-1"dod_objective_resource");

    if(
entity != -1)
    {
        
int count GetEntPropArraySize(entityProp_Send"m_iOwner");
        
        for(
int x 0countx++)
        {
            
//PrintToServer("x %i = m_iOwner %i", x, GetEntProp(entity, Prop_Send, "m_iOwner", _, x));
            
SetEntProp(entityProp_Send"m_iOwner"0_x);
            
SetEntProp(entityProp_Send"m_iBombsRequired"0_x);
            
SetEntProp(entityProp_Send"m_iBombsRemaining"0_x);
            
SetEntProp(entityProp_Send"m_bBombBeingDefused"0_x);
        }
    }


    
entity = -1;

    while((
entity FindEntityByClassname(entity"dod_control_point")) != -1)
    {
        
//PrintToServer("dod_control_point %i", entity);
        
SetVariantInt(2);
        
AcceptEntityInput(entity"SetBodyGroup");
        
        
SetEntProp(entityProp_Data"m_iBombsRequired"0);
        
        
int flags GetEntProp(entityProp_Data"m_spawnflags");
        
flags &= ~CAP_POINT_TICK_FOR_BOMBS_REMAINING;
        
SetEntProp(entityProp_Data"m_spawnflags"flags);
    }


    
entity = -1;

    while((
entity FindEntityByClassname(entity"dod_bomb_target")) != -1)
    {
        
//PrintToServer("dod_bomb_target %i", entity);
        
AcceptEntityInput(entity"Disable");
    }

    
entity = -1;

    while((
entity FindEntityByClassname(entity"dod_bomb_dispenser")) != -1)
    {
        
//PrintToServer("dod_bomb_dispenser %i", entity);
        
AcceptEntityInput(entity"Disable");
    }

    return 
Plugin_Continue;

__________________
Do not Private Message @me

Last edited by Bacardi; 10-05-2022 at 13:02. Reason: update
Bacardi is offline
Reply



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 04:47.


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