Raised This Month: $ Target: $400
 0% 

Button activation to the distance [Solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
niqo
Senior Member
Join Date: Feb 2010
Location: Argentina
Old 09-17-2015 , 21:51   Button activation to the distance [Solved]
Reply With Quote #1

As it says the title. This does not me work.


PHP Code:
public fw_CmdStartiduc_handlerandseed )
{
    if (!
is_user_alive(id))
        return 
FMRES_IGNORED

    
new button get_ucuc_handle UC_Buttons );
    new 
oldbutton pev(idpev_oldbuttons)

    if( 
button IN_USE && !(oldbutton IN_USE)) {
        
        
activate_button(id)
    }

    return 
FMRES_IGNORED;
}

public 
activate_button(id)
{
    new 
entbodypart
    get_user_aiming 
(id,ent,bodypart)
    
    new 
szClass[10], szTarget[7];
    
entity_get_string(entEV_SZ_classnameszClass9);
    
entity_get_string(entEV_SZ_targetnameszTarget6);
    
    if (
equal(szClass"func_button") || equal(szTarget"trap3")) {
        
        
dllfunc(DLLFunc_Use, -10)
    }

__________________
niqo is offline
 



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 22:12.


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