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

Auto Restart


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
p00h
Guest
Old 06-01-2004 , 20:15   Auto Restart
#1

Restart the game when players have join game.

Code:
#include <amxmodx>

/*
*	Auto Restart Ver1.0
*	by p00h
*	http://p00h.web.infoseek.co.jp
*/

new b_restart = true;

public plugin_init() {
	register_plugin("Auto Restart", "1.0", "p00h");
	
	return PLUGIN_HANDLED;
}

public client_putinserver(id) {

	if(get_playersnum() > 1 && b_restart) {

		set_task(30.0, "restart_round");
		client_print(0, print_chat, ">> Wait for restarting . . .");
		b_restart = false;
	}
	
	return PLUGIN_CONTINUE;
}

public client_disconnect(id) {

	if(get_playersnum() < 2) {
		b_restart = true;
	}
	
	return PLUGIN_HANDLED;
}

public restart_round() {
	server_print("[AMXX] restart this game!!");
	client_print(0, print_chat, ">> Prepare . . .");
	set_cvar_float("sv_restart", 2.0);
	
	return PLUGIN_HANDLED;
}
Attached Files
File Type: zip auto_restart_10.zip (1.0 KB, 117 views)
FroXeN
Senior Member
Join Date: Apr 2004
Location: Freecode is a loser.
Old 06-01-2004 , 20:46  
#2

i believe Statsme does this already and the HLDS does it too...
__________________
Looking for friends!!!

http://Ms-Proxy.Com Join the fun!
FroXeN is offline
Send a message via ICQ to FroXeN
[cTs] Corvette
Senior Member
Join Date: Apr 2004
Old 06-01-2004 , 21:53  
#3

HLDS does, and it's actually kinda annoying, because if there's only 2 people on the server and you rejoin a team to change skins, it restarts the map, lol.
[cTs] Corvette is offline
Closed Thread


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 17:04.


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