Raised This Month: $32 Target: $400
 8% 

Verify plugin author


Post New Thread Reply   
 
Thread Tools Display Modes
XSlayer
Member
Join Date: Dec 2021
Old 04-11-2022 , 01:35   Re: Verify plugin author
Reply With Quote #21

Quote:
Originally Posted by bigdaddy424 View Post
Added some other stuff,

Code:
#include <amxmodx> // these plugins will be disabled on a public server new public_settings[][] = {     "Weapon Health",     "Migraine",     "Restrict Kills 1.1",     "Admin Hierarchy" } // these plugins will be disabled on a lan server new local_settings[][] = {     "Country On Name",     "HLTV Autorecord",     "AMX SlayAll v1.7",     "Only admins can drop weapons! v1.1" } new iPluginsNum public plugin_cfg(){     iPluginsNum = get_pluginsnum()     if (is_dedicated_server())         settings("Public", public_settings)     else         settings("Local", local_settings) } settings(type[], pause_list[][]){     new filename[32], name[32], run;     for (new i; i < iPluginsNum; i++){         get_plugin(i, filename, charsmax(filename), name, charsmax(name))         if (equal(name, pause_list[i])){             if (is_plugin_loaded(filename, true)){                 run = pause("a", filename)                 if (run)                     server_cmd("%s Settings: %s (%s) paused", type, name, filename)                 else                     server_cmd("%s Settings: %s (%s) could not be paused", type, name, filename)             }             else                 server_cmd("%s Settings: %s (%s) already disabled, skipping", type, name, filename)         }     } }
I'm not sure whether is_plugin_loaded will return true for paused plugins, anyone experienced can confirm this?
i tested it and the plugins still running idk why, no one server cmd has been send it

Last edited by XSlayer; 04-11-2022 at 01:36.
XSlayer is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 04-11-2022 , 02:11   Re: Verify plugin author
Reply With Quote #22

Can you try this
Code:
#include <amxmodx> new Trie:PausePlugins // these plugins will be disabled on a public server new public_settings[][] = {     "Weapon Health",     "Migraine",     "Restrict Kills 1.1",     "Admin Hierarchy" } // these plugins will be disabled on a lan server new local_settings[][] = {     "Country On Name",     "HLTV Autorecord",     "AMX SlayAll v1.7",     "Only admins can drop weapons! v1.1" } new iPluginsNum public plugin_cfg(){     PausePlugins = TrieCreate()     iPluginsNum = get_pluginsnum()     if (is_dedicated_server())         settings("Public", public_settings)     else         settings("Local", local_settings) } public plugin_end()     TrieDestroy(PausePlugins) settings(type[], pause_list[][]){     for (new i; i < sizeof(pause_list); i++)          TrieSetCell(PausePlugins, pause_list[i], 1)     new filename[32], name[32], run;     for (new j; j < iPluginsNum; j++){         get_plugin(j, filename, charsmax(filename), name, charsmax(name))         if (TrieKeyExists(PausePlugins, name)){             if (is_plugin_loaded(filename, true)){                 run = pause("a", filename)                 if (run)                     server_print("%s Settings: %s (%s) paused", type, name, filename)                 else                     server_print("%s Settings: %s (%s) could not be paused", type, name, filename)             }             else                 server_print("%s Settings: %s (%s) already disabled, skipping", type, name, filename)             TrieDeleteKey(PausePlugins, name)         }         server_print("%s does not match %s from id(%d), skipping", pause_list[j], name, j)     } }
bigdaddy424 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 11:25.


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