AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Advanced c4 timer (https://forums.alliedmods.net/showthread.php?t=58760)

dalto 08-01-2007 22:07

Advanced c4 timer
 
2 Attachment(s)
Advanced c4 timer

Current Version: 1.4.1

Description:
This plugin is a c4 timer with configurable sounds. Based on the c4 timer by sslice. Includes full user configurability.

Planned Features:
None, make a request!

Special Thanks:
Imported Anthony and his team for coming up with and implementing new ideas.

CVar's:
sm_c4_timer_version: The version number
sm_c4_timer_enable: Enable the plugin
sm_c4_time_announce: Enable the announcement
sm_c4_timer_chat_default: Default setting for chat preference
sm_c4_timer_center_default: Default setting for center preference
sm_c4_timer_hud_default: Default setting for HUD preference
sm_c4_timer_sound_default: Default setting for sound preference
sm_c4_timer_sound_default: Default setting for sound preference");
sm_c4_timer_start_at_ten: 1 voice starts at 10, 2 text starts at 10, 3 both start at 10

Changelog:
1.4.1: Added individual text messages for sounds
1.4: Removed menu, autoload config, flexible text messages, alternate counting schemes
1.3: Changed timing, add default setting cvar's, changed to menu
1.2.1: Fixed menu translations not matching and changed menu behavior
1.2: Added the planters name, added a defuser message, added translation support
1.1.1: Fixed a bug with the announcer counting wrong
1.1: Added hud text and an exit menu option
1.0: Added support for late loading
0.6: Changed timer countdown pattern, added user configuration
0.5: Initial Release

-=]DS[=-launebaer 08-02-2007 00:41

Re: Advanced c4 timer
 
nice plugin. can you try this with a centermessage or a hint text when the sounds come. sry for my english please but an old german man :-)

dalto 08-02-2007 01:02

Re: Advanced c4 timer
 
Quote:

Originally Posted by -=]DS[=-launebaer (Post 511358)
nice plugin. can you try this with a centermessage or a hint text when the sounds come. sry for my english please but an old german man :-)

The countdown is displayed in the center already if I am understanding what you are asking.

imported_Anth0ny 08-02-2007 02:08

Re: Advanced c4 timer
 
nice plugin, thanks! =)

another thing: mb add a variable for set announces interval?
for example: if serer variable bombtimer set to 35, when bomb announces every 30, 20, and 10,9,8,7 etc... seconds

dalto 08-02-2007 02:12

Re: Advanced c4 timer
 
Quote:

Originally Posted by imported_Anth0ny (Post 511382)
nice plugin, thanks! =)

another thing: mb add a variable for set announces interval?
for example: if serer variable bombtimer set to 35, when bomb announces every 30, 20, and 10,9,8,7 etc... seconds

Thanks....I will add that.

^BuGs^ 08-02-2007 02:22

Re: Advanced c4 timer
 
Some coding shortcuts and suggestions:
  1. MAX_CLIENTS can become MAXPLAYERS -- which you don't even use...
  2. For you "hook" check you can throw an error so the plugin unload it self (look up SetFailState)
  3. For loop on line 85 should have the needed { and }. Keeps everything clean. You already do this once, so keep the consistency.
  4. Credit sslice in the code. :)
Otherwise nice job. :up:

dalto 08-02-2007 09:33

Re: Advanced c4 timer
 
Quote:

Originally Posted by ^BuGs^ (Post 511395)
Some coding shortcuts and suggestions:
  1. MAX_CLIENTS can become MAXPLAYERS -- which you don't even use...
  2. For you "hook" check you can throw an error so the plugin unload it self (look up SetFailState)
  3. For loop on line 85 should have the needed { and }. Keeps everything clean. You already do this once, so keep the consistency.
  4. Credit sslice in the code. :)
Otherwise nice job. :up:

1. I use it in the next release
2. Heh, that is the original code. I use SetFailState in my other plugins. I will change it here as well.
4. I do already at the top. I will add a couple more throughout.

^BuGs^ 08-02-2007 12:38

Re: Advanced c4 timer
 
Client index starts at 1 so this is the proper way to define it in your array: MAXPLAYERS+1

You will have an extra, but at least you will not have to do: clientindex-1

Everytime...

-=]DS[=-launebaer 08-02-2007 16:26

Re: Advanced c4 timer
 
ok :-)

but centermessage only by sound.

so sound comes @ 30, 20, 10,9......

and centermessage comes by 30,29,28........... and chat message comes too.

better is when the centermessage comes only when sound comes or be enable or disable the message. in the chat and the centermessage be set by settings like:

sm_c4Sound_chat 0|1
smc4Sounds_centermessage 0|1

or by the c4soundslist.cfg like:

"c4SoundsList"
{
"c4_sound"
{
"1" "admin_plugin/c4timer_1.wav"
"2" "admin_plugin/c4timer_2.wav"
"3" "admin_plugin/c4timer_3.wav"
"4" "admin_plugin/c4timer_4.wav"
"5" "admin_plugin/c4timer_5.wav"
"6" "admin_plugin/c4timer_6.wav"
"7" "admin_plugin/c4timer_7.wav"
"8" "admin_plugin/c4timer_8.wav"
"9" "admin_plugin/c4timer_9.wav"
"10" "admin_plugin/c4timer_10.wav"
"20" "admin_plugin/c4timer_20left.wav"
"30" "admin_plugin/c4timer_30left.wav"
}

"c4_message"
{
"1" "1 Second remaining"
"2" "2 Second remaining"
"3" "3 Second remaining"
"4" "4 Second remaining"
"5" "5 Second remaining"
"6" "6 Second remaining"
"7" "7 Second remaining"
"8" "8 Second remaining"
"9" "9 Second remaining"
"10" "10 Second remaining"
"20" "20 Second remaining"
"30" "30 Second remaining"
}
}

dalto 08-02-2007 18:36

Re: Advanced c4 timer
 
Quote:

Originally Posted by -=]DS[=-launebaer (Post 511689)
ok :-)

sm_c4Sound_chat 0|1
smc4Sounds_centermessage 0|1

There will be a release tonight that will allow individual users to configure their sounds. In a later release I will add functionality to globally disable certain kinds.


All times are GMT -4. The time now is 06:32.

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