AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Auto Quit (https://forums.alliedmods.net/showthread.php?t=208453)

FailOverFlow 02-13-2013 14:49

Auto Quit
 
Hello guys! I need help with creating Auto Quit plugin.
The idea is:
if server is empty for 20 minutes it automatically shutdown.
But i don't have idea how to make this plugin.

Help me, please.

jimaway 02-13-2013 15:00

Re: Auto Quit
 
Code:
#include <amxmodx> public client_disconnect(id) if (!get_playersnum(1)) set_task(60.0 * 20.0, "task_shutdown", 666) public client_connect(id) if (task_exists(666)) remove_task(666) public task_shutdown() server_cmd("quit")

FailOverFlow 02-13-2013 15:07

Re: Auto Quit
 
jimaway, thank you.


All times are GMT -4. The time now is 20:36.

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