Raised This Month: $12 Target: $400
 3% 

Right way of gameevents


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-01-2016 , 10:10   Right way of gameevents
Reply With Quote #1

Hellow, somebody can help me pls, do i use event hook in right way or i need add additional include to code? or it wrong method? I need it for CS:GO. Thanks a million

extension.cpp
Spoiler


events.hpp
Spoiler



or just use that method

extension.cpp
Spoiler


events.hpp
Spoiler


Which of those will better for CS:GO?
__________________

Last edited by gubka; 12-01-2016 at 10:39.
gubka is offline
Send a message via ICQ to gubka
psychonic

BAFFLED
Join Date: May 2008
Old 12-02-2016 , 12:32   Re: Right way of gameevents
Reply With Quote #2

The simplest and most common method is to just make your plugin class, the ZombiePlague instance in this case, a listener. In the callback, check the event name and then do or call your logic for each that you want to handle.

Like this, https://github.com/psychonic/d2fixup...ixups.cpp#L290

Last edited by psychonic; 12-02-2016 at 12:32.
psychonic is offline
Reply


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 08:17.


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