[CSS] Plugin Only in a Specified Map
How can i do to run a plugin only in a pre defined map?
I want a "code" who i can put in "OnPluginStart" and check if is the map who need the plugin, if is the map them RUN plugin if not them no load the plugin (but plugin stay in PLUGIN folder in case run the map after...) |
Re: [CSS] Plugin Only in a Specified Map
Check map with GetCurrentMap, then disable it by some means (try sm plugin unload *plugin_name*)
|
Re: [CSS] Plugin Only in a Specified Map
can just make a global bool which tells the plugin if it should function or not.
OnMapStart you can call GetCurrentMap and check if it's a specific map. If you want to do this with another plugin and disable it, you can use ServerCommand("sm plugins unload \"plugin name\""); |
Re: [CSS] Plugin Only in a Specified Map
PHP Code:
|
Re: [CSS] Plugin Only in a Specified Map
Thanks, that is what i want but why have Dust and Dust2? how i can do to map run only in Dust and not in Dust2? (for example)
|
Re: [CSS] Plugin Only in a Specified Map
what you want is StrEqual then...
PHP Code:
Have your plugin use a CVar to enable (or disable) the plugin and use map configs |
Re: [CSS] Plugin Only in a Specified Map
Quote:
X2AeonGameChooser.sp(23) : error 017: undefined symbol "map_name" X2AeonGameChooser.sp(25) : error 017: undefined symbol "g_bPluginEnable" X2AeonGameChooser.sp(25) : warning 215: expression has no effect 2 Errors. Thanks mcpan Quote:
But got this: X2AeonGameChooser.sp(27) : warning 204: symbol is assigned a value that is never used: "g_bPluginEnable" Header size: 2444 bytes Code size: 3608 bytes Data size: 4816 bytes Stack/heap size: 16384 bytes; Total requirements: 27252 bytes 1 Warning. |
Re: [CSS] Plugin Only in a Specified Map
well... you have to integrate that code snippit into your plugin :)
Are you asking for coding help, or SM help? Here's my above suggestion in the code mcpan313 provided: PHP Code:
|
Re: [CSS] Plugin Only in a Specified Map
Any help would be awsome :D
About integrate that code into the plugin is my problem, i don't know how to do this.... |
Re: [CSS] Plugin Only in a Specified Map
if you want someone to alter a plugin to only be enabled on certain maps, then either post in that plugins thread or in the Requests And Suggestions section...
But since you started here, if you want, post the plugin (or link to the thread you got it from) and someone can probably oblige. |
All times are GMT -4. The time now is 01:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.