AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Working "No scope only" plugin for CS:GO? (https://forums.alliedmods.net/showthread.php?t=311941)

Obyboby 11-09-2018 07:25

Working "No scope only" plugin for CS:GO?
 
Hi, I'd like to get a plugin to force noscope with scoped weapons DURING WARMUPS.
I am using Dr!fter's Weapon restrict plugin to set warmups, so, whenever a scoped weapon is chosen for warmups, this plugin should disable scoping for the players.
Once the warmup is over, the plugin should revert the scoping to normal.
I've browsed the plugins but they are quite old and most were not working anymore or had unsolved bugs (haven't tested myself, I just based this on the latest posts in each thread).
Thanks!!

HvG Community 11-09-2018 13:50

Re: Working "No scope only" plugin for CS:GO?
 
https://forums.alliedmods.net/showthread.php?t=234863

Above one seem to work and you can then try something like this:

Code:

//Your plugin (Hook round start)

public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
    if(GameRules_GetProp("m_bWarmupPeriod") == 1)
        {
            ServerCommand("sm plugins load noscope.smx")
          }
    if(GameRules_GetProp("m_bWarmupPeriod") == 0)
        {
            ServerCommand("sm plugins unload noscope.smx")
        }
}


Obyboby 11-10-2018 09:12

Re: Working "No scope only" plugin for CS:GO?
 
Quote:

Originally Posted by HvG Community (Post 2623272)
https://forums.alliedmods.net/showthread.php?t=234863

Above one seem to work and you can then try something like this:

Code:

//Your plugin (Hook round start)

public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
    if(GameRules_GetProp("m_bWarmupPeriod") == 1)
        {
            ServerCommand("sm plugins load noscope.smx")
          }
    if(GameRules_GetProp("m_bWarmupPeriod") == 0)
        {
            ServerCommand("sm plugins unload noscope.smx")
        }
}


Damn I totally missed that one plugin, what an idiot. Or I thought I read some comment that it didn't work anymore. My apologies. :oops:
Regarding that additional code, the weapon restrict plugin includes pre and post warmup CFGs, I guess I could just set noscope_enable "1" in prewarmup.cfg and then noscope_enable "0" in postwarmup.cfg.
Testing as soon as the map changes, thanks for your help! :)

HvG Community 11-10-2018 17:32

Re: Working "No scope only" plugin for CS:GO?
 
Get your shit together man!!

Yea that should work aswell :D


All times are GMT -4. The time now is 20:37.

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