Raised This Month: $12 Target: $400
 3% 

Bomb Defuse Predictions v1.2


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Xanimos (85)
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 01-27-2010 , 22:48   Bomb Defuse Predictions v1.2
Reply With Quote #1

Bomb Defuse Predictions v1.2
Another simple useless plugin by me

Description:

With this plugin, when you are defusing the bomb, you can know if you have time to defuse or not. (a message will appear)

Cvars:

bdp_enabled (0|1) Enables|Disables plugin, Default 1

Modules:
Fakemeta
Hamsandwich

Credits:
Fran aka Asd': For nothing
Connor: I used some code from his plugin (c4 sprite timer). I always have to give credits to you

Translations
Code:
[es] by me
[en] by me & crazyeffect
[pt] by NGage70
[ru] by Romper
[tr] by KadiR & xD_1991
[de] by Nextra
[ro] by Il3gal
[fr] by Arkshine
Changelog:
Code:
v1.0: First release
v1.1: Code optimized - Thanks Connor
v1.2: Code optimized - Thanks Connor Again :), Added ML
Servers with this plugin

Suggestions are welcome (:
Attached Files
File Type: txt bomb_defuse_predictions.txt (1.4 KB, 3757 views)
File Type: sma Get Plugin or Get Source (bomb_defuse_predictions.sma - 7684 views - 2.9 KB)
__________________
Find my plugins here..

Ex - Spanish Moderator.

Last edited by Starsailor; 08-13-2020 at 16:22.
Starsailor is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 01-27-2010 , 23:08   Re: Bomb Defuse Predictions v1.0
Reply With Quote #2

cool
__________________
Zombiezzz is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 01-27-2010 , 23:28   Re: Bomb Defuse Predictions v1.0
Reply With Quote #3

gj
Could use this with deff or die plugin
NiQu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-28-2010 , 02:01   Re: Bomb Defuse Predictions v1.0
Reply With Quote #4

You should base times to bomb entity offsets, would be more accurate.
But with such a plugin, you break fun from the game.

Try :

PHP Code:
#include <amxmodx>
// #include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

new const VERSION[] = "0.0.1"

new g_iDefuser

public plugin_init()
{
    
register_plugin("c4 defuse time"VERSION"ConnorMcLeod")

    if( !
find_ent_by_class(FM_NULLENT"func_bomb_target") && find_ent_by_class(FM_NULLENT"info_bomb_target") )
    {
        
pause("ad")
        return
    }

    
RegisterHam(Ham_Use"grenade""CC4_Use_Pre"0)
    
RegisterHam(Ham_Use"grenade""CC4_Use_Post"1)
}

public 
CC4_Use_Pre(iC4ididactivatoruse_typeFloat:value)
{
    if( 
use_type == && value == 1.0 || cs_get_user_team(id) == CS_TEAM_CT || !cs_get_c4_defusing(iC4) )
    {
        
g_iDefuser id
    
}
}

public 
CC4_Use_Post(iC4ididactivatoruse_typeFloat:value)
{
    if( 
use_type != || value != 1.0 || g_iDefuser != id || !cs_get_c4_defusing(iC4) )
    {
        return
    }

    const 
m_flDefusedGameTime 99

    
new Float:flTime cs_get_c4_explode_timeiC4 ) - get_pdata_float(iC4m_flDefusedGameTime5)

    if( 
flTime >= 0.0 )
    {
        
client_print(idprint_chat"You can defuse the bomb and have an advance of %.3f seconds"flTime)
    }
    else
    {
        
client_print(idprint_chat"Take care, you miss %.3f seconds to defuse the bomb"flTime)
    }

You could also use :

register_event("BarTime", "Event_BarTime_Defuse", "be", "1=5", "1=10")

to detect the defuse event rather than the logevent.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-28-2010 at 02:28.
ConnorMcLeod is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 01-28-2010 , 05:11   Re: Bomb Defuse Predictions v1.0
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post

You should base times to bomb entity offsets, would be more accurate.
Im workin on that

Quote:
Originally Posted by ConnorMcLeod View Post
But with such a plugin, you break fun from the game.
I dont think so

Quote:
Originally Posted by ConnorMcLeod View Post
You could also use :

register_event("BarTime", "Event_BarTime_Defuse", "be", "1=5", "1=10")

to detect the defuse event rather than the logevent.
I am using that :\
__________________
Find my plugins here..

Ex - Spanish Moderator.

Last edited by Starsailor; 01-28-2010 at 05:43.
Starsailor is offline
Old 01-28-2010, 11:39
Starsailor
This message has been deleted by Starsailor. Reason: bug
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-28-2010 , 12:08   Re: Bomb Defuse Predictions v1.1
Reply With Quote #6

set_fail_state("Invalid Map") implies that the plugin can't load due to an error, would be better to just pause it.
Code looks baaaaad

Also, why to you check if player has a defuser in BarTime event ???
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 01-28-2010 , 12:18   Re: Bomb Defuse Predictions v1.1
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
set_fail_state("Invalid Map") implies that the plugin can't load due to an error, would be better to just pause it.
Code looks baaaaad
oh, fuck , always learns something new

Quote:
Also, why to you check if player has a defuser in BarTime event ???
because with defuser it takes you 5 seg to defuse and without defuse 10 sec, but im sure that can be optimized
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 01-28-2010 , 12:19   Re: Bomb Defuse Predictions v1.1
Reply With Quote #8

I got a suggestion, wanna guess?

I think it would be good for this, since the messages show up pretty much.
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 01-28-2010 , 12:24   Re: Bomb Defuse Predictions v1.1
Reply With Quote #9

Quote:
Originally Posted by crazyeffect View Post
I got a suggestion, wanna guess?

I think it would be good for this, since the messages show up pretty much.
Off course ML Man haha, in next version.
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-28-2010 , 12:34   Re: Bomb Defuse Predictions v1.1
Reply With Quote #10

You should use #define for strings since you're using these multiple times in your code.
__________________
hleV is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:54.


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