Implemented cheat command impulse 255. Closed #301

This commit is contained in:
s1lent 2019-08-14 02:52:09 +07:00
parent f96ca908db
commit 6e9ece411b
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -6089,6 +6089,7 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse)
switch (iImpulse)
{
case 76:
{
if (!giPrecacheGrunt)
{
giPrecacheGrunt = 1;
@ -6100,6 +6101,7 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse)
CBaseEntity::Create("monster_human_grunt", pev->origin + gpGlobals->v_forward * 128, pev->angles);
}
break;
}
case 101:
gEvilImpulse101 = TRUE;
AddAccount(16000);
@ -6247,6 +6249,35 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse)
}
break;
}
#ifdef REGAMEDLL_ADD
case 255:
{
// Give weapons
for (int wpnid = WEAPON_NONE + 1; wpnid < MAX_WEAPONS; wpnid++)
{
// unwanted candidates
if (wpnid == WEAPON_GLOCK
|| wpnid == WEAPON_C4
|| wpnid == WEAPON_KNIFE)
continue;
// If by some case the weapon got invalid
const auto pInfo = GetWeaponInfo(wpnid);
if (pInfo) {
GiveNamedItemEx(pInfo->entityName);
GiveAmmo(pInfo->maxRounds, pInfo->ammoName2);
}
}
#ifdef REGAMEDLL_API
CSPlayer()->m_iWeaponInfiniteAmmo = WPNMODE_INFINITE_BPAMMO;
#endif
GiveNamedItemEx("item_longjump");
GiveNamedItemEx("item_thighpack");
GiveNamedItemEx("item_kevlar");
break;
}
#endif
}
}