View Single Post
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-21-2009 , 00:48   Re: Realistic Defuse
Reply With Quote #2

Updated to v1.1

PHP Code:
new bool:CantDefuse[33]

public 
client_putinserver(id)
CantDefuse[id] = true

public C4Used(iC4ididactivatoruse_typeFloat:value)
{
    if(
use_type != || value != 1.0 || get_user_team(id) != 2)
        return 
HAM_IGNORED
    
    
if(cs_get_user_defuse(id) && !get_pcvar_num(p_BlockDefuse) )
    return 
HAM_IGNORED
    
    
if(CantDefuse[id])
        return 
HAM_SUPERCEDE
    
    
return HAM_IGNORED

--->

PHP Code:
public C4Used(iC4ididactivatoruse_typeFloat:value)
{
    if(
use_type != || value != 1.0 || get_user_team(id) != 2)
        return 
HAM_IGNORED
    
    
    
if(!cs_get_user_defuse(id) && get_pcvar_num(p_BlockDefuse) )
    {
        
client_print(idprint_center"%L"id"BD_MESSAGE"Tag)
        return 
HAM_SUPERCEDE
    
}
    
    return 
HAM_IGNORED

See the first post for more information about the update.

Also i have a new problem, dont know if is NEW at all but i tested a lot of times after release and work perfect =|

Here an example to explain the problem:

defuse_remove 1
defuse_times 1

The bomb has been planted, the player defuse the bomb, remove the defuse kit from the player. (This work perfect)

But the next round if the player buy defuse and he defuse the bomb, the defuse kit of the player don't get removed =/
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 08-21-2009 at 00:55.
Alucard^ is offline
Send a message via Skype™ to Alucard^