Raised This Month: $ Target: $400
 0% 

register touch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Miko000000
Senior Member
Join Date: Jul 2008
Location: Slovakia
Old 02-04-2009 , 09:24   register touch
Reply With Quote #1

Hello i can switch one code and i

ENGINE
Code:
register_touch("player", "land_mine", "mine_touched")

public mine_touched(id, ent)
{
    if(!get_pcvar_num(mines_enabled))
        return
    
    if(!is_user_alive(id))
        return
    
    explode(ent, 0)
}
FAKEMETA (my code)

Code:
register_forward(FM_Touch,"hook_touch")

public hook_touch(id,ent)
    {
    new classname[32]
    pev(id,pev_classname,classname,31)


    if ( equal(classname, "mine_touched")) 
    {
    if(!get_pcvar_num(mines_enabled))
    return FMRES_IGNORED;

    if(!is_user_alive(id))
    return FMRES_IGNORED;

    ent("land_mine", 0)

    return FMRES_IGNORED; 

    }
    return FMRES_IGNORED; 
}
MY code doesn´t work
Miko000000 is offline
Send a message via ICQ to Miko000000 Send a message via Skype™ to Miko000000
 


Thread Tools
Display Modes

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 01:38.


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