mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-27 23:35:36 +03:00
a445e806ea
- The logic around CS_OnBuy forward has been simplified. Since there is no way to have a consistent way to hook/block for all items, the new logic is to have as less as possible code, especially in blocking mode where we want to avoid to do extra stuffs (e.g blocking sound, event, etc). * All guns + shield -> CanBuyThis() * Nvgs and Fefuser only -> CanPlayerBuy() * The others items -> GiveNamedItem() + AddAccount() * Ammos -> -> BuyGunAmmo() + GiveNamedItem() + AddAccount() - Fixed missing buyzone check when alias from console are used (CS_OnBUy* were incorrectly fired). - Fixed an infinite loop when buying of ammos are blocked. Sorted by hooking BuyGunAmmo(). - Fixed blocking mode for some items. Some game behaviors were not blocked (e.g. weapon drop). - Fixed forwards being triggered even though errors were found. Detours are now a destroyed and associated variables resetted when necessary. Toggling forwards state is now based on detours state. - Moved things in its own functions (game functions to execute, class members retrieval) - Renamed CommandAliases -> ItemInfos (more generic)
483 lines
11 KiB
Plaintext
483 lines
11 KiB
Plaintext
/**
|
|
* Do not edit this file. Any changes will be overwritten by the gamedata
|
|
* updater or by upgrading your AMX Mod X install.
|
|
*
|
|
* To override data in this file, create a subdirectory named "custom" and
|
|
* place your own gamedata file(s) inside of it. Such files will be parsed
|
|
* after AMXX's own.
|
|
*
|
|
* For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(AMX_Mod_X)
|
|
*/
|
|
|
|
"Games"
|
|
{
|
|
"#default"
|
|
{
|
|
"Signatures"
|
|
{
|
|
"CanPlayerBuy" // bool CBasePlayer::CanPlayerBuy(bool display)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x51\x53\x55\x56\x57\x8B\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x2A\xFF"
|
|
"linux" "@_ZN11CBasePlayer12CanPlayerBuyEb"
|
|
"mac" "@_ZN11CBasePlayer12CanPlayerBuyEb"
|
|
}
|
|
|
|
"CanBuyThis" // bool CanBuyThis(CBasePlayer *pPlayer, int weaponId)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x53\x8B\x2A\x2A\x2A\x2A\x2A\x56\x8B\x2A\x2A\x2A\x57\x8B"
|
|
"linux" "@_Z10CanBuyThisP11CBasePlayeri"
|
|
"mac" "@_Z10CanBuyThisP11CBasePlayeri"
|
|
}
|
|
|
|
"AddAccount" // void CBasePlayer::AddAccount(int amount, bool bTrackChange)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x8B\x2A\x2A\x2A\x56\x8B\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x03"
|
|
"linux" "@_ZN11CBasePlayer10AddAccountEib"
|
|
"mac" "@_ZN11CBasePlayer10AddAccountEib"
|
|
}
|
|
|
|
"GiveNamedItem" // void CBasePlayer::GiveNamedItem(const char *pszName)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x8B\x2A\x2A\x2A\x56\x57\x8B\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x2B"
|
|
"linux" "@_ZN11CBasePlayer10GiveShieldEb"
|
|
"mac" "@_ZN11CBasePlayer10GiveShieldEb"
|
|
}
|
|
|
|
"GiveDefaultItems" // void CBasePlayer::GiveDefaultItems(void)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x56\x57\x6A\x2A\x8B\x2A\xE8\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\xC6"
|
|
"linux" "@_ZN11CBasePlayer10GiveShieldEb"
|
|
"mac" "@_ZN11CBasePlayer10GiveShieldEb"
|
|
}
|
|
|
|
"GiveShield" // void CBasePlayer::GiveShield(bool bRetire)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x56\x8B\x2A\x57\x33\x2A\x8B\x2A\x2A\x2A\x2A\x2A\xB0"
|
|
"linux" "@_ZN11CBasePlayer10GiveShieldEb"
|
|
"mac" "@_ZN11CBasePlayer10GiveShieldEb"
|
|
}
|
|
|
|
"CreateNamedEntity" // edict_t* CREATE_NAMED_ENTITY(int classname)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x56\x57\x8B\x2A\x2A\x2A\x57\xFF\x2A\x2A\x2A\x2A\x2A\x8B"
|
|
"linux" "@_Z19CREATE_NAMED_ENTITYj"
|
|
"mac" "@_Z19CREATE_NAMED_ENTITYj"
|
|
}
|
|
|
|
"FindEntityByString" // CBaseEntity *UTIL_FindEntityByString(CBaseEntity *pStartEntity, const char *szKeyword, const char *szValue)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x51\x8B\x2A\x2A\x2A\x53\x55\x56\x85\x2A\x57"
|
|
"linux" "@_Z23UTIL_FindEntityByStringP11CBaseEntityPKcS2_"
|
|
"mac" "@_Z23UTIL_FindEntityByStringP11CBaseEntityPKcS2_"
|
|
}
|
|
|
|
"GetWeaponInfo" // WeaponInfoStruct *GetWeaponInfo(int id);
|
|
{
|
|
"library" "server"
|
|
"windows" "\x8B\x2A\x2A\x2A\x2A\x2A\x33\x2A\x85\x2A\x56\x74\x2A\x8B"
|
|
"linux" "@_Z13GetWeaponInfoi"
|
|
"mac" "@_Z13GetWeaponInfoi"
|
|
}
|
|
|
|
"GetAmmoIndex" // int CBasePlayer::GetAmmoIndex(const char *psz)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x56\x57\x8B\x2A\x2A\x2A\x85\x2A\x74\x2A\xBE"
|
|
"linux" "@_ZN11CBasePlayer12GetAmmoIndexEPKc"
|
|
"mac" "@_ZN11CBasePlayer12GetAmmoIndexEPKc"
|
|
}
|
|
|
|
"BuyGunAmmo" // bool BuyGunAmmo(CBasePlayer *player, CBasePlayerItem *weapon, bool bBlinkMoney)
|
|
{
|
|
"library" "server"
|
|
"windows" "\x56\x57\x8B\x2A\x2A\x2A\x6A\x2A\x8B\x2A\xE8\x2A\x2A\x2A\x2A\x84\x2A\x0F"
|
|
"linux" "@_Z10BuyGunAmmoR11CBasePlayerR15CBasePlayerItemb"
|
|
"mac" "@_Z10BuyGunAmmoR11CBasePlayerR15CBasePlayerItemb"
|
|
}
|
|
}
|
|
}
|
|
|
|
"#default"
|
|
{
|
|
"Signatures"
|
|
{
|
|
"UseBotArgs" // bool UseBotArgs
|
|
{
|
|
"library" "server"
|
|
"windows" "\x8B\x2A\x2A\x2A\x56\x8B\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x03"
|
|
"linux" "@UseBotArgs"
|
|
"mac" "@UseBotArgs"
|
|
}
|
|
|
|
"BotArgs" // const char *BotArgs[4]
|
|
{
|
|
"library" "server"
|
|
"windows" "\x8B\x2A\x2A\x2A\x56\x8B\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x03"
|
|
"linux" "@BotArgs"
|
|
"mac" "@BotArgs"
|
|
}
|
|
}
|
|
|
|
"Offsets"
|
|
{
|
|
"UseBotArgs" // bool UseBotArgs
|
|
{
|
|
"windows" "2"
|
|
}
|
|
|
|
"BotArgs" // const char *BotArgs[4]
|
|
{
|
|
"windows" "22"
|
|
}
|
|
}
|
|
}
|
|
|
|
"#default"
|
|
{
|
|
"ItemInfos"
|
|
{
|
|
"CommonAlias"
|
|
{
|
|
"p228"
|
|
{
|
|
"itemid" "1" // CSW/I_P228
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"scout"
|
|
{
|
|
"itemid" "3" // CSW/I_SCOUT
|
|
"classid" "8" // CS_WEAPONCLASS_SNIPERRIFLE
|
|
}
|
|
"xm1014"
|
|
{
|
|
"itemid" "5" // CSW/I_XM1014
|
|
"classid" "5" // CS_WEAPONCLASS_SHOTGUN
|
|
}
|
|
"mac10"
|
|
{
|
|
"itemid" "7" // CSW/I_MAC10
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"aug"
|
|
{
|
|
"itemid" "8" // CSW/I_AUG
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"elites"
|
|
{
|
|
"itemid" "10" // CSW/I_ELITE
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"fn57"
|
|
{
|
|
"itemid" "11" // CSW/I_FIVESEVEN
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"ump45"
|
|
{
|
|
"itemid" "12" // CSW/I_UMP45
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"sg550"
|
|
{
|
|
"itemid" "13" // CSW/I_SG550
|
|
"classid" "8" // CS_WEAPONCLASS_SNIPERRIFLE
|
|
}
|
|
"galil"
|
|
{
|
|
"itemid" "14" // CSW/I_GALIL
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"famas"
|
|
{
|
|
"itemid" "15" // CSW/I_FAMAS
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"usp"
|
|
{
|
|
"itemid" "16" // CSW/I_USP
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"glock"
|
|
{
|
|
"itemid" "17" // CSW/I_GLOCK18
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"awp"
|
|
{
|
|
"itemid" "18" // CSW/I_AWP
|
|
"classid" "8" // CS_WEAPONCLASS_SNIPERRIFLE
|
|
}
|
|
"mp5"
|
|
{
|
|
"itemid" "19" // CSW/I_MP5NAVY
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"m249"
|
|
{
|
|
"itemid" "20" // CSW/I_M249
|
|
"classid" "6" // CS_WEAPONCLASS_MACHINEGUN
|
|
}
|
|
"m3"
|
|
{
|
|
"itemid" "21" // CSW/I_M3
|
|
"classid" "5" // CS_WEAPONCLASS_SHOTGUN
|
|
}
|
|
"m4a1"
|
|
{
|
|
"itemid" "22" // CSW/I_M4A1
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"tmp"
|
|
{
|
|
"itemid" "23" // CSW/I_TMP
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"g3sg1"
|
|
{
|
|
"itemid" "24" // CSW/I_G3SG1
|
|
"classid" "8" // CS_WEAPONCLASS_SNIPERRIFLE
|
|
}
|
|
"deagle"
|
|
{
|
|
"itemid" "26" // CSW/I_DEAGLE
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"sg552"
|
|
{
|
|
"itemid" "27" // CSW/I_SG552
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"ak47"
|
|
{
|
|
"itemid" "28" // CSW/I_AK47
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"p90"
|
|
{
|
|
"itemid" "30" // CSW/I_P90
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"fiveseven"
|
|
{
|
|
"itemid" "11" // CSW/I_FIVESEVEN
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
}
|
|
|
|
"WeaponAlias"
|
|
{
|
|
"grenade"
|
|
{
|
|
"itemid" "4" // CSW/I_HEGRENADE
|
|
"classid" "3" // CS_WEAPONCLASS_GRENADE
|
|
}
|
|
"hegrenade"
|
|
{
|
|
"itemid" "4" // CSW/I_HEGRENADE
|
|
"classid" "3" // CS_WEAPONCLASS_GRENADE
|
|
}
|
|
"c4"
|
|
{
|
|
"itemid" "6" // CSW/I_C4
|
|
"classid" "3" // CS_WEAPONCLASS_GRENADE
|
|
}
|
|
"elite"
|
|
{
|
|
"itemid" "10" // CSW/I_ELITE
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"glock18"
|
|
{
|
|
"itemid" "17" // CSW/I_GLOCK18
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"mp5navy"
|
|
{
|
|
"itemid" "19" // CSW/I_MP5NAVY
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"knife"
|
|
{
|
|
"itemid" "29" // CSW/I_KNIFE
|
|
"classid" "1" // CS_WEAPONCLASS_KNIFE
|
|
}
|
|
}
|
|
|
|
"BuyAlias"
|
|
{
|
|
"228compact"
|
|
{
|
|
"itemid" "1" // CSW/I_P228
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"autoshotgun"
|
|
{
|
|
"itemid" "5" // CSW/I_XM1014
|
|
"classid" "5" // CS_WEAPONCLASS_SHOTGUN
|
|
}
|
|
"bullpup"
|
|
{
|
|
"itemid" "8" // CSW/I_AUG
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"sg550"
|
|
{
|
|
"itemid" "13" // CSW/I_SG550
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"krieg550"
|
|
{
|
|
"itemid" "13" // CSW/I_SG550
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"defender"
|
|
{
|
|
"itemid" "14" // CSW/I_GALIL
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"clarion"
|
|
{
|
|
"itemid" "15" // CSW/I_FAMAS
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"km45"
|
|
{
|
|
"itemid" "16" // CSW/I_USP
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"9x19mm"
|
|
{
|
|
"itemid" "17" // CSW/I_GLOCK18
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"magnum"
|
|
{
|
|
"itemid" "18" // CSW/I_AWP
|
|
"classid" "8" // CS_WEAPONCLASS_SNIPERRIFLE
|
|
}
|
|
"smg"
|
|
{
|
|
"itemid" "19" // CSW/I_MP5NAVY
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"12gauge"
|
|
{
|
|
"itemid" "21" // CSW/I_M3
|
|
"classid" "5" // CS_WEAPONCLASS_SHOTGUN
|
|
}
|
|
"mp"
|
|
{
|
|
"itemid" "23" // CSW/I_TMP
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
"d3au1"
|
|
{
|
|
"itemid" "24" // CSW/I_G3SG1
|
|
"classid" "8" // CS_WEAPONCLASS_SNIPERRIFLE
|
|
}
|
|
"nighthawk"
|
|
{
|
|
"itemid" "26" // CSW/I_DEAGLE
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
}
|
|
"krieg552"
|
|
{
|
|
"itemid" "27" // CSW/I_SG552
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"cv47"
|
|
{
|
|
"itemid" "28" // CSW/I_AK47
|
|
"classid" "7" // CS_WEAPONCLASS_RIFLE
|
|
}
|
|
"c90"
|
|
{
|
|
"itemid" "30" // CSW/I_P90
|
|
"classid" "4" // CS_WEAPONCLASS_SUBMACHINEGUN
|
|
}
|
|
}
|
|
|
|
"BuyEquipAlias"
|
|
{
|
|
"hegren"
|
|
{
|
|
"itemid" "4" // CSW/I_HEGRENADE
|
|
"classid" "3" // CS_WEAPONCLASS_GRENADE
|
|
"price" "300"
|
|
}
|
|
"sgren"
|
|
{
|
|
"itemid" "9" // CSW/I_SMOKEGRENADE
|
|
"classid" "3" // CS_WEAPONCLASS_GRENADE
|
|
"price" "300"
|
|
}
|
|
"flash"
|
|
{
|
|
"itemid" "25" // CSW/I_FLASHBANG
|
|
"classid" "3" // CS_WEAPONCLASS_GRENADE
|
|
"price" "200"
|
|
}
|
|
"vest"
|
|
{
|
|
"itemid" "31" // CSW/I_VEST
|
|
"classname" "item_kevlar"
|
|
"price" "650"
|
|
}
|
|
"vesthelm"
|
|
{
|
|
"itemid" "32" // CSW/I_VESTHELM
|
|
"classname" "item_assaultsuit"
|
|
"price" "1000"
|
|
}
|
|
"defuser"
|
|
{
|
|
"itemid" "33" // CSI_DEFUSER
|
|
"classname" "item_thighpack"
|
|
"price" "200"
|
|
}
|
|
"nvgs"
|
|
{
|
|
"itemid" "34" // CSI_NVGS
|
|
"price" "1250"
|
|
}
|
|
"shield"
|
|
{
|
|
"itemid" "35" // CSI_SHIELD
|
|
"classid" "2" // CS_WEAPONCLASS_PISTOL
|
|
"classname" "weapon_shield"
|
|
}
|
|
}
|
|
|
|
"BuyAmmoAlias"
|
|
{
|
|
"primammo"
|
|
{
|
|
"itemid" "36" // CSI_PRIAMMO
|
|
}
|
|
"secammo"
|
|
{
|
|
"itemid" "37" // CSI_SECAMMO
|
|
}
|
|
"buyammo1"
|
|
{
|
|
"itemid" "36" // CSI_PRIAMMO
|
|
}
|
|
"buyammo2"
|
|
{
|
|
"itemid" "37" // CSI_SECAMMO
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|