View Single Post
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-13-2013 , 11:12   Re: [CSS] Gun Menu - A Pawn only (smx) interpretation of CSS:DM
Reply With Quote #9

PHP Code:
m_iHealth FindSendPropOffs("CCSPlayer""m_iHealth");
    
m_ArmorValue FindSendPropOffs("CCSPlayer""m_ArmorValue");
    
m_bHasHelmet FindSendPropOffs("CCSPlayer""m_bHasHelmet");
    
m_bHasDefuser FindSendPropOffs("CCSPlayer""m_bHasDefuser");
    
m_bHasNightVision FindSendPropOffs("CCSPlayer""m_bHasNightVision"); 
You're bypassing SourceMod's safety checking an caching by doing this, just use GetEntProp.

You don't need to close handles in OnPluginEnd, SourceMod will do the cleanup.

PHP Code:
    // Work around A2S_RULES bug in linux orange box
    
SetConVarString(g_ConVar_VersionPLUGIN_VERSION); 
This hasn't been needed in quite a while.
__________________
asherkin is offline