Raised This Month: $51 Target: $400
 12% 

Revert to de_dust2 when server is empty.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
couldbepurplecouldbepink
Member
Join Date: Aug 2011
Old 06-20-2013 , 12:36   Revert to de_dust2 when server is empty.
Reply With Quote #1

Revert to de_dust2 when server is empty.

Title says it all. I've searched and searched, but came up empty handed. Can such plugin be made or did I miss one that is already made?
couldbepurplecouldbepink is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-20-2013 , 12:57   Re: Revert to de_dust2 when server is empty.
Reply With Quote #2

Untested
Code:
#include < amxmodx > #include < amxmisc > new g_pluginInformations[ 3 ][ ] = {     "Rever to map",     "1.0",     "De{a}gLe" } new g_maxClients; new g_pMapName, g_pMinClients; public plugin_init( ) {     register_plugin( g_pluginInformations[ 0 ], g_pluginInformations[ 1 ], g_pluginInformations[ 2 ] );         g_pMapName = register_cvar( "amx_rtm_mapname", "de_dust2" );     g_pMinClients = register_cvar( "amx_rtm_minclients", "0" );         g_maxClients = get_maxplayers( );         set_task( 60.0, "taskCheckClients", 0, _, _, "b" ); } public taskCheckClients( ) {     new minClients = get_pcvar_num( g_pMinClients );     if( g_maxClients <= minClients )     {         static mapName[ 32 ];         get_pcvar_string( g_pMapName, mapName, sizeof mapName - 1 );                 server_cmd( "amx_map %s", mapName );            log_amx( "[AMX][RTM] Map changed to %s (Clients %d/%d).", mapName, minClients, g_maxClients );     } }
TheDS1337 is offline
couldbepurplecouldbepink
Member
Join Date: Aug 2011
Old 06-20-2013 , 13:06   Re: Revert to de_dust2 when server is empty.
Reply With Quote #3

Damn Deagle that was fast. I'll test it and post back the results. Thanks for your help.
couldbepurplecouldbepink is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 06-20-2013 , 16:53   Re: Revert to de_dust2 when server is empty.
Reply With Quote #4

Useless alterations.

Code:
new g_pluginInformations[ 3 ][ ] = {     "Rever to map",     "1.0",     "De{a}gLe" }

Code:
register_plugin( g_pluginInformations[ 0 ], g_pluginInformations[ 1 ], g_pluginInformations[ 2 ] );
EpicMonkey is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 06-20-2013 , 17:05   Re: Revert to de_dust2 when server is empty.
Reply With Quote #5

EpicMonkey,coding style
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-20-2013 , 17:09   Re: Revert to de_dust2 when server is empty.
Reply With Quote #6

http://forums.alliedmods.net/showthread.php?p=194690
http://forums.alliedmods.net/showthread.php?p=52535

Also, this is a feature from galileo plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 18:13.


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