AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Disable plugin or command on different map (https://forums.alliedmods.net/showthread.php?t=171093)

matedgo 11-01-2011 12:05

Disable plugin or command on different map
 
how to make plugin or command turn off on some other maps which starts as de_,awp_ for example ?.

Impact123 11-01-2011 12:45

Re: Disable plugin or command on different map
 
GetCurrentMap, StrContains.

Yours sincerely
Impact

neatek1 11-03-2011 04:29

Re: Disable plugin or command on different map
 
PHP Code:

public OnMapStart() 

    new 
String:MapName[128];
    
GetCurrentMap(MapName128);
    if(
StrContains(MapName"de_dust2"false) == -1)
    {
        
ServerCommand("sm plugins unload plugin.smx");
        
ServerCommand("sv_gravity 800");
    }



Powerlord 11-05-2011 03:56

Re: Disable plugin or command on different map
 
I would suggest using a plugin that already does this, such as berni's Map Configs with Prefix Support.

Bacardi 11-05-2011 10:14

Re: Disable plugin or command on different map
 
Unload plugin works, but disable one certain command from plugin going to be difficult.

Antithasys 11-06-2011 17:01

Re: Disable plugin or command on different map
 
OnMapStart() is a bad spot to run that code. Try instead OnAutoConfigsBuffered()


All times are GMT -4. The time now is 02:54.

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