AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Style C4 Timer (https://forums.alliedmods.net/showthread.php?t=278600)

OciXCrom 02-04-2016 07:14

Style C4 Timer
 
4 Attachment(s)

Description
  • This C4 timer shows the time remaining until the explosion in a slightly different way. You can choose between multiple different styles, including the default one, i.e. simple countdown to 0. The timer can also change its color when it reaches a certain time - by default it starts with green, on 10 seconds it changes to yellow, and on 5 seconds it becomes red. This is fully customizable. It can also move across the screen and change its position each second, it can use a voice speaker for the countdown and much more.

Settings
  • The settings can be found in the [Settings] section in the file configs/StyleC4Timer.ini. In this thread you will find a brief explanation for them. Make sure to check the configuration file for full details.
  • STYLE_MODE -- timer style mode (manual selection/consecutive/random)
  • TIMER_STYLE -- timer style id if manual style mode is selected
  • COLOR_MODE -- timer color mode (one color/color cycle/random)
  • STARTING_COLOR -- timer starting color
  • COLOR_CYCLE -- if the color cycle option is selected, here you can set when the timer will change its color and specify those colors
  • STARTING_POSITION -- timer starting position
  • ENABLE_POSITION_CYCLE -- if enabled, you can make the timer move across the screen each second
  • POSITION_CYCLE -- coordinates for timer movement if the position cycle option is enabled
  • MESSAGE_TYPE -- timer message type (HUD/DHUD/center)
  • OVERWRITE_ROUND_TIMER -- if enabled, the default round time will be replaced with a C4 timer in addition to the HUD message
  • TIMER_SYNC -- if the timer isn't in sync with the actual explosion, use this setting to adjust it
  • START_MESSAGE_AT -- when to start the timer message (0 will make it start right after the bomb has been planted)
  • START_VOICE_AT -- when to start the voice countdown
  • VOICE_SPEAKER -- sound folder for the voice countdown (vox/fvox/custom)

Styles
  • The styles can be found in the [Styles] section in the file configs/StyleC4Timer.ini. Down below you will find a brief explanation of the style settings and how you can use them to modify or create your own style.
  • Begin -- the starting point of the timer style
  • Add -- this text is added X times to the "begin" one, where X is the value of the cvar "mp_c4timer"
  • End -- the ending point of the timer style
  • Replace symbol -- the text that will be replaced each second
  • Replace with -- the replacement text
  • Preview -- this is just a preview for end-users, it's not used anywhere in the code

Video preview (with HUD messages)



Additional information and download link

https://raw.githubusercontent.com/Oc...using_this.png
https://raw.githubusercontent.com/Oc...plugin_lab.png
https://raw.githubusercontent.com/Oc...ad_default.png

JoaoVieira 02-05-2016 11:39

Re: Style C4 Timer
 
Nice idea :D

ErrorStereotype 02-11-2016 12:05

Re: Style C4 Timer
 
Hey mate, really like this one, but guess resolution is the problem, it's too wide + my c4 timer is on 35 seconds as original in server.cfg. It's not accurate since bomb explodes far away before timer is done. Screenies down there



OciXCrom 02-11-2016 13:52

Re: Style C4 Timer
 
Well, it deffinetely doesn't look like it's set on 35 seconds. There are far more "arrows" on the picture than 35. The problem is probably in your server's files/configuration, I'm using the original C4 Timer for the base of the plugin. And yes, having a huge explosion time can cause the HUD to spread on two lines, because HUD messages simply can't be that long.

OciXCrom 04-18-2016 14:58

Re: Style C4 Timer
 
I updated the code and I'm waiting for an approver to take a look at it. I would appreciate any suggestions on adding more styles or options.

siriusmd99 04-22-2016 14:08

Re: Style C4 Timer
 
Interesting , good job.

Make sure that colour will be seen in more lighted places of the map, because in video it was a moment when that line was hard to see.

OciXCrom 04-22-2016 14:25

Re: Style C4 Timer
 
The map on the video is white, therefore it's hard to see on it. I can't prevent such a problem, since it uses three default colors - green, yellow and red, all of them clearly visible in normal conditions. Enabling the random colors option, the plugin will use all possible colors.

siriusmd99 04-22-2016 16:10

Re: Style C4 Timer
 
I meant to use colours which are darker but if you say that in game hud is visible ,then no problems :)

ssproxima 09-02-2016 00:24

Re: Style C4 Timer
 
my servers c4 timer and its animation are not in sync how to set the exact time

INTEL-XTREME 09-09-2016 12:34

Re: Style C4 Timer
 
Nice idea, very good. Please FIX C4 time sync

PawnerBros 09-10-2016 09:19

Re: Style C4 Timer
 
Nice plugin. :)

OciXCrom 09-11-2016 08:27

Re: Style C4 Timer
 
The sync problem is now fixed.

INTEL-XTREME 09-17-2016 22:04

Re: Style C4 Timer
 
Good job thanks.

FR0NTLINE 10-20-2016 19:32

Re: Style C4 Timer
 
Good stuff man.

kristi 12-28-2016 22:50

Re: Style C4 Timer
 
How to make it work with DHUD
or can you make it please ?

OciXCrom 12-29-2016 09:04

Re: Style C4 Timer
 
Quote:

Originally Posted by kristi (Post 2481487)
How to make it work with DHUD
or can you make it please ?

Since you're not the only one who asked me this, I decided to make an update and add it. Download the new version and change the cvar c4timer_type to 1.
-----------------------------------------
Update 2.0 @ 29.12.2016
  • Added a cvar to change the message type: c4timer_type (0 = HUD; 1 = DHUD; 2 = CENTER)
  • Added some new styles.
  • Code optimization.

aEEk 01-02-2017 09:49

Re: Style C4 Timer
 
Nice one ! but I like to have only sound for bomb and bomb planted / bomd defused chat messages.

OciXCrom 01-02-2017 09:59

Re: Style C4 Timer
 
Quote:

Originally Posted by aEEk (Post 2482687)
Nice one ! but I like to have only sound for bomb and bomb planted / bomd defused chat messages.

Then you don't need this plugin. :bee:
You can use this one for sounds and messages - https://forums.alliedmods.net/showthread.php?t=282218

aEEk 01-02-2017 13:53

Re: Style C4 Timer
 
Quote:

Originally Posted by OciXCrom (Post 2482690)
Then you don't need this plugin. :bee:
You can use this one for sounds and messages - https://forums.alliedmods.net/showthread.php?t=282218

Thanks dude, I like your plugins and help (I mean your involvement), but just like you, I'm coding so I make almost everything I need by myself. Respect your work ! Carry on the good work !

OciXCrom 01-02-2017 15:32

Re: Style C4 Timer
 
Thanks. :)

badbojus 01-11-2017 18:06

Re: Style C4 Timer
 
Hello, i have uploaded your plugin to my server, after server restart when i plant the bomb there none timer comes? Can you please add more information how to install this/get it to work? I tried commands in console and it tells me command does not exist.
I am new to amxmodx so please don't blame me. And plugin is just great, i hope i get it to work!

OciXCrom 01-11-2017 18:48

Re: Style C4 Timer
 
There's nothing special about installing this plugin. It's a normal plugin like every other one. You install it like you install any plugin. You should read some tutorials before actually creating a server. At least tell me what you're doing step by step and what command are you writing in the console? This plugin doesn't have any commands.

badbojus 01-14-2017 12:35

Re: Style C4 Timer
 
Yes i know how to install plugin, uploaded it to plugins folder and added it to plugins.ini file, then restarted server... The right way to get this plugin to work is to add all those cvars to my server.cfg file ? Or i am understanding wrong ? :)

HamletEagle 01-14-2017 12:41

Re: Style C4 Timer
 
What's the output of amx_plugins?

OciXCrom 01-23-2017 08:41

Re: Style C4 Timer
 
Update v2.1 @ 23.01.2017

  • Styles are no longer hardcoded in the .sma file. You can now edit them or add new ones from the configuration file: configs/C4Styles.ini.
  • Styles can now be vertical. Use %n% to put the text on a new line. This will only work with (D)HUD messages.

MaXs 01-24-2017 10:34

Re: Style C4 Timer
 
first pluginthat i like from you and style 2.

MrGarfield 02-12-2017 12:40

Re: Style C4 Timer
 
Hello
Thank you for the plugin it works very well, I would just like to know if it was possible to enlarge the contarebour style 0, because the c4timer_type 0 is too small and c4timer_type 1 is too big between the two ca would be great

thank you

OciXCrom 02-12-2017 12:44

Re: Style C4 Timer
 
Those two sizes are the only ones in CS 1.6. It's impossible to change them.

MrGarfield 02-12-2017 13:10

Re: Style C4 Timer
 
And for zero condition?

OciXCrom 02-12-2017 16:52

Re: Style C4 Timer
 
Same.

Pocky 03-29-2017 10:16

Where to place the C4styles.ini file?because the plugin is not working when i place it in addons/amxmodx/configs.

OciXCrom 03-29-2017 10:25

Re: Style C4 Timer
 
Exactly there. Check your console for errors. Use amx_plugins command to see if it's added correctly.

Pocky 03-30-2017 14:38

Re: Style C4 Timer
 
It is showing name:unknown version:unknown author:unknown file:crx_c4timer.amxx status:bad load
(It is not coming in this pattern but i cannot write in that Pattern.)

OciXCrom 03-30-2017 14:39

Re: Style C4 Timer
 
You didn't compile the plugin with your AMXX version. DON'T use online compilers.

Pocky 03-30-2017 15:51

Re: Style C4 Timer
 
Thanks.It worked.

Pocky 03-31-2017 05:22

Re: Style C4 Timer
 
In every pattern/style the bomb explodes 3 blocks/seconds before the pattern/style is ended.Is it a bug or you have made it like that?

OciXCrom 03-31-2017 10:48

Re: Style C4 Timer
 
I haven't, of course. It works like it should on my server. Make sure you're using the latest version.

Pocky 03-31-2017 15:50

Re: Style C4 Timer
 
Apoligies I used an online compiler to compile it.
Actually it is making the following error when i try to compile it with my compile.exe in scripting folder:
6 ) : fatal error 100: cannot read from file:"dhudmessage"
//
//Compilation aborted
//1 Error
// Could not locate output file ---------------scripting\compiled\crx_c4timer.amx (compile failed).
(Although the compiled folder is already made in which i once compiled a plugin.)

OciXCrom 03-31-2017 17:25

Re: Style C4 Timer
 
When an error like that occurs (remember what it says), it means you're missing the specified .inc file, which in this case is dhudmessage.inc. Use Google to find it and add it in your scripting/include folder. And for the third time - don't use online compilers...

yas17sin 03-31-2017 18:17

Re: Style C4 Timer
 
1 Attachment(s)
here the dhudmessage.inc :

Off : this the third time on this day that i've posted the dhudmessage.inc. :)


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

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