Cstrike: Add CSI_SHIELD for convenience and fix typos
This commit is contained in:
parent
939aad5cb9
commit
1ed354890b
|
@ -19,42 +19,42 @@
|
||||||
/**
|
/**
|
||||||
* Weapon Ids for use with CS_OnBuyAttempt(), CS_OnBuy().
|
* Weapon Ids for use with CS_OnBuyAttempt(), CS_OnBuy().
|
||||||
*/
|
*/
|
||||||
#define CSI_P228 CSW_P228
|
#define CSI_P228 CSW_P228
|
||||||
#define CSI_SCOUT CSW_SCOUT
|
#define CSI_SCOUT CSW_SCOUT
|
||||||
#define CSI_HEGRENADE CSW_HEGRENADE
|
#define CSI_HEGRENADE CSW_HEGRENADE
|
||||||
#define CSI_XM1014 CSW_XM1014
|
#define CSI_XM1014 CSW_XM1014
|
||||||
#define CSI_C4 CSW_C4
|
#define CSI_C4 CSW_C4
|
||||||
#define CSI_MAC10 CSW_MAC10
|
#define CSI_MAC10 CSW_MAC10
|
||||||
#define CSI_AUG CSW_AUG
|
#define CSI_AUG CSW_AUG
|
||||||
#define CSI_SMOKEGRENADE CSW_SMOKEGRENADE
|
#define CSI_SMOKEGRENADE CSW_SMOKEGRENADE
|
||||||
#define CSI_ELITE CSW_ELITE
|
#define CSI_ELITE CSW_ELITE
|
||||||
#define CSI_FIVESEVEN CSW_FIVESEVEN
|
#define CSI_FIVESEVEN CSW_FIVESEVEN
|
||||||
#define CSI_UMP45 CSW_UMP45
|
#define CSI_UMP45 CSW_UMP45
|
||||||
#define CSI_SG550 CSW_SG550
|
#define CSI_SG550 CSW_SG550
|
||||||
#define CSI_GALI CSW_GALI
|
#define CSI_GALIL CSW_GALIL
|
||||||
#define CSI_FAMAS CSW_FAMAS
|
#define CSI_FAMAS CSW_FAMAS
|
||||||
#define CSI_USP CSW_USP
|
#define CSI_USP CSW_USP
|
||||||
#define CSI_GLOCK18 CSW_GLOCK18
|
#define CSI_GLOCK18 CSW_GLOCK18
|
||||||
#define CSI_AWP CSW_AWP
|
#define CSI_AWP CSW_AWP
|
||||||
#define CSI_MP5NAVY CSW_MP5NAVY
|
#define CSI_MP5NAVY CSW_MP5NAVY
|
||||||
#define CSI_M249 CSW_M249
|
#define CSI_M249 CSW_M249
|
||||||
#define CSI_M3 CSW_M3
|
#define CSI_M3 CSW_M3
|
||||||
#define CSI_M4A1 CSW_M4A1
|
#define CSI_M4A1 CSW_M4A1
|
||||||
#define CSI_TMP CSW_TMP
|
#define CSI_TMP CSW_TMP
|
||||||
#define CSI_G3SG1 CSW_G3SG1
|
#define CSI_G3SG1 CSW_G3SG1
|
||||||
#define CSI_FLASHBANG CSW_FLASHBANG
|
#define CSI_FLASHBANG CSW_FLASHBANG
|
||||||
#define CSI_DEAGLE CSW_DEAGLE
|
#define CSI_DEAGLE CSW_DEAGLE
|
||||||
#define CSI_SG552 CSW_SG552
|
#define CSI_SG552 CSW_SG552
|
||||||
#define CSI_AK47 CSW_AK47
|
#define CSI_AK47 CSW_AK47
|
||||||
#define CSI_KNIFE CSW_KNIFE
|
#define CSI_P90 CSW_P90
|
||||||
#define CSI_P90 CSW_P90
|
#define CSI_SHIELDGUN CSW_SHIELDGUN // The real CS value, use CSI_SHELD instead.
|
||||||
#define CSI_SHIELDGUN CSW_SHIELDGUN
|
#define CSI_VEST CSW_VEST // Custom
|
||||||
#define CSI_VEST CSW_VEST // Custom
|
#define CSI_VESTHELM CSW_VESTHELM // Custom
|
||||||
#define CSI_VESTHELM CSW_VESTHELM // Custom
|
#define CSI_DEFUSER 33 // Custom
|
||||||
#define CSI_DEFUSER 33 // Custom
|
#define CSI_NVGS 34 // Custom
|
||||||
#define CSI_NVGS 34 // Custom
|
#define CSI_PRIAMMO 36 // Custom
|
||||||
#define CSI_PRIMAMMO 36 // Custom
|
#define CSI_SECAMMO 37 // Custom
|
||||||
#define CSI_SECAMMO 37 // Custom
|
#define CSI_SHIELD 38 // Custom - The value passed by the forward, more convenient for plugins.
|
||||||
|
|
||||||
#define BITS_PISTOLS (1<<CSI_GLOCK18 | 1<<CSI_USP | 1<<CSI_P228 | 1<<CSI_DEAGLE | 1<<CSI_ELITE | 1<<CSI_FIVESEVEN)
|
#define BITS_PISTOLS (1<<CSI_GLOCK18 | 1<<CSI_USP | 1<<CSI_P228 | 1<<CSI_DEAGLE | 1<<CSI_ELITE | 1<<CSI_FIVESEVEN)
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
#define CSW_FIVESEVEN 11
|
#define CSW_FIVESEVEN 11
|
||||||
#define CSW_UMP45 12
|
#define CSW_UMP45 12
|
||||||
#define CSW_SG550 13
|
#define CSW_SG550 13
|
||||||
#define CSW_GALI 14
|
#define CSW_GALIL 14
|
||||||
#define CSW_FAMAS 15
|
#define CSW_FAMAS 15
|
||||||
#define CSW_USP 16
|
#define CSW_USP 16
|
||||||
#define CSW_GLOCK18 17
|
#define CSW_GLOCK18 17
|
||||||
|
|
|
@ -110,9 +110,9 @@ DETOUR_DECL_STATIC1(C_ClientCommand, void, edict_t*, pEdict) // void ClientComma
|
||||||
{
|
{
|
||||||
static const int menuItemsTe[][9] =
|
static const int menuItemsTe[][9] =
|
||||||
{
|
{
|
||||||
/* Menu_Buy */ { 0, 0, 0, 0, 0, 0, CSI_PRIMAMMO, CSI_SECAMMO, 0 },
|
/* Menu_Buy */ { 0, 0, 0, 0, 0, 0, CSI_PRIAMMO, CSI_SECAMMO, 0 },
|
||||||
/* Menu_BuyPistol */ { 0, CSI_GLOCK18, CSI_USP, CSI_P228, CSI_DEAGLE, CSI_ELITE, 0, 0, 0 },
|
/* Menu_BuyPistol */ { 0, CSI_GLOCK18, CSI_USP, CSI_P228, CSI_DEAGLE, CSI_ELITE, 0, 0, 0 },
|
||||||
/* Menu_BuyRifle */ { 0, CSI_GALI, CSI_AK47, CSI_SCOUT, CSI_SG552, CSI_AWP, CSI_G3SG1, 0, 0 },
|
/* Menu_BuyRifle */ { 0, CSI_GALIL, CSI_AK47, CSI_SCOUT, CSI_SG552, CSI_AWP, CSI_G3SG1, 0, 0 },
|
||||||
/* Menu_BuyMachineGun */ { 0, CSI_M249, 0, 0, 0, 0, 0, 0, 0 },
|
/* Menu_BuyMachineGun */ { 0, CSI_M249, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
/* Menu_BuyShotgun */ { 0, CSI_M3, CSI_XM1014, 0, 0, 0, 0, 0, 0 },
|
/* Menu_BuyShotgun */ { 0, CSI_M3, CSI_XM1014, 0, 0, 0, 0, 0, 0 },
|
||||||
/* Menu_BuySubMachineGun */ { 0, CSI_MAC10, CSI_MP5NAVY, CSI_UMP45, CSI_P90, 0, 0, 0, 0 },
|
/* Menu_BuySubMachineGun */ { 0, CSI_MAC10, CSI_MP5NAVY, CSI_UMP45, CSI_P90, 0, 0, 0, 0 },
|
||||||
|
@ -121,7 +121,7 @@ DETOUR_DECL_STATIC1(C_ClientCommand, void, edict_t*, pEdict) // void ClientComma
|
||||||
|
|
||||||
static const int menuItemsCt[][9] =
|
static const int menuItemsCt[][9] =
|
||||||
{
|
{
|
||||||
/* Menu_Buy */ { 0, 0, 0, 0, 0, 0, CSI_PRIMAMMO, CSI_SECAMMO, 0 },
|
/* Menu_Buy */ { 0, 0, 0, 0, 0, 0, CSI_PRIAMMO, CSI_SECAMMO, 0 },
|
||||||
/* Menu_BuyPistol */ { 0, CSI_GLOCK18, CSI_USP, CSI_P228, CSI_DEAGLE, CSI_FIVESEVEN, 0, 0, 0 },
|
/* Menu_BuyPistol */ { 0, CSI_GLOCK18, CSI_USP, CSI_P228, CSI_DEAGLE, CSI_FIVESEVEN, 0, 0, 0 },
|
||||||
/* Menu_BuyRifle */ { 0, CSI_FAMAS, CSI_SCOUT, CSI_M4A1, CSI_AUG, CSI_SG550, CSI_AWP, 0, 0 },
|
/* Menu_BuyRifle */ { 0, CSI_FAMAS, CSI_SCOUT, CSI_M4A1, CSI_AUG, CSI_SG550, CSI_AWP, 0, 0 },
|
||||||
/* Menu_BuyMachineGun */ { 0, CSI_M249, 0, 0, 0, 0, 0, 0, 0 },
|
/* Menu_BuyMachineGun */ { 0, CSI_M249, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
@ -353,7 +353,7 @@ void ToggleDetour_ClientCommands(bool enable)
|
||||||
{ "elites" , CSI_ELITE }, { "fn57" , CSI_FIVESEVEN },
|
{ "elites" , CSI_ELITE }, { "fn57" , CSI_FIVESEVEN },
|
||||||
{ "fiveseven" , CSI_FIVESEVEN }, { "ump45" , CSI_UMP45 },
|
{ "fiveseven" , CSI_FIVESEVEN }, { "ump45" , CSI_UMP45 },
|
||||||
{ "sg550" , CSI_SG550 }, { "krieg550" , CSI_SG550 },
|
{ "sg550" , CSI_SG550 }, { "krieg550" , CSI_SG550 },
|
||||||
{ "galil" , CSI_GALI }, { "defender" , CSI_GALI },
|
{ "galil" , CSI_GALIL }, { "defender" , CSI_GALIL },
|
||||||
{ "famas" , CSI_FAMAS }, { "clarion" , CSI_FAMAS },
|
{ "famas" , CSI_FAMAS }, { "clarion" , CSI_FAMAS },
|
||||||
{ "usp" , CSI_USP }, { "km45" , CSI_USP },
|
{ "usp" , CSI_USP }, { "km45" , CSI_USP },
|
||||||
{ "glock" , CSI_GLOCK18 }, { "9x19mm" , CSI_GLOCK18 },
|
{ "glock" , CSI_GLOCK18 }, { "9x19mm" , CSI_GLOCK18 },
|
||||||
|
@ -370,7 +370,7 @@ void ToggleDetour_ClientCommands(bool enable)
|
||||||
{ "c90" , CSI_P90 }, { "vest" , CSI_VEST },
|
{ "c90" , CSI_P90 }, { "vest" , CSI_VEST },
|
||||||
{ "vesthelm" , CSI_VESTHELM }, { "defuser" , CSI_DEFUSER },
|
{ "vesthelm" , CSI_VESTHELM }, { "defuser" , CSI_DEFUSER },
|
||||||
{ "nvgs" , CSI_NVGS }, { "shield" , CSI_SHIELDGUN },
|
{ "nvgs" , CSI_NVGS }, { "shield" , CSI_SHIELDGUN },
|
||||||
{ "buyammo1" , CSI_PRIMAMMO }, { "primammo" , CSI_PRIMAMMO },
|
{ "buyammo1" , CSI_PRIAMMO }, { "primammo" , CSI_PRIAMMO },
|
||||||
{ "buyammo2" , CSI_SECAMMO }, { "secammo" , CSI_SECAMMO },
|
{ "buyammo2" , CSI_SECAMMO }, { "secammo" , CSI_SECAMMO },
|
||||||
{ nullptr , 0 }
|
{ nullptr , 0 }
|
||||||
};
|
};
|
||||||
|
|
|
@ -127,13 +127,14 @@ enum
|
||||||
#define CSI_SG552 CSW_SG552
|
#define CSI_SG552 CSW_SG552
|
||||||
#define CSI_AK47 CSW_AK47
|
#define CSI_AK47 CSW_AK47
|
||||||
#define CSI_P90 CSW_P90
|
#define CSI_P90 CSW_P90
|
||||||
#define CSI_SHIELDGUN CSW_SHIELDGUN
|
#define CSI_SHIELDGUN CSW_SHIELDGUN // The real CS value, use CSI_SHELD instead.
|
||||||
#define CSI_VEST CSW_VEST // Custom
|
#define CSI_VEST CSW_VEST // Custom
|
||||||
#define CSI_VESTHELM CSW_VESTHELM // Custom
|
#define CSI_VESTHELM CSW_VESTHELM // Custom
|
||||||
#define CSI_DEFUSER 33 // Custom
|
#define CSI_DEFUSER 33 // Custom
|
||||||
#define CSI_NVGS 34 // Custom
|
#define CSI_NVGS 34 // Custom
|
||||||
#define CSI_PRIAMMO 36 // Custom
|
#define CSI_PRIAMMO 36 // Custom
|
||||||
#define CSI_SECAMMO 37 // Custom
|
#define CSI_SECAMMO 37 // Custom
|
||||||
|
#define CSI_SHIELD 38 // Custom - The value passed by the forward, more convenient for plugins.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns client's deaths.
|
* Returns client's deaths.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user