Raised This Month: $ Target: $400
 0% 

Player touches my entity - how to detect?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 08-18-2009 , 00:08   Player touches my entity - how to detect?
Reply With Quote #1

All right, code:

PHP Code:
public myent(id){
    
    static 
Float:origin[3]
    
pev(idpev_originorigin)
    
    static 
ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    
    if(!
ent)
        return
    
    
set_pev(entpev_classname"myent")
    
    
engfunc(EngFunc_SetModelentMYMODEL)
    
    static 
Float:MinBox[3]
    static 
Float:MaxBox[3]
    for(new 
aa<3a++) {
        
MinBox[a] = -1.0
        MaxBox
[a] = 1.0
    
}
    
engfunc(EngFunc_SetSizeentMinBoxMaxBox)
    
engfunc(EngFunc_SetOriginentorigin)
    
    
set_pev(entpev_solidSOLID_SLIDEBOX)
    
set_pev(entpev_movetypeMOVETYPE_TOSS)
    
set_pev(entpev_ownerid)
    
    static 
Float:global_Time
    global_get
(glb_timeglobal_Time)
    
set_pev(entpev_nextthinkglobal_Time 1.0)

PHP Code:
RegisterHam(Ham_Touch"info_target""touched"1
But not works. I see my entity, but no action when I touch it. Why ?
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
 



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 15:09.


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