Raised This Month: $ Target: $400
 0% 

playback_event usage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-08-2007 , 20:16   playback_event usage
Reply With Quote #1

I'm assuming the function 'playback_event' will let you recreate an event. If this is the case, how do I find the events that it can recreate. Are these just the same events that I see when logging messages with Damaged Souls message logger? If they are the same things, is there a way I can get a full list of the events?

Also, there is 'pfn_playbackevent' which I'm assuming will capture when an event is played. Is this correct? I feel stupid asking this, but what does 'pfn' mean?

If someone knows how can you also give me examples of using both of these functions please?
hlstriker is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-08-2007 , 20:28   Re: playback_event usage
Reply With Quote #2

This is a sample for make the smoke which comes out of the smokegrenade in CS
Code:
engfunc(EngFunc_PlaybackEvent, 0, ent, 26, 0.0 , origin, g_angle, 0.0, 0.0, 0, 1, 0, 0);

The Events are in the folder cstrike/events/
They are used to let the client do bulletholes and stuff..
I'm sure there is nothing very usefull with it...but the smoke*gg*

greetz regalis
__________________
regalis is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 06-08-2007 , 20:34   Re: playback_event usage
Reply With Quote #3

pfn is a common prefix to functions in C++ (maybe even other languages) that is short for "pointer function". Pointer functions are just, the best way I can describe them, are variable functions that can point to any function that has the same the signature as its definition.

Example (in pseudo-pawn code. I put it in pawn code instead of C++ to help you better understand the concept):
Code:
public MyFunc(a, b[], c, d) {      // code } // declare a pf (asterisk '*' is an operator declaring a pointer in C/C++) public (*pfnSomeFunc(a, b[], c, d,)) = NULL; pfnSomeFunc = MyFunc; // Call w/e pfnSomeFunc is pointing to pfnSomeFunc(w, x, y, z);
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-08-2007 , 20:55   Re: playback_event usage
Reply With Quote #4

Quote:
Originally Posted by regalis View Post
This is a sample for make the smoke which comes out of the smokegrenade in CS
Code:
engfunc(EngFunc_PlaybackEvent, 0, ent, 26, 0.0 , origin, g_angle, 0.0, 0.0, 0, 1, 0, 0);
The Events are in the folder cstrike/events/
They are used to let the client do bulletholes and stuff..
I'm sure there is nothing very usefull with it...but the smoke*gg*
I'm working with the mod Team Fortress Classic. I see an event folder, but when I open up each .sc file (that's all the folders contain in events), each file reads "// TF Shotgun". Is there a way I can get the number each event is?

Quote:
Originally Posted by Zenith77 View Post
pfn is a common prefix to functions in C++ (maybe even other languages) that is short for "pointer function". Pointer functions are just, the best way I can describe them, are variable functions that can point to any function that has the same the signature as its definition.
Thanks that cleared it up pretty much.
hlstriker is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-08-2007 , 21:04   Re: playback_event usage
Reply With Quote #5

Sorry, i have no idea how to get the event number..i only know that event 26 is the smoke..0o
Maybe in some .cpp files inside the HLSDK...
Do you have the HLSDK? it is very interesting to look at the stuff there ;)

greetz regalis
__________________
regalis is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-08-2007 , 21:21   Re: playback_event usage
Reply With Quote #6

Last I saw of the SDK was back on won days. I didn't know how to program what so ever then

Wouldn't the events be game specific though, I wouldn't think they would be in the SDK?

Is there a way I can get the SDK without buying it on steam?
hlstriker is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2007 , 21:23   Re: playback_event usage
Reply With Quote #7

http://svn.alliedmods.net/viewvc.cgi.../?root=amxmodx
__________________
Arkshine is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-08-2007 , 21:45   Re: playback_event usage
Reply With Quote #8

Thanks, does anyone know if the TFC source is released anywhere?

Also, is there a way to find the parameters for the playback?

Last edited by hlstriker; 06-08-2007 at 22:02.
hlstriker is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 06-09-2007 , 12:02   Re: playback_event usage
Reply With Quote #9

No and No. Unless you hack the dll or something.

With fakemeta module you can playback events and hook the ones that the game use: register_forward(FM_PlaybackEvent, "fwPlaybackEvent"). All parameters is passed to the hook of course. Hooked function's prototype will be
PHP Code:
fwPlaybackEvent(flagspInvokereventindexFloat:delay, const Float:origin[3], const Float:angles[3], Float:fparam1Float:fparam2iparam1iparam2bparam1bparam2
Quote:
Is there a way I can get the number each event is?
Yes. At the map start all events is precached so you can get its ids. In plugin_precache do register_forward(FM_PrecacheEvent, "fwPrecacheEvent", 1). Hooked function's prototype will be fwPrecacheEvent(type, const event_name[]). Whenever fwPrecacheEvent is called you can retrieve event index with get_orig_retval().

Quote:
Are these just the same events that I see when logging messages with Damaged Souls message logger?
No. Speaking in terms of HLSDK the things that you hook with register_event() / register_message() (so called "events") are actually messages. And events are the ones that is played with PlaybackEvent.

You can find more information on events in the FULL HLSDK.

Last edited by VEN; 06-09-2007 at 12:24.
VEN 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 10:34.


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