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] |
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. |
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 |
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:
|
Re: Bomb Timer Line 0.8
Ok optimized the code. Maybe say what you think about the plugin.. any suggestions?
|
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 |
Re: Bomb Timer Line 0.8
Damn.. i'll optimize that in next version.
|
Re: Bomb Timer Line 0.8
good idea :D
|
Re: Bomb Timer Line 0.8
wow i love the idea, testing...
|
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
|
All times are GMT -4. The time now is 07:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.