Check game include depending on it.
Can you depending on the game include for example <cstrike> only if the mod is cs and <DoDX> only if the mod is dod. cuz as you know the mod wont load if the <DoDX> in cs.
|
Re: Check game include depending on it.
I think you can use this: get_modname ( name[], len ). :wink:
|
Re: Check game include depending on it.
To prevent the incorrect module from loading you probably need to use preprocessor directives. However, this would require a separate compile for each mod. But, the advantage, in my opinion, is that the majority of code is going to be independent of the mod so having it all in one file is good for when you update non-mod specific code.
|
Re: Check game include depending on it.
What i want to do is to check for the game, then if it is cstrike load <cstrike> and then i have some code in a csstrike.inl which is game specific. the main mod is to handle the basics and load the right .inl.
|
Re: Check game include depending on it.
What is a .inl?
I don't think it's possible. Use my suggestion. |
Re: Check game include depending on it.
.inl is an inline file and i ame already using them for my mods. take a look at fx bf2 mod and see how he uses .inl files.
|
Re: Check game include depending on it.
Check out module filters.
|
Re: Check game include depending on it.
So you can actually use some module functions without including the actual module? wierd but ok, i'll give it a try.
|
Re: Check game include depending on it.
Quote:
|
Re: Check game include depending on it.
If you need an example, you can see it being used in this plugin: http://forums.alliedmods.net/showthread.php?t=57863
|
| All times are GMT -4. The time now is 17:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.