on map
hey alliedmodders, How do I make the plugin work only on specific maps? ( i do not mean make cfg files). i want something like this :
Code:
if(map("de_" , "fy_") return Plugin_Handled; |
Re: on map
Quote:
PHP Code:
|
Re: on map
Quote:
_____________________________________________ ____________ @MacL, this is a Scripting Help question so you should post things like this in Scripting Help in the future. You would use get_mapname() and equal() to compare only the first X number of characters (because both examples given only have 3 characters, you would set argument 'c' to 3). If you have differing sizes of prefixes, you may want to consider breaking the string with something like strtok() using the underscore as a tocken and comparing the first result to your prefixes. _____________________________________________ ____________ For others who might want it: No plugin code modification required, simply configure the plugin to only load on the maps you want: https://wiki.alliedmods.net/Configur...ecific_Plugins |
Re: on map
Spoiler
Edit: If you want to start plugins on specific map type: 1. Go to addons/amxmodx/configs/maps (if the folder haven't exists, create it) 2. create the file with the name like plugins-fy.ini (replace fy with any prefix of the map like de, cs,...) 3. Input any plugins you want to run on those specific map type. |
Re: on map
Quote:
|
Re: on map
Thank you guys.
|
Re: on map
Quote:
Quote:
|
| All times are GMT -4. The time now is 19:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.