Raised This Month: $30 Target: $400
 7% 

Pause/Unpause sourcemod plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
safetymoose
Senior Member
Join Date: Feb 2015
Old 05-09-2020 , 10:55   Pause/Unpause sourcemod plugins
Reply With Quote #1

AMXX has functions that can pause/unpause plugins allowing for certain plugins to be loaded when needed and unloaded when not. Does sourcemod have equivalent functions?
safetymoose is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-09-2020 , 11:19   Re: Pause/Unpause sourcemod plugins
Reply With Quote #2

...no?

You can do it with cvar
or sm plugins unload/load

*edit
or https://wiki.alliedmods.net/Function...Mod_Scripting)

Last edited by Bacardi; 05-09-2020 at 11:21.
Bacardi is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 05-09-2020 , 11:32   Re: Pause/Unpause sourcemod plugins
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
...no?
That's so weird. I found this in the include
PHP Code:
/**
 * Called when the plugin's pause status is changing.
 *
 * @param pause         True if the plugin is being paused, false otherwise.
 */
forward void OnPluginPauseChange(bool pause); 
But i dont see a way to change the plugin's pause status.

Quote:
Originally Posted by Bacardi View Post
You can do it with cvar
or sm plugins unload/load
Would ServerCommand() do the trick here? I guess it should work, but it's gonna look crude.

Quote:
Originally Posted by Bacardi View Post
I'm familiar with natives and forwards, they have a different purpose tho.

Last edited by safetymoose; 05-09-2020 at 11:39.
safetymoose is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 05-09-2020 , 12:01   Re: Pause/Unpause sourcemod plugins
Reply With Quote #4

Quote:
Originally Posted by Bacardi View Post
sm plugins unload/load
I guess i'll have to go with that, unless there's a better way.
safetymoose is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-09-2020 , 12:50   Re: Pause/Unpause sourcemod plugins
Reply With Quote #5

Dunno, what purpose that OnPluginPauseChange. Could it be in those "benchmarks"

*edit
read from hear, https://github.com/alliedmodders/sou...inSys.cpp#L584

*edit
could be it for extension ?
__________________
Do not Private Message @me

Last edited by Bacardi; 05-09-2020 at 12:53.
Bacardi is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 05-09-2020 , 15:15   Re: Pause/Unpause sourcemod plugins
Reply With Quote #6

I think it's not implemented(yet).

https://github.com/alliedmodders/sou...re.inc#L86-L87

I'm gonna stick to the method you posted. Thanks.
safetymoose is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 05-09-2020 , 18:04   Re: Pause/Unpause sourcemod plugins
Reply With Quote #7

Quote:
Originally Posted by safetymoose View Post
I think it's not implemented(yet).
The opposite. Pausing was removed a few years ago.
Fyren 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 00:56.


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