Raised This Month: $ Target: $400
 0% 

About SOLID_TRIGGER


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-29-2009 , 07:35   Re: About SOLID_TRIGGER
Reply With Quote #1

Not sure to understand... But if really it doesn't work like you want, you can hook the touch and disabled it for you to avoid the blocking ; or spawning the entity in front of you. Because right now you use your own origin to set the start origin.
__________________
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 11-29-2009 , 07:39   Re: About SOLID_TRIGGER
Reply With Quote #2

In CmdStart:
PHP Code:
    new button get_uc(uc_handleUC_Buttons);
    new 
oldbuttons pev(clientpev_oldbuttons);
    static 
targetbody;
    new 
Float:aim_distance get_user_aiming(clienttargetbody);
    new 
model[33];
    
pev(clientpev_viewmodel2model32);
    
    if ( (
button IN_USE) && !(oldbuttons IN_USE) && aim_distance <= DISTANCE_E_BUTTON_USE_ENT )
    {
        if( 
pev_valid(target) && ( pev(targetpev_flags) & FL_ONGROUND ) )
        {
            static 
classname[32];
            
pevtargetpev_classnameclassnamecharsmax(classname) );

            if( 
equal(classname"MedItem") && !g_Player_Item_Picked[client] )
            {
                
g_Player_Item_Picked[client] = true;
                
g_ItemToUse[client] = 0
                emit_sound
(clientCHAN_ITEMg_medkit_pickup1.0ATTN_NORM0PITCH_NORM);
        
                new 
ent create_entity("info_target");
                    
                
entity_set_model(entg_p_medic_pack_model)
                    
                
entity_set_int(entEV_INT_movetypeMOVETYPE_FOLLOW)
                
entity_set_edict(entEV_ENT_aimentclient );
                    
                
g_ent[client] = ent;
                    
                
remove_entity(target)
                
                return 
FMRES_IGNORED
            
}
            else if( 
equal(classname"PropItem") && !g_Player_Item_Picked_Pro[client] )
            {
                
g_Player_Item_Picked_Pro[client] = true;
                
g_ItemToUse[client] = 1
                emit_sound
(clientCHAN_ITEMg_medkit_pickup1.0ATTN_NORM0PITCH_NORM);
        
                
remove_entity(target)
                
                return 
FMRES_IGNORED
            
}
        }
    } 
It won't remove entity...
remove_entity(target)
__________________
xbatista is offline
Send a message via Skype™ to xbatista
Reply



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 13:39.


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