Raised This Month: $ Target: $400
 0% 

Entities


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lightokun
Member
Join Date: Oct 2009
Old 11-24-2010 , 23:46   Re: Entities
Reply With Quote #1

Nothing (ham, fm, engine) can register func_wall touch func_wall.

Fakemeta:
Code:
register_forward(FM_Touch, "fwdTouch")

public fwdTouch(ptr, ptd)
{
    log_amx("ptr: %d; ptd: %d", ptr, ptd)
    if(ptr == 0 || ptd == 0) return // 0 = World, can't get settings from this
    new class1[32], class2[32]
    pev(ptr, pev_classname, class1, 31) // Toucher
    pev(ptd, pev_classname, class2, 31) // Touched
    
    client_print(0, print_chat, "%s touched %s", class1, class2)
}
log_amx only return values when player touches something.

Ham:
Code:
RegisterHam(Ham_Touch, "func_wall", "hamTouch_wall")

public hamTouch_wall(ptr, ptd)
{
    log_amx("ptr: %d; ptd: %d", ptr, ptd)
    if(ptr == 0 || ptd == 0) return // 0 = World, can't get settings from this
    new class1[32], class2[32]
    pev(ptr, pev_classname, class1, 31) // Toucher
    pev(ptd, pev_classname, class2, 31) // Touched
    
    client_print(0, print_chat, "%s touched %s", class1, class2)
}
Same here, only log player touches something.

Engine:
Code:
register_touch("*", "*", "engine_touch") or register_touch("func_wall", "func_wall", "engine_touch")
.. same code
Same situation.
I'm in dispair.
__________________

Last edited by Lightokun; 11-24-2010 at 23:49.
Lightokun is offline
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 11:20.


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