Raised This Month: $ Target: $400
 0% 

Quick question on events...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-08-2005 , 07:16   Quick question on events...
Reply With Quote #1

This may seem a little stupid, but after searching the HLSDK I have come to the conclusion that there is no "Touched_A_Hostage" event, only a log entry.

So, to find out when a hostage is touched, do I need to use XAD's method of hooking the logprint function and parse the results ?

I can do this, but it seems a little long winded and alot of string parseing on every log print.

If anyone has any better ideas i'd like to hear em
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
unmitigated monk
Junior Member
Join Date: Aug 2005
Old 09-08-2005 , 23:50  
Reply With Quote #2

See my post in your other thread about hostage_stop_following. I'm starting to think the original IGameEventManager has no or indirect support for the mod-specific events and that's likely why the second version was created.

Someone correct me if I'm wrong.
unmitigated monk is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 09-08-2005 , 23:56   Re: Quick question on events...
Reply With Quote #3

Quote:
Originally Posted by c0ldfyr3
This may seem a little stupid, but after searching the HLSDK I have come to the conclusion that there is no "Touched_A_Hostage" event, only a log entry.

So, to find out when a hostage is touched, do I need to use XAD's method of hooking the logprint function and parse the results ?

I can do this, but it seems a little long winded and alot of string parseing on every log print.

If anyone has any better ideas i'd like to hear em

maybe hostage_follows event
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-09-2005 , 07:46  
Reply With Quote #4

Bettle -> Its only called when they follow, not unfollow.

My idea for unfollow tho, seeing as im hooking EmitSound anyway, and parseing the sound for hostage sounds, I may as well add a strstr("hunuse") eh ?

Came to me last night =)

But on a strange side, even though I only Listen for 3 events, my FireEvent function is called on every event o.O Is that supposed to happen ?
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 09-09-2005 , 11:55  
Reply With Quote #5

Quote:
Originally Posted by c0ldfyr3
But on a strange side, even though I only Listen for 3 events, my FireEvent function is called on every event o.O Is that supposed to happen ?
Which event manager version are you using ?

IGameEventManger (captures all events)
IGameEventManager2 (captures events you specified)

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-09-2005 , 13:45  
Reply With Quote #6

IGameEventManager2

Code:
m_GameEventManager = (IGameEventManager2 *)((ismm->engineFactory())(INTERFACEVERSION_GAMEEVENTSMANAGER2, NULL));
And its hooking all Events
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
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 15:16.


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