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

Disable plugin or command on different map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
matedgo
SourceMod Donor
Join Date: Apr 2011
Old 11-01-2011 , 12:05   Disable plugin or command on different map
Reply With Quote #1

how to make plugin or command turn off on some other maps which starts as de_,awp_ for example ?.
matedgo is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 11-01-2011 , 12:45   Re: Disable plugin or command on different map
Reply With Quote #2

GetCurrentMap, StrContains.

Yours sincerely
Impact
__________________
Impact123 is offline
neatek1
Member
Join Date: May 2011
Old 11-03-2011 , 04:29   Re: Disable plugin or command on different map
Reply With Quote #3

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");
    }


Last edited by neatek1; 11-03-2011 at 04:29.
neatek1 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-05-2011 , 03:56   Re: Disable plugin or command on different map
Reply With Quote #4

I would suggest using a plugin that already does this, such as berni's Map Configs with Prefix Support.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 11-05-2011 at 03:57.
Powerlord is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-05-2011 , 10:14   Re: Disable plugin or command on different map
Reply With Quote #5

Unload plugin works, but disable one certain command from plugin going to be difficult.
Bacardi is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 11-06-2011 , 17:01   Re: Disable plugin or command on different map
Reply With Quote #6

OnMapStart() is a bad spot to run that code. Try instead OnAutoConfigsBuffered()
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
Reply


Thread Tools
Display Modes

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 02:14.


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