Raised This Month: $ Target: $400
 0% 

FM_Touch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 12-12-2006 , 12:55   FM_Touch
Reply With Quote #1

correct use of FM_Touch and data it passes?
Code:
register_forward(FM_Touch, "fw_ent_touch")   public fw_ent_touch(/* what goes here? */)
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 12-12-2006 , 13:02   Re: FM_Touch
Reply With Quote #2

public fw_ent_touch(ptr, ptd)

Toucher and Touched basically
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 12-12-2006 , 13:30   Re: FM_Touch
Reply With Quote #3

ok how can I get the class name of the ptd (touched)?
guessing I use
Code:
entity_get_string(ptd, EV_SZ_classname)
since I used
Code:
entity_set_string(ent, EV_SZ_classname)
to set the class name but what is the correct usage of entity_get_string in this instance?
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 12-12-2006 , 13:34   Re: FM_Touch
Reply With Quote #4

Code:
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
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 12-12-2006 , 13:40   Re: FM_Touch
Reply With Quote #5

You shouldn't mix Fakemeta and Engine like that.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Old 12-12-2006, 13:40
Rolnaaba
This message has been deleted by Rolnaaba.
Rolnaaba
Veteran Member
Join Date: May 2006
Old 12-12-2006 , 13:41   Re: FM_Touch
Reply With Quote #6

I wish to use the engine way, but what is correct what to retrieve what was set by entity_set_string?
can someone show me the correct usage of entity_get_string please dont think this is right:
Code:
new class[3] entity_get_string(ptd, EV_SZ_classname, class, 3)
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 12-12-2006 at 13:54.
Rolnaaba is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 12-12-2006 , 15:32   Re: FM_Touch
Reply With Quote #7

Use my method, it'll get whatever the classname is set too.

Also your example is still incorrect, look at mine how I retrieve the string value
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 12-13-2006 , 11:05   Re: FM_Touch
Reply With Quote #8

so this would work:
Code:
entity_set_string(ent, EV_SZ_classname, "test_test"); new class1[32] pev(ptd, pev_classname, class1, 31) if(contain(class1,"test_test")) {     return WOOTZOR }
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-13-2006 , 11:12   Re: FM_Touch
Reply With Quote #9

that works
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 12-14-2006 , 10:43   Re: FM_Touch
Reply With Quote #10

great thanks, so I assume (since pretty much the same thing) this works as well:
Code:
if(class1 == "test_test") {      return WOOTZOR }
__________________
DO NOT PM me about avp mod.
Rolnaaba 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 06:52.


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