mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-13 05:51:19 +00:00
Replace impulse 101 cheat on "imacheater" cmd.
This commit is contained in:
parent
054fd34cd6
commit
88a1c336ea
@ -487,6 +487,7 @@ called each time a player uses a "cmd" command
|
|||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
extern float g_flWeaponCheat;
|
extern float g_flWeaponCheat;
|
||||||
|
extern int gEvilImpulse101;
|
||||||
|
|
||||||
// Use CMD_ARGV, CMD_ARGV, and CMD_ARGC to get pointers the character string command.
|
// Use CMD_ARGV, CMD_ARGV, and CMD_ARGC to get pointers the character string command.
|
||||||
void ClientCommand( edict_t *pEntity )
|
void ClientCommand( edict_t *pEntity )
|
||||||
@ -520,6 +521,33 @@ void ClientCommand( edict_t *pEntity )
|
|||||||
GetClassPtr( (CBasePlayer *)pev )->GiveNamedItem( STRING( iszItem ) );
|
GetClassPtr( (CBasePlayer *)pev )->GiveNamedItem( STRING( iszItem ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if( FStrEq( pcmd, "imacheater" ) )
|
||||||
|
{
|
||||||
|
if( g_flWeaponCheat != 0.0 )
|
||||||
|
{
|
||||||
|
CBasePlayer *pPlayer = GetClassPtr( (CBasePlayer *)pev );
|
||||||
|
gEvilImpulse101 = TRUE;
|
||||||
|
pPlayer->GiveNamedItem( "item_suit" );
|
||||||
|
pPlayer->GiveNamedItem( "item_battery" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_crowbar" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_9mmhandgun" );
|
||||||
|
pPlayer->GiveNamedItem( "ammo_9mmclip" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_shotgun" );
|
||||||
|
pPlayer->GiveNamedItem( "ammo_buckshot" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_9mmAR" );
|
||||||
|
pPlayer->GiveNamedItem( "ammo_9mmAR" );
|
||||||
|
pPlayer->GiveNamedItem( "ammo_ARgrenades" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_crossbow" );
|
||||||
|
pPlayer->GiveNamedItem( "ammo_crossbow" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_satchel" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_snark" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_ak47" );
|
||||||
|
pPlayer->GiveNamedItem( "ammo_ak47" );
|
||||||
|
pPlayer->GiveNamedItem( "weapon_mac10" );
|
||||||
|
pPlayer->GiveNamedItem( "ammo_mac10" );
|
||||||
|
gEvilImpulse101 = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if( FStrEq( pcmd, "fire" ) )
|
else if( FStrEq( pcmd, "fire" ) )
|
||||||
{
|
{
|
||||||
if( g_flWeaponCheat != 0.0 )
|
if( g_flWeaponCheat != 0.0 )
|
||||||
|
@ -3464,45 +3464,6 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse )
|
|||||||
|
|
||||||
switch( iImpulse )
|
switch( iImpulse )
|
||||||
{
|
{
|
||||||
case 76:
|
|
||||||
if( !giPrecacheGrunt )
|
|
||||||
{
|
|
||||||
giPrecacheGrunt = 1;
|
|
||||||
ALERT( at_console, "You must now restart to use Grunt-o-matic.\n" );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UTIL_MakeVectors( Vector( 0, pev->v_angle.y, 0 ) );
|
|
||||||
Create( "monster_human_grunt", pev->origin + gpGlobals->v_forward * 128, pev->angles );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 101:
|
|
||||||
GiveNamedItem( "item_suit" );
|
|
||||||
GiveNamedItem( "item_battery" );
|
|
||||||
GiveNamedItem( "weapon_crowbar" );
|
|
||||||
GiveNamedItem( "weapon_9mmhandgun" );
|
|
||||||
GiveNamedItem( "ammo_9mmclip" );
|
|
||||||
GiveNamedItem( "weapon_shotgun" );
|
|
||||||
GiveNamedItem( "ammo_buckshot" );
|
|
||||||
GiveNamedItem( "weapon_9mmAR" );
|
|
||||||
GiveNamedItem( "ammo_9mmAR" );
|
|
||||||
GiveNamedItem( "ammo_ARgrenades" );
|
|
||||||
GiveNamedItem( "weapon_handgrenade" );
|
|
||||||
GiveNamedItem( "weapon_tripmine" );
|
|
||||||
GiveNamedItem( "weapon_crossbow" );
|
|
||||||
GiveNamedItem( "ammo_crossbow" );
|
|
||||||
GiveNamedItem( "weapon_rpg" );
|
|
||||||
GiveNamedItem( "ammo_rpgclip" );
|
|
||||||
GiveNamedItem( "weapon_satchel" );
|
|
||||||
GiveNamedItem( "weapon_snark" );
|
|
||||||
|
|
||||||
GiveNamedItem( "weapon_ak47" );
|
|
||||||
GiveNamedItem( "ammo_ak47" );
|
|
||||||
GiveNamedItem( "weapon_mac10" );
|
|
||||||
GiveNamedItem( "ammo_mac10" );
|
|
||||||
|
|
||||||
gEvilImpulse101 = FALSE;
|
|
||||||
break;
|
|
||||||
case 102:
|
case 102:
|
||||||
// Gibbage!!!
|
// Gibbage!!!
|
||||||
CGib::SpawnRandomGibs( pev, 1, 1 );
|
CGib::SpawnRandomGibs( pev, 1, 1 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user