Raised This Month: $7 Target: $400
 1% 

SM Nextmap Info - Countdown and MapEnd - GunGame Support


Post New Thread Reply   
 
Thread Tools Display Modes
Author
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Plugin ID:
532
Plugin Version:
1.9
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Prints the nextmap on map end. With Countdown and MapEnd. And GunGame Support.
    Old 08-29-2008 , 17:22   SM Nextmap Info - Countdown and MapEnd - GunGame Support
    Reply With Quote #1

    SM Nextmap Info

    Version: 1.9
    Author: SWAT_88

    1.0 First version, should work on basically any mod.
    1.1 Added RoundEnd support.
    1.2 Added Cvar for number of repetitions.
    1.3 Added Timeleft-Check.
    1.4 Fixed some bugs.
    1.5 Added some features:
    countdown
    different text locations
    1.6 Added support for GunGame & Co
    1.7 Fixed a small bug.
    1.8 Fixed a bug, should now work on any mod.
    1.9 Using the map end routine from sm_forcetimelimit.

    Description:
    Prints the nextmap on map end.
    After changing a ConVar change the map to reload the plugin!
    SideNote: This plugins supports all GameMods, but if you want to use the exec option only Counter-Strike:Source, DoD:Source, and some others are supported.
    Commands:
    None.
    Cvars:
    sm_nextmapinfo_enabled "1" - 0: disables the plugin - 1: enables the plugin

    sm_nextmapinfo_loop "5" - x: How often the message should be repeated. SideNote: Only available if msgtype = chat.

    sm_nextmapinfo_roundend "1" - 1: Displays the message after the last round OR after GunGame Ends - 0: Displays the message after the time expires.

    sm_nextmapinfo_msgtype "1" - MsgType for Nextmap Msg - 0: disable - 1: Chat - 2: Panel - 3: BottomCenter - 4: left upper corner

    sm_nextmapinfo_ctype "3" - MsgType for Countdown - 0: disable - 1: Chat - 2: Panel - 3: BottomCenter

    sm_nextmapinfo_countdown "0" - 0: disables the countdown - 1: enables it. SideNote: Use exec 1, otherwise this option makes no sense ...

    sm_nextmapinfo_exec "0" - 0: don't execute MapEnd after time expired - 1: execute MapEnd after time expired. - Use roundend 1, otherwise you get no msg.
    Cvars (basetriggers.smx):
    sm_timeleft_interval "0.0" Display timeleft every x seconds.
    Setup (SourceMod):
    Install the smx file to addons\sourcemod\plugins.
    (Re)Load Plugin or change Map.
    TO DO:
    • Nothing.
    Copyright:
    Everybody can edit this plugin and copy this plugin.
    Thanks to:
    Tsunami for the map end routine.
    teame06 for EnforceTheTimeLimit and RoundEndFlag.
    BAILOPAN / ferret for tsay and timebomb.
    zerak for bug finding
    Donations:
    I'm a student and code this plugins in my freetime, while you probably play games .
    If you like my work, kindly make a donation via PayPal.
    Feel free to donate whatever amount you like.

    Thank you for supporting this plugin!
    Don't forget to support SourceMod too.
    Consider: Without SourceMod none of these plugins would exist!
    Notice: This


    HAVE FUN!!!
    Attached Files
    File Type: zip SM Nextmap Info.zip (10.1 KB, 3558 views)
    File Type: sp Get Plugin or Get Source (sm_nextmapinfo.sp - 3864 views - 9.9 KB)
    File Type: sp Get Plugin or Get Source (sm_nextmapinfo_v1.9.sp - 1888 views - 9.5 KB)
    __________________

    Last edited by SWAT_88; 08-28-2012 at 09:52.
    SWAT_88 is offline
    zerak
    Senior Member
    Join Date: Feb 2008
    Old 08-29-2008 , 17:38   Re: SM Nextmap Info
    Reply With Quote #2

    Just a brainstorm:

    There is a lot more conditions and commands that could lead to a new map, you could add those (take a look at mapchooser for other events that can cause mapchange including special cases like bonus round/time) then you could also try to hook on commands that cause change (like nextmap).

    By looking at the code slightly I can't see a test if the round is the last (winlimit or round limit).

    for clarification, what is the purpose of "sm_nextmapinfo_loop" ?
    zerak is offline
    GyroTarzan
    Member
    Join Date: Feb 2007
    Location: Sweden
    Old 08-29-2008 , 17:41   Re: SM Nextmap Info
    Reply With Quote #3

    Can you add a countdown the last seconds in a map?
    Like: 10,9,8,7,6,5,4,3,2,1, map-change to mapname.
    __________________
    Best regards
    GyroTarzan
    GyroTarzan is offline
    Send a message via ICQ to GyroTarzan Send a message via MSN to GyroTarzan
    MaKTaiL
    Senior Member
    Join Date: Jul 2008
    Location: Brazil
    Old 08-29-2008 , 17:54   Re: SM Nextmap Info
    Reply With Quote #4

    Oh my god. You saved my day today. Thank you very much.

    Back then I asked someone for as plugin like this and (somehow) you heard me. XDDD

    I will download it right now! And I have a question: The sm_nextmapinfo_loop is in seconds or minutes?

    [REQ]

    Is there a way to specify where the message is going to appear? I want it to show on top left.

    Last edited by MaKTaiL; 08-29-2008 at 18:04.
    MaKTaiL is offline
    MaKTaiL
    Senior Member
    Join Date: Jul 2008
    Location: Brazil
    Old 08-29-2008 , 18:07   Re: SM Nextmap Info
    Reply With Quote #5

    Quote:
    Originally Posted by GyroTarzan View Post
    Can you add a countdown the last seconds in a map?
    Like: 10,9,8,7,6,5,4,3,2,1, map-change to mapname.
    That would be a nice addition
    MaKTaiL is offline
    SWAT_88
    SourceMod Donor
    Join Date: Jan 2008
    Location: Austria
    Old 08-29-2008 , 18:38   Re: SM Nextmap Info
    Reply With Quote #6

    Quote:
    Originally Posted by zerak View Post
    Just a brainstorm:

    There is a lot more conditions and commands that could lead to a new map, you could add those (take a look at mapchooser for other events that can cause mapchange including special cases like bonus round/time) then you could also try to hook on commands that cause change (like nextmap).
    I already included special cases like bonus round/time.
    I also included timeleft hook.
    If you think there are more events I will look for them.
    Quote:
    Originally Posted by zerak View Post
    By looking at the code slightly I can't see a test if the round is the last (winlimit or round limit).
    info is a global variable and it's only set true if time is over.
    (Test it or look at the code closer)
    Quote:
    Originally Posted by zerak View Post
    for clarification, what is the purpose of "sm_nextmapinfo_loop" ?
    How often the message should be repeated.
    That means how often nextmap message is shown in chat successively.
    Quote:
    Originally Posted by GyroTarzan
    Can you add a countdown the last seconds in a map?
    Like: 10,9,8,7,6,5,4,3,2,1, map-change to mapname.
    Yes it's possible.
    Quote:
    Originally Posted by MaKTaiL
    Is there a way to specify where the message is going to appear? I want it to show on top left.
    I don't know, I will search for it.
    I only know bottom center, panel, chat and center messages.
    __________________
    SWAT_88 is offline
    MaKTaiL
    Senior Member
    Join Date: Jul 2008
    Location: Brazil
    Old 08-29-2008 , 18:55   Re: SM Nextmap Info
    Reply With Quote #7

    Quote:
    Originally Posted by SWAT_88 View Post
    I don't know, I will search for it.
    I only know bottom center, panel, chat and center messages.
    Top left is where the messages appear when you type sm_tsay on console.
    MaKTaiL is offline
    SWAT_88
    SourceMod Donor
    Join Date: Jan 2008
    Location: Austria
    Old 08-29-2008 , 19:03   Re: SM Nextmap Info
    Reply With Quote #8

    Quote:
    Originally Posted by MaKTaiL View Post
    Top left is where the messages appear when you type sm_tsay on console.
    Nice.
    It is definitely possible.
    __________________
    SWAT_88 is offline
    MaKTaiL
    Senior Member
    Join Date: Jul 2008
    Location: Brazil
    Old 08-29-2008 , 19:16   Re: SM Nextmap Info
    Reply With Quote #9

    Quote:
    Originally Posted by SWAT_88 View Post
    Nice.
    It is definitely possible.
    Make a cvar so we can choose one of these 5 options whethever we want.
    MaKTaiL is offline
    zerak
    Senior Member
    Join Date: Feb 2008
    Old 08-29-2008 , 19:20   Re: SM Nextmap Info
    Reply With Quote #10

    It is a neat and simple plugin indeed that will fit a lot of people but my points was if you are bored you could expand it to consider other parameters for mapchange like winlimit and roundlimit etc. instead of only timelimit.

    Code:
    public CvarChange_Timelimit(Handle:cvar, const String:oldvalue[], const String:newvalue[])
    {
    	if(StringToInt(newvalue) == 1){
    		InitTimer();
    	}
    }
    I might be wrong here but shouldn't it be > 0 instead, this will still cause a problem when set to 0 (infinity) but I don't know if that could be avoided (that is if the function is called for invalid values)

    Code:
    public CvarChange_Timelimit(Handle:cvar, const String:oldvalue[], const String:newvalue[])
    {
    	if(StringToInt(newvalue) > 0 ){
    		InitTimer();
    	}
    }
    StringToInt
    Quote:
    Integer conversion of string, or 0 on failure.
    zerak is offline
    Reply


    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 07:19.


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