Put infection handling in its own core module, added infect sound to downloads table, updated cvars, made an account module (handles cash), zombies now drop weapons on infect (all of them), removed RemoveAllItems, weapon api can handle it and its unneeded now.
This commit is contained in:
@ -1,11 +1,19 @@
|
||||
/**
|
||||
* ====================
|
||||
/*
|
||||
* ============================================================================
|
||||
*
|
||||
* Zombie:Reloaded
|
||||
* File: markethandler.inc
|
||||
* Author: Greyscale
|
||||
* ====================
|
||||
*
|
||||
* File: markethandler.inc
|
||||
* Description: Handles market (optional plugin) API, natives, and forwards.
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* Global variable set to true if market plugin is installed
|
||||
*/
|
||||
new bool:g_bMarket;
|
||||
|
||||
/**
|
||||
* Sends market menu to client.
|
||||
*
|
||||
@ -30,7 +38,7 @@ bool:ZMarketSend(client)
|
||||
}
|
||||
|
||||
// Check buyzone cvar to see if client has to be in a buyzone to use.
|
||||
new bool:buyzone = GetConVarBool(g_hCvarsList[CVAR_ZMARKET_BUYZONE]);
|
||||
new bool:buyzone = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]);
|
||||
if (!IsClientInBuyZone(client) && buyzone)
|
||||
{
|
||||
// Tell client they must be in a buyzone.
|
||||
@ -106,7 +114,7 @@ public bool:Market_OnWeaponSelected(client, String:weaponid[])
|
||||
}
|
||||
|
||||
// Check if buyzone cvar is enabled, and if the client is in a buyzone.
|
||||
new bool:buyzone = GetConVarBool(g_hCvarsList[CVAR_ZMARKET_BUYZONE]);
|
||||
new bool:buyzone = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]);
|
||||
if (!IsClientInBuyZone(client) && buyzone)
|
||||
{
|
||||
ZR_PrintCenterText(client, "Market out of buyzone");
|
||||
|
@ -422,7 +422,7 @@ WeaponsMenuMarket(client)
|
||||
decl String:togglebuyzone[64];
|
||||
|
||||
decl String:curSetting[8];
|
||||
ZRBoolToConfigSetting(GetConVarBool(g_hCvarsList[CVAR_ZMARKET_BUYZONE]), curSetting, sizeof(curSetting));
|
||||
ZRBoolToConfigSetting(GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]), curSetting, sizeof(curSetting));
|
||||
|
||||
Format(togglebuyzone, sizeof(togglebuyzone), "%t", "Weapons menu market toggle buyzone", curSetting);
|
||||
|
||||
@ -451,13 +451,13 @@ public WeaponsMenuMarketHandle(Handle:menu_weapons_market, MenuAction:action, cl
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if (GetConVarBool(g_hCvarsList[CVAR_ZMARKET_BUYZONE]))
|
||||
if (GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]))
|
||||
{
|
||||
SetConVarBool(g_hCvarsList[CVAR_ZMARKET_BUYZONE], false);
|
||||
SetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE], false);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetConVarBool(g_hCvarsList[CVAR_ZMARKET_BUYZONE], true);
|
||||
SetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ Float:WeaponGetWeaponKnockback(const String:weapon[])
|
||||
/**
|
||||
* General weapon API.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Return an array that contains all client's weapon indexes.
|
||||
*
|
||||
@ -358,4 +358,16 @@ WeaponsType:WeaponsGetDeployedWeaponSlot(client)
|
||||
}
|
||||
|
||||
return Type_Invalid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces player to drop weapon index.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param weapon The weapon index to force client to drop.
|
||||
*/
|
||||
WeaponForceClientDrop(client, weapon)
|
||||
{
|
||||
// Force client to drop weapon.
|
||||
SDKCall(g_hCSWeaponDrop, client, weapon, true, false);
|
||||
}
|
Reference in New Issue
Block a user