Raised This Month: $ Target: $400
 0% 

Solved [ H3LP ] Check Running Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-02-2017 , 08:04   Re: [ H3LP ] Check Running Mod
Reply With Quote #1

No, #if, #endif and similar (preprocessor directives) are evaluated at compile-time. The compiler can't know on which game you'll be running your plugin.
You can let the user compiling your code to choose it by having them define what game it is (like #define GAME_TFC or #define GAME_VALVE) but that's as far as you can get, you'll have to resort to runtime checks, like what Edon has shown.

Last edited by klippy; 08-02-2017 at 08:05.
klippy 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:50.


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