Raised This Month: $ Target: $400
 0% 

[STOCKS] Useful TF2 Functions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 03-26-2008 , 21:15   Re: [STOCKS] Useful TF2 Functions
Reply With Quote #6

That's not how it works. Only the following line is inside of the if statement. All that statement does is check if sdktools is already included, and if it isn't, it includes it. As for the static thing, the global variables are needed in the main file, so using static would eliminate that because it limits it to that one include file. At least that's how I understand it. I guess I could use it for the hGameConfTF part, but the hWeaponEquip might be needed elsewhere.

[edit]

To better explain the if statement, if I were to have used brackets there, it would look like this:
PHP Code:
stock TF_LoadGameData()
{
    if (!
LibraryExists("sdktools"))
    {
        
#include <sdktools>
    
}
    
hGameConf LoadGameConfigFile("include.tf");

    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetFromConf(hGameConfSDKConf_Virtual"WeaponEquip");
    
PrepSDKCall_AddParameter(SDKType_CBaseEntitySDKPass_Pointer);
    
hWeaponEquip EndPrepSDKCall();

They work exactly the same way.

Last edited by bl4nk; 03-26-2008 at 21:36.
bl4nk is offline
 



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 21:48.


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