Raised This Month: $ Target: $400
 0% 

How to make an entity think in HamSandWich


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 03-28-2009 , 17:18   Re: How to make an entity think in HamSandWich
Reply With Quote #9

Quote:
Originally Posted by Exolent[jNr] View Post
Can you show the code?
Sure:

PHP Code:
public plugin_init()
{
    
register_plugin("Test","0.0","OT")
    
RegisterHam(Ham_Think,"class","ham_think")
    
register_forward(FM_Think,"fm_think")

    new 
ent engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString"info_target" ) )
    
set_peventpev_classname"class" )
    
set_peventpev_nextthinkget_gametime() + 0.1)
}

public 
ham_think(ent)
{
    
server_print("Yummy ent")
    
set_peventpev_nextthinkget_gametime() + 0.1)
    return 
HAM_IGNORED
}
public 
fm_think(ent)
{
    static 
classname[6];
    
peventpev_classnameclassnamesizeof classname );
    
    if( !
equalclassname"class" ) )
        return 
FMRES_IGNORED;
    
    
server_print("Fake entity, no taste")
    
set_peventpev_nextthinkget_gametime() + 0.1)
    return 
FMRES_IGNORED

__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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 09:01.


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