AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pause question (https://forums.alliedmods.net/showthread.php?t=22070)

commonbullet 12-17-2005 23:37

pause question
 
Is it possible to pause server and keep the script running?

I saw an interesting solution in a plugin - it would remove keybinds of players movements. I was wondering if there's a "cleaner" way to do that.

Charr 12-18-2005 21:11

Like the pause with the default amx commands?

commonbullet 12-20-2005 08:43

I guess amx_pause will also prevent the script from running.
Is that right?

Charr 12-20-2005 12:22

amx_pause doesn't stop any plugin from running, because it just immobilizes all the players ingame, but they can still chat and use console commands.

commonbullet 12-20-2005 20:06

all right,
I'll try that.
thanks.

VEN 12-22-2005 11:59

Quote:

Originally Posted by Charr
they can still chat

That's incorrect.
Players can't chat while server is paused.

MaximusBrood 12-22-2005 13:21

Quote:

Originally Posted by VEN
Quote:

Originally Posted by Charr
they can still chat

That's incorrect.
Players can't chat while server is paused.

If you use amx_pause they still can chat (tested it 2 minutes ago ;) )

VEN 12-22-2005 15:11

I tested it to and my tests shows that they can't chat. :/

commonbullet 12-22-2005 21:05

I've made the following test:

Code:
#include <amxmodx> #include <amxmisc> new counter public plugin_init() {      register_clcmd ("amx_pausetest","counter_start") } public counter_start(){     set_task (1.0,"counter_inc1",0)     return PLUGIN_HANDLED } public counter_inc1(){      counter ++     server_print ("counter %d",counter)     set_task (1.0,"counter_inc2",0)     set_pause() } public counter_inc2(){     counter ++     server_print ("counter %d",counter)     set_task (1.0,"counter_inc1",0)     set_pause() } public set_pause (){     if (counter == 3 || counter == 5) //3 should pause, 5 should unpause         server_cmd("amx_pause")             return PLUGIN_CONTINUE }

I've observed that:
- When the counter is 3 the server is paused, but the script will not run anymore (the counter stops)
- when the server is paused you can send chat messages.

So I guess you can't control an 'amx_paused' server through script.


All times are GMT -4. The time now is 15:52.

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