AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Bomb Timer Line 1.1 [UPDATED] (https://forums.alliedmods.net/showthread.php?t=73194)

shine771 06-24-2008 15:55

Bomb Timer Line 1.1 [UPDATED]
 
1 Attachment(s)
Bomb Timer Line
1.1

Description: When you plant c4. It shows a line(>|) thats moving towards another Line(|<<< C4). The distance between those 2 lines depends on a cvar - mp_c4timer. When both lines collide. C4 Explodes.

Cvars:
btl_only_for_ts (1/0) (1 - Only Terrorists will see the Timer Line, 0 - everyone including CT's will see the Timer Line)

I recommend: Do not set mp_c4timer below 0 and above 50. Just an recommendation.

Changes:
v0.7
*Initial Release
v0.8
*Optimized Code(Use switch instead of if/else,shortened the code a little bit, using cvar pointer instead of get_cvar_num)
v0.9
*Optimized Code a little
*Fixed the glitch when someone joins a server he can't see the moving line.
v1.0
*Recoded the plugin. Fixed Many glitches..
*Now when the bomb explodes, it changes the C4 text to [DEFUSED]/[BOMB] depending which team won.
v1.1
*Fixed the glitch > if bomb doesn't explode but the round ends.. and server has freeze time it still shows the line until freezetime ends.


Screenshots:
[IMG]http://img137.**************/img137/9472/screenshotbtlmw7.th.jpg[/IMG]




Arkshine 06-24-2008 16:39

Re: Bomb Timer Line 0.7
 
equali(data[11],"P")

Why don't just use : data[11] == 'P' ?


get_cvar_num("mp_c4timer")

I would use a pointer for that. ( get_cvar_pointer )


new Float:addtime = temp / 90
linestart = (0.50 - temp) + addtime


To avoit to use an extra-var, I would do directly : linestart = (0.50 - temp) + ( temp / 90 )
Even id it's not really necessary.

YamiKaitou 06-24-2008 16:43

Re: Bomb Timer Line 0.7
 
Also, use pcvars for all cvars.

Use get_cvar_pointer if the cvar is already registered. Then use the get_pcvar_num like normal once you have saved the pointer

Arkshine 06-24-2008 16:47

Re: Bomb Timer Line 0.7
 
Forget that :

if(equali(data[11],"P")) show_hud()
else if(equali(data[11],"D")) remove_hud()


Would be better to do :

Code:
switch ( data[11] ) {     case 'P' : show_hud()     case 'D' : remove_hud() }

shine771 06-24-2008 17:00

Re: Bomb Timer Line 0.8
 
Ok optimized the code. Maybe say what you think about the plugin.. any suggestions?

Arkshine 06-24-2008 17:06

Re: Bomb Timer Line 0.8
 
Absolutely not tested. Will see later. :lol:

Also, you can do the same thing here :

new e_time2 = get_pcvar_num(e_time)
new Float:temp = e_time2 * 0.01


->

new Float:temp = get_pcvar_num(e_time) * 0.01

shine771 06-24-2008 17:11

Re: Bomb Timer Line 0.8
 
Damn.. i'll optimize that in next version.

AntiBots 06-24-2008 21:30

Re: Bomb Timer Line 0.8
 
good idea :D

Alucard^ 06-29-2008 22:52

Re: Bomb Timer Line 0.8
 
wow i love the idea, testing...

Alucard^ 07-03-2008 02:22

Re: Bomb Timer Line 0.8
 
sry for bump but.. emm it doesnt work for me... the plugin is runing but i dont see the hud line

Emp` 07-03-2008 15:05

Re: Bomb Timer Line 0.8
 
PM me with next release and when there is confirmation that the plugin works.

Richard 07-05-2008 17:25

Re: Bomb Timer Line 0.8
 
I go to test and aprove or unaproved

Richard 07-05-2008 17:30

Re: Bomb Timer Line 0.8
 
Im unnaproved this plugins work but have a bug cant view de c4 line

shine771 07-06-2008 15:13

Re: Bomb Timer Line 0.9
 
Ok i fixed the glitch when some joins the server he can't see the line... so there really wasn't a glitch when you Can't see the line.. just it's not easy to see it... Anyway..

shine771 07-07-2008 19:00

Re: Bomb Timer Line 0.9
 
Sorry for DP.. maybe someone can test it? :S And it could get approved :S

mats 07-08-2008 20:03

Re: Bomb Timer Line 1.0 [UPDATED]
 
its not working good on my server, the bomb blows when the line already passed c4 10seconds ago ;p

shine771 07-09-2008 09:38

Re: Bomb Timer Line 1.0 [UPDATED]
 
Downlaod the latest version? I've tested this on my server with 2 people... it works. +It's working perfectly on a public server.. 10x10 all day.. no glitches :S. You probably downloaded the 0.9 version.. just download the new version... test it. Confirm that it is working so i can get this approved.

mats 07-09-2008 10:44

Re: Bomb Timer Line 1.0 [UPDATED]
 
Quote:

Originally Posted by shine771 (Post 650116)
Downlaod the latest version? I've tested this on my server with 2 people... it works. +It's working perfectly on a public server.. 10x10 all day.. no glitches :S. You probably downloaded the 0.9 version.. just download the new version... test it. Confirm that it is working so i can get this approved.

You can test it on my dust2 server: 81.26.221.98:27015
I installed the last version know.

shine771 07-09-2008 11:47

Re: Bomb Timer Line 1.0 [UPDATED]
 
Ping... anyway. Tell me when you're finished with testing...

Hack_ 07-19-2008 13:06

Re: Bomb Timer Line 1.0 [UPDATED]
 
Fix this but the line cant view !!!

shine771 07-19-2008 15:49

Re: Bomb Timer Line 1.0 [UPDATED]
 
??? Everything is working fine...

Alucard^ 07-22-2008 01:14

Re: Bomb Timer Line 1.0 [UPDATED]
 
sry but in my server is not working...

shine771 07-22-2008 07:45

Re: Bomb Timer Line 1.0 [UPDATED]
 
Are you sure that you did see it? It's not very observable... Were you a ct and btl_only_for_ts was 1? Maybe thats why you didn't see it? If it's not working.. why it's working on my friends pub? :O

mats 07-22-2008 08:02

Re: Bomb Timer Line 1.0 [UPDATED]
 
Quote:

Originally Posted by shine771 (Post 656507)
Are you sure that you did see it? It's not very observable... Were you a ct and btl_only_for_ts was 1? Maybe thats why you didn't see it? If it's not working.. why it's working on my friends pub? :O

The plugin works in my server. only after the round ends and the bomb has not been exploded (defused or T kill all) the timer line is still on

shine771 07-22-2008 13:42

Re: Bomb Timer Line 1.1 [UPDATED]
 
Fixed it.. didn't notice it before because that server hasn't got freezetime :P. Anyway.. it's fixed.. now test it so it can get approved <_<... thanks.

PremunitioN 07-23-2008 16:08

Re: Bomb Timer Line 1.1 [UPDATED]
 
Using this right now, Works great!

bbq407 07-25-2008 05:33

Re: Bomb Timer Line 1.1 [UPDATED]
 
Oh you forgot it
#include <amxmisc>

Arkshine 07-25-2008 05:36

Re: Bomb Timer Line 1.1 [UPDATED]
 
Quote:

Originally Posted by bbq407 (Post 658335)
Oh you forgot it
#include <amxmisc>

No need here.

Hack_ 08-30-2008 10:52

Re: Bomb Timer Line 1.1 [UPDATED]
 
Nice but i had a good idea you can added a defuse line? and when defused has this [DEFUSED]

hariS. 12-30-2009 10:50

Re: Bomb Timer Line 1.1 [UPDATED]
 
works fine

morfil 01-22-2012 15:36

Re: Bomb Timer Line 1.1 [UPDATED]
 
Works like a charm! Thanks!!!

ARNX 10-18-2012 12:38

Re: Bomb Timer Line 1.1 [UPDATED]
 
Very nice plugin. I have one favor.

How can I change size of the lines to bigger?


All times are GMT -4. The time now is 01:42.

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