Raised This Month: $32 Target: $400
 8% 

Printing to console in an extension?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
boynedmaster
Member
Join Date: Jun 2012
Old 05-02-2015 , 14:21   Printing to console in an extension?
Reply With Quote #1

How can I print to the console in a C++ extension?
__________________
I mean Venusaur...with a question mark
boynedmaster is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 05-02-2015 , 14:59   Re: Printing to console in an extension?
Reply With Quote #2

g_SMAPI->ConPrintf("w/e");

also theres a diff forum for extension stuff
Miu is offline
boynedmaster
Member
Join Date: Jun 2012
Old 05-02-2015 , 15:56   Re: Printing to console in an extension?
Reply With Quote #3

Quote:
Originally Posted by Miu View Post
g_SMAPI->ConPrintf("w/e");

also theres a diff forum for extension stuff
How do I get g_SMAPI?
__________________
I mean Venusaur...with a question mark
boynedmaster is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 05-02-2015 , 16:10   Re: Printing to console in an extension?
Reply With Quote #4

uncomment #define SMEXT_CONF_METAMOD in smsdk_config.h in the sample extension template
Miu is offline
boynedmaster
Member
Join Date: Jun 2012
Old 05-02-2015 , 16:19   Re: Printing to console in an extension?
Reply With Quote #5

Quote:
Originally Posted by Miu View Post
uncomment #define SMEXT_CONF_METAMOD in smsdk_config.h in the sample extension template
\sourcemod-master\public\smsdk_ext.h(99): fatal error C1083: Cannot open include file: 'ISmmPlugin.h': No such file or directory

what now?
__________________
I mean Venusaur...with a question mark
boynedmaster is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 05-02-2015 , 17:06   Re: Printing to console in an extension?
Reply With Quote #6

You'll need to download the metamod source and set its include directories. There should be information here on how to set the MMSOURCE19 environment variable or set the directories manually.
Miu is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-02-2015 , 17:32   Re: Printing to console in an extension?
Reply With Quote #7

I recommend you use AMBuild to build your extension as SM uses it. Look at how SM's is setup and adapt for your extension.
__________________

Last edited by WildCard65; 05-02-2015 at 17:33.
WildCard65 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-02-2015 , 18:40   Re: Printing to console in an extension?
Reply With Quote #8

Or if you're a sane person and don't want to needlessly tie your extension to the engine SDK just to print to console, enable SMEXT_ENABLE_ROOTCONSOLEMENU in smsdk_config.h and use rootconsole->ConsolePrint().
__________________

Last edited by asherkin; 05-02-2015 at 18:40.
asherkin is offline
boynedmaster
Member
Join Date: Jun 2012
Old 05-02-2015 , 18:53   Re: Printing to console in an extension?
Reply With Quote #9

Quote:
Originally Posted by asherkin View Post
Or if you're a sane person and don't want to needlessly tie your extension to the engine SDK just to print to console, enable SMEXT_ENABLE_ROOTCONSOLEMENU in smsdk_config.h and use rootconsole->ConsolePrint().
Holy shit, thanks a lot!
__________________
I mean Venusaur...with a question mark
boynedmaster 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 22:07.


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