EavyCheatMode dont work in practice & server [help]

Search, find and discuss about Mutators!
Post Reply
n1cc
Novice
Posts: 9
Joined: Fri Nov 02, 2018 4:18 am

EavyCheatMode dont work in practice & server [help]

Post by n1cc »

EavyCheatMode - that old mutator of 2000 - none commands that as allammo, god, loaded, fly, ghost, = dont work, nothing happen, any suggestions?
https://unrealarchive.org/mutators/unre ... 91af9.html
This mutator lets players use cheat console commands without logging in as an admin. Made for practice matches so admins don't have to tell other players the admin password. Useful for clan practice servers.


Code: Select all

//EavyCheatMode: "Eavy Cheat Mode" Stefan Daniel Schwarz <eavy@eavy.net>
class EavyCheatMode expands Mutator;

function Mutate(string MutateString, PlayerPawn Sender)
{
	Super.Mutate(MutateString, Sender);

	if ( Level.Game.bGameEnded )
		return;
	if ( MutateString ~= "IAMTHEONE" )
	{
		IAmTheOne(Sender);
		return;
	}
	if ( Level.bNoCheating )
		return;
	switch( Caps(MutateString) )
	{
		case "WALK":
			Walk(Sender);
			break;
		case "GHOST":
			Ghost(Sender);
			break;
		case "FLY":
			Fly(Sender);
			break;
		case "ALLAMMO":
			AllAmmo(Sender);
			break;
		case "AMPHIBIOUS":
			Amphibious(Sender);
			break;
		case "GOD":
			God(Sender);
			break;
		case "INVISIBLE":
			Invisible(Sender);
			break;
		case "SETWEAPONSTAY":
			SetWeaponStay(Sender);
			break;
		case "LOADED":
			Loaded(Sender);
			break;
	}
}

function IAmTheOne(PlayerPawn PlayerPawn)
{
	if ( !PlayerPawn.bAdmin && (Level.Netmode != NM_Standalone) )
		return;
	Level.bNoCheating = !Level.bNoCheating;
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> EavyCheatMode:"@!Level.bNoCheating, true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> EavyCheatMode:"@!Level.bNoCheating);
}

function Walk(PlayerPawn PlayerPawn)
{
	PlayerPawn.StartWalk();
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Walk", true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Walk");
}

function Ghost(PlayerPawn PlayerPawn)
{
	PlayerPawn.UnderWaterTime = -1.0;
	PlayerPawn.SetCollision(false, false, false);
	PlayerPawn.bCollideWorld = false;
	PlayerPawn.GotoState('CheatFlying');
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Ghost", true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Ghost");
}

function Fly(PlayerPawn PlayerPawn)
{
	PlayerPawn.UnderWaterTime = PlayerPawn.Default.UnderWaterTime;
	PlayerPawn.SetCollision(true, true, true);
	PlayerPawn.bCollideWorld = true;
	PlayerPawn.GotoState('CheatFlying');
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Fly", true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Fly");
}

function AllAmmo(PlayerPawn PlayerPawn)
{
	local Inventory Inv;

	for ( Inv=PlayerPawn.Inventory; Inv!=None; Inv=Inv.Inventory )
		if ( Ammo(Inv) != None )
		{
			Ammo(Inv).AmmoAmount = 999;
			Ammo(Inv).MaxAmmo = 999;
		}
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> AllAmmo", true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> AllAmmo");
}

function Amphibious(PlayerPawn PlayerPawn)
{
	if ( PlayerPawn.UnderwaterTime == 999999.0 )
		PlayerPawn.UnderWaterTime = PlayerPawn.Default.UnderWaterTime;
	else
		PlayerPawn.UnderwaterTime = 999999.0;
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Amphibious:"@( PlayerPawn.UnderwaterTime == 999999.0 ), true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Amphibious:"@( PlayerPawn.UnderwaterTime == 999999.0 ));
}

function God(PlayerPawn PlayerPawn)
{
	if ( PlayerPawn.ReducedDamageType == 'All' )
		PlayerPawn.ReducedDamageType = '';
	else
		PlayerPawn.ReducedDamageType = 'All';
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> God:"@( PlayerPawn.ReducedDamageType == 'All' ), true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> God:"@( PlayerPawn.ReducedDamageType == 'All' ));
}

function Invisible(PlayerPawn PlayerPawn)
{
	PlayerPawn.bHidden = !PlayerPawn.bHidden;
	if ( PlayerPawn.bHidden )
		PlayerPawn.Visibility = 0;
	else
		PlayerPawn.Visibility = PlayerPawn.Default.Visibility;
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Invisible:"@PlayerPawn.bHidden, true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Invisible:"@PlayerPawn.bHidden);
}

function SetWeaponStay(PlayerPawn PlayerPawn)
{
	local Weapon W;

	Level.Game.bCoopWeaponMode = !Level.Game.bCoopWeaponMode;
	ForEach AllActors(class'Weapon', W)
	{
		W.bWeaponStay = false;
		W.SetWeaponStay();
	}
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> SetWeaponStay:"@Level.Game.bCoopWeaponMode, true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> SetWeaponStay:"@Level.Game.bCoopWeaponMode);
}

function Loaded(PlayerPawn PlayerPawn)
{
	local inventory Inv;
	local weapon Weap;
	local DeathMatchPlus DM;

	DM = DeathMatchPlus(Level.Game);
	if ( DM == None )
		return;
	DM.GiveWeapon(PlayerPawn, "Botpack.PulseGun");
	DM.GiveWeapon(PlayerPawn, "Botpack.ShockRifle");
	DM.GiveWeapon(PlayerPawn, "Botpack.UT_FlakCannon");
	DM.GiveWeapon(PlayerPawn, "Botpack.UT_BioRifle");
	DM.GiveWeapon(PlayerPawn, "Botpack.Minigun2");
	DM.GiveWeapon(PlayerPawn, "Botpack.SniperRifle");
	DM.GiveWeapon(PlayerPawn, "Botpack.Ripper");
	DM.GiveWeapon(PlayerPawn, "Botpack.UT_Eightball");
	for ( inv=inventory; inv!=None; inv=inv.inventory )
	{
		weap = Weapon(inv);
		if ( (weap != None) && (weap.AmmoType != None) )
			weap.AmmoType.AmmoAmount = weap.AmmoType.MaxAmmo;
	}
	inv = Spawn(class'Armor2');
	if( inv != None )
	{
		inv.bHeldItem = true;
		inv.RespawnTime = 0.0;
		inv.GiveTo(PlayerPawn);
	}
	inv = Spawn(class'Thighpads');
	if( inv != None )
	{
		inv.bHeldItem = true;
		inv.RespawnTime = 0.0;
		inv.GiveTo(PlayerPawn);
	}
	BroadcastMessage(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Loaded", true, 'CriticalEvent');
	Log(PlayerPawn.PlayerReplicationInfo.PlayerName@"-> Loaded");
}

defaultproperties
{
}

User avatar
Barbie
Godlike
Posts: 2811
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: EavyCheatMode dont work in practice & server [help]

Post by Barbie »

Did you add EavyCheatMode.u to server's mutator chain and add it also to server's "ServerPackages"?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
n1cc
Novice
Posts: 9
Joined: Fri Nov 02, 2018 4:18 am

Re: EavyCheatMode dont work in practice & server [help]

Post by n1cc »

i added but mb i wrong some, also that mutator can work in practice mode?
User avatar
EvilGrins
Godlike
Posts: 9762
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: EavyCheatMode dont work in practice & server [help]

Post by EvilGrins »

All those cheat codes work without the mutator, and you shouldn't be using them online regardless... so I'm not seeing a problem here.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
n1cc
Novice
Posts: 9
Joined: Fri Nov 02, 2018 4:18 am

Re: EavyCheatMode dont work in practice & server [help]

Post by n1cc »

sorry long day, but still need in Online.
User avatar
Shrimp
Adept
Posts: 273
Joined: Wed Oct 10, 2018 11:15 am
Location: Australia
Contact:

Re: EavyCheatMode dont work in practice & server [help]

Post by Shrimp »

Are you using "mutate loaded" or just "loaded" in the console?

Looks like these are mutator commands, so you need to prefix them with "mutate", unlike the normal client-side commands.
ShrimpWorks
Unreal Archive - preserving over 25 years of user-created content for the Unreal series!
n1cc
Novice
Posts: 9
Joined: Fri Nov 02, 2018 4:18 am

Re: EavyCheatMode dont work in practice & server [help]

Post by n1cc »

ThankYou!
Post Reply