Jump to content

[Mod] Rx_Mutator_DevStuff


Ukill

Recommended Posts

Rx_Mutator_DevStuff


This mutator has the ability to use some of the Dev commands, FutureSoldier, DevNuke and NukeAll. To use this mutator you must be logged into the server as an Administrator, Once you are logged in, you can use FutureSoldier to change into a Tiberium Sun Soldier for GDI or NOD (Depenant on Team). Nuke can play the Nuke animation and kill the target and any vehicle they are controlling. NukeAll will do the DevNuke to all players in the server. Also as a newly added component of the FutureSoldier, the mutator will now allow the Server Administrator to enable the FutureSoldier mode allowing regular players on the server to use the FutureSoldier command Turning the player into a GDI Tib Sun or Nod Tib Sun soldier.


Regular players are not yet able to use this function!!


New Version:
Use mutator=Rx_Mutator_DevStuff.Rx_Mutator_DevStuff
Instead of game=Rx_GameType_DevStuff.Rx_GameType_DevStuff

Version 0.0.2

Compatible with Renegade X v5.282

Mutator :

Rx_Mutator_DevStuff.u (Download)

Source :

Spoiler

 

Rx_Mutator_DevStuff.uc (Download)

Spoiler


/*
** Rx_Gametype_DevStuff
*/

class Rx_Gametype_DevStuff extends Rx_Game;

DefaultProperties
{
	PlayerControllerClass	   = class'Rx_Gametype_DevStuff_Controller'
}
 


 

Rx_Mutator_DevStuff_Controller.uc (Download)

Spoiler


/******************************************************************************
*  Modified by Ukill, this can contain parts of code written by Jessica\Yosh  *
*    This mutator will add the Dev NukeAll function to the Renegade X game    *
*              Be warned, all players can use this feature                    *
*******************************************************************************
* Rx_Mutator_DevStuff_Controller                                               *
******************************************************************************/
 
class Rx_Mutator_DevStuff_Controller extends Rx_Controller;

var bool bFutureSoldierMode;

// Function to check FutureSoldierMode
exec function FutureSoldierModeCheck() 
{ 
	if (bFutureSoldierMode) 
	{ 
		ClientMessage("FutureSoldierMode activated",,1); 
	} 
	else 
	{ 
		ClientMessage("FutureSoldierMode deactivated",,1); 
	} 
}

// Function to start FutureSoldierMode
exec function FutureSoldierModeStart() 
{ 
	if ( (PlayerReplicationInfo.bAdmin) == true )
	{ 
		bFutureSoldierMode = true; 
		FutureSoldierModeCheck(); 
	} 
	else 
	{ 
		ClientMessage("First login as admin",,1); 
	} 
}

// Functions to stop FutureSoldierMode
exec function FutureSoldierModeStop() 
{ 
	if ( (PlayerReplicationInfo.bAdmin) == true )
	{ 
	bFutureSoldierMode = false; 
	FutureSoldierModeCheck(); 
	} 
	else 
	{ 
		ClientMessage("First login as admin",,1); 
	} 
}

// Functions to toggle (stop/start) FutureSoldierMode
exec function FutureSoldierModeToggle() 
{ 
	if ( (PlayerReplicationInfo.bAdmin) == true )
	{ 
		if (bFutureSoldierMode) 
		{ 
			FutureSoldierModeStop(); 
		} 	
		else 
		{ 
			FutureSoldierModeStart(); 
		} 
	}
	else 
	{ 
		ClientMessage("First login as admin",,1); 
	} 
}


exec function FutureSoldier() 
{
	if (( bFutureSoldierMode  == true ) || ( (PlayerReplicationInfo.bAdmin) == true ))
	{
		if (Pawn != None && Vehicle(Pawn) == None) 
		{
			if (Worldinfo.NetMode == NM_Standalone) 
			{
				if (GetTeamNum() == TEAM_GDI) 
					Pawn.Mesh.SetSkeletalMesh(SkeletalMesh'ts_ch_gdi_soldier.Mesh.SK_CH_GDI_Soldier_TE');
				else 
					Pawn.Mesh.SetSkeletalMesh(SkeletalMesh'ts_ch_nod_soldier.Mesh.SK_CH_Nod_Soldier_TE'); 
			}
			else 
				FutureSoldierServer(); 
		}
	}
}

reliable server function FutureSoldierServer() 
{
	local Rx_Controller PC;
		if (GetTeamNum() == TEAM_GDI) 
		{
			Pawn.Mesh.SetSkeletalMesh(SkeletalMesh'ts_ch_gdi_soldier.Mesh.SK_CH_GDI_Soldier_TE');
			foreach WorldInfo.AllControllers(class'Rx_Controller', PC)
				PC.FutureSoldierClient(Pawn, SkeletalMesh'ts_ch_gdi_soldier.Mesh.SK_CH_GDI_Soldier_TE'); 
		}
		else 
		{
			Pawn.Mesh.SetSkeletalMesh(SkeletalMesh'ts_ch_nod_soldier.Mesh.SK_CH_Nod_Soldier_TE');
			foreach WorldInfo.AllControllers(class'Rx_Controller', PC)
				PC.FutureSoldierClient(Pawn, SkeletalMesh'ts_ch_nod_soldier.Mesh.SK_CH_Nod_Soldier_TE'); 
		}
}


reliable client function FutureSoldierClient(Pawn P, SkeletalMesh skel) { P.Mesh.SetSkeletalMesh(skel); }
exec function Nuke(string PlayerName) { NukeServer(PlayerName); }
exec function NukeAll() { NukeAllServer(); }



reliable server function NukeServer(string PlayerName) {
	local Rx_Weapon_DevNuke Beacon;
	local Rx_PRI PRI;

	PRI = Rx_Game(WorldInfo.Game).ParsePlayer(PlayerName);
		if (PlayerReplicationInfo.bAdmin)
		{
		if (PRI != None && Controller(PRI.Owner) != None) 
		{ 
			Beacon = Controller(PRI.Owner).Pawn.Spawn(class'Rx_Weapon_DevNuke',,, Controller(PRI.Owner).Pawn.Location, Controller(PRI.Owner).Pawn.Rotation);
			Beacon.TeamNum = TEAM_UNOWNED; 
		}
	}
}

reliable server function NukeAllServer() {
	local Rx_Weapon_DevNuke Beacon;
	local Rx_Controller C;

	if(PlayerReplicationInfo.bAdmin)
	{
	foreach WorldInfo.AllControllers(class'Rx_Controller', C) 
		{ 
		Beacon = C.Pawn.Spawn(class'Rx_Weapon_DevNuke',,, C.Pawn.Location, C.Pawn.Rotation);
		Beacon.TeamNum = TEAM_UNOWNED; 
		} 
	}
}
 
 DefaultProperties { 
	bIsDev = false
	bFutureSoldierMode = false
}
 

 

 

 


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...