Raised This Month: $ Target: $400
 0% 

Auto Quit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FailOverFlow
Member
Join Date: Feb 2012
Location: USA, Detroit
Old 02-13-2013 , 14:49   Auto Quit
Reply With Quote #1

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.
FailOverFlow is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 02-13-2013 , 15:00   Re: Auto Quit
Reply With Quote #2

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")

Last edited by jimaway; 02-13-2013 at 15:05.
jimaway is offline
FailOverFlow
Member
Join Date: Feb 2012
Location: USA, Detroit
Old 02-13-2013 , 15:07   Re: Auto Quit
Reply With Quote #3

jimaway, thank you.
FailOverFlow is offline
Reply



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 20:36.


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