AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   SM Nextmap Info - Countdown and MapEnd - GunGame Support (https://forums.alliedmods.net/showthread.php?t=76746)

SWAT_88 08-29-2008 17:22

SM Nextmap Info - Countdown and MapEnd - GunGame Support
 
3 Attachment(s)
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.
https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif
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!!!

zerak 08-29-2008 17:38

Re: SM Nextmap Info
 
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" ?

GyroTarzan 08-29-2008 17:41

Re: SM Nextmap Info
 
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.

MaKTaiL 08-29-2008 17:54

Re: SM Nextmap Info
 
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.

MaKTaiL 08-29-2008 18:07

Re: SM Nextmap Info
 
Quote:

Originally Posted by GyroTarzan (Post 678155)
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 :up:

SWAT_88 08-29-2008 18:38

Re: SM Nextmap Info
 
Quote:

Originally Posted by zerak (Post 678154)
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 (Post 678154)
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 (Post 678154)
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.

MaKTaiL 08-29-2008 18:55

Re: SM Nextmap Info
 
Quote:

Originally Posted by SWAT_88 (Post 678216)
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. :mrgreen:

SWAT_88 08-29-2008 19:03

Re: SM Nextmap Info
 
Quote:

Originally Posted by MaKTaiL (Post 678227)
Top left is where the messages appear when you type sm_tsay on console. :mrgreen:

Nice.
It is definitely possible.

MaKTaiL 08-29-2008 19:16

Re: SM Nextmap Info
 
Quote:

Originally Posted by SWAT_88 (Post 678232)
Nice.
It is definitely possible.

Make a cvar so we can choose one of these 5 options whethever we want.

zerak 08-29-2008 19:20

Re: SM Nextmap Info
 
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.


All times are GMT -4. The time now is 14:07.

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