Raised This Month: $ Target: $400
 0% 

My Map Changing Plugin for TS.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 05-30-2007 , 21:11   Re: My Map Changing Plugin for TS.
Reply With Quote #6

I used this in one of my plugins that ends the map if you use amx_extend -x where x is greater than the time remaining. I believe I may have originally taken some code from the original amx_map command.

Code:
if (invtlimit * 60 >= get_timeleft()) {     client_print(id,print_console, "%s You have ended the map.", TAG)     client_print(0,print_chat, "%s %s has ended the map.", TAG, name)         //server_cmd("amx_map %s", get_cvar_string("amx_nextmap"))                  //make a note of this message to display the     //scoreboard as if the map was ending normally     message_begin(MSG_ALL, SVC_INTERMISSION)     message_end()     set_task(2.0, "change_map")         return PLUGIN_HANDLED } public change_map() {     new nextmap[32]     get_cvar_string("amx_nextmap", nextmap, 31)     server_cmd("changelevel %s", nextmap) }

Last edited by Lee; 05-30-2007 at 21:13.
Lee is offline
 



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 10:38.


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