2009-05-29 08:43:15 +02:00
|
|
|
/*
|
|
|
|
* ============================================================================
|
|
|
|
*
|
|
|
|
* Zombie:Reloaded
|
|
|
|
*
|
|
|
|
* File:
|
|
|
|
* Type: Module
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Variable to store buyzone offset value.
|
|
|
|
*/
|
|
|
|
new g_iToolsInBuyZone;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize market data.
|
|
|
|
*/
|
|
|
|
ZMarketInit()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find ZMarket-specific offsets here.
|
|
|
|
*/
|
|
|
|
ZMarketOnOffsetsFound()
|
|
|
|
{
|
|
|
|
// If offset "m_bInBuyZone" can't be found, then stop the plugin.
|
|
|
|
g_iToolsInBuyZone = FindSendPropInfo("CCSPlayer", "m_bInBuyZone");
|
|
|
|
if (g_iToolsInBuyZone == -1)
|
|
|
|
{
|
2009-06-01 23:29:26 +02:00
|
|
|
LogEvent(false, LogType_Fatal, LOG_CORE_EVENTS, LogModule_Weapons, "Offsets", "Offset \"CCSPlayer::m_bInBuyZone\" was not found.");
|
2009-05-29 08:43:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if a client is in a buyzone.
|
|
|
|
*
|
|
|
|
* @param client The client index.
|
|
|
|
*/
|
|
|
|
stock bool:ZMarketIsClientInBuyZone(client)
|
|
|
|
{
|
|
|
|
// Return if client is in buyzone.
|
|
|
|
return bool:GetEntData(client, g_iToolsInBuyZone);
|
|
|
|
}
|