[New Projet] NexgenSmartScoreBoardMultikillBrodcast112SDL

Discussions about Coding and Scripting
Letylove49
Skilled
Posts: 174
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: <[MHA]> /UK Admin
Location: suisse

Re: [abandonned for a better Project] Neep Help to make a Multikillmessage for NexgenPlus Function GetMKcolor

Post by Letylove49 » Tue Nov 22, 2022 3:22 pm

thanks for have sharing your mutator. i have test it and is almost what i want to do.

this conditon are clientside :
if(bUseFNNMultikillMessages==True);
if(bUseSSBMultikillMessages==True);
if(bUSeMH2MultikillMessages==True);

i will splilt my plugin for eacht mod : FNN SSB MH2

Code: Select all




i will add the serverside  too in the if fonction  for allow serveradmin to enable or disable it like the Nexgenhud

/***************************************************************************************************
 *
 *  $DESCRIPTION  Broadcasts an FNN Multikill Message to all players.
 *
 **************************************************************************************************/
function broadcastMultikill(int type, string playerName) {
  local string msg;

if(bUseFNNMultikillMessages==True);
  
  if (type == 0) {
    msg = class'NexgenUtil'.static.format(MultikillMessage, playerName);
  } else if(type == 2)   {
    msg = class'NexgenUtil'.static.format(multiKillMessage[0], playerName);
  } else if(type == 3) {
    msg = class'NexgenUtil'.static.format(multiKillMessage[1], playerName);
  } else if(type == 4) {
    msg = class'NexgenUtil'.static.format(multiKillMessage[2], playerName);
  } else if(type ==5) {
    msg = class'NexgenUtil'.static.format(multiKillMessage[3], playerName);
  } else if(type == 6) {
    msg = class'NexgenUtil'.static.format(multiKillMessage[4], playerName);
  } else if(type == 7 ) {
    msg = class'NexgenUtil'.static.format(multiKillMessage[5], playerName);
  }else if(type >= 8 && type < 13) {
    msg = class'NexgenUtil'.static.format(multiKillMessage[6], playerName);
  }else if(type >= 14 && type < 19) {
    msg = class'NexgenUtil'.static.format(multiKillMessage[7], playerName);
  }else if(type == 20 ) {
    msg = class'NexgenUtil'.static.format(cheaterMessage, playerName);
  }
  
  if(msg != "") control.broadcastMsg(msg);
}





/***************************************************************************************************
 *
 *  $DESCRIPTION  Broadcasts an SSB Multikill Message to all players.
 *
 **************************************************************************************************/
function broadcastSSBMultikill(int type, string playerName) {
  local string msg;

if(bUseSSBMultikillMessages==True);
  
  if (type == 0) {
    msg = class'NexgenUtil'.static.format(SSBMultikillMessage, playerName);
  } else if(type == 2)   {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[0], playerName);
  } else if(type == 3) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[1], playerName);
  } else if(type == 4) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[2], playerName);
  } else if(type ==5) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[3], playerName);
  } else if(type == 6) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[4], playerName);
  } else if(type == 7 ) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[5], playerName);
  }else if(type >= 8 && type < 11) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[6], playerName);
  }else if(type >= 12 && type < 13) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[7], playerName);
  }else if(type >= 14 && type < 20) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[8], playerName);
  }
  if(msg != "") control.broadcastMsg(msg);
}

/***************************************************************************************************
 *
 *  $DESCRIPTION  Broadcasts an MH2 GOLD MHA Multikill Message to all players.
 * 
 **************************************************************************************************/
function broadcastmh2GoldMHAMultikill(int type, string playerName) {
  local string msg;

if(bUseMH2MultikillMessages==True);
  
  if (type == 0) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAMultikillMessage, playerName);
  } else if(type == 2)   {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[0], playerName);
  } else if(type == 3) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[1], playerName);
  } else if(type == 4) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[2], playerName);
  } else if(type ==5) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[3], playerName);
  } else if(type == 6) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[4], playerName);
  } else if(type == 7 ) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[5], playerName);
  }else if(type >= 8 && type < 39) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[6], playerName);
  }else if(type >= 40 && type < 41) {
    msg = class'NexgenUtil'.static.format(mh2GoldMHAmultiKillMessage[7], playerName);
  }
  if(msg != "") control.broadcastMsg(msg);
}

/***************************************************************************************************
 *
 *  $DESCRIPTION  Default properties block.
 *
 **************************************************************************************************/

defaultproperties
 
{   
multiKillMessage[0]"<C03>%1 had a Double Kill!."
multiKillMessage[1]"<C11>%1 had a Triple Kill!"
multiKillMessage[2]"<C09>%1 had a Multi Kill!"
multiKillMessage[3]"C12>%1 had a Mega Kill!"
multiKillMessage[4]"<C00>%1 had a ULTRA KILL!!!!!"
multiKillMessage[5]"<C10>%1 had a M O N S T E R  K I L L !!!"
multiKillMessage[6]"<C13>%1 had a L U D I C R O U S  K I L L !!!!"
multiKillMessage[7]"<C06>%1 had a H  O  L  Y   S  H  I  T !!!!!!!"
cheaterMessage="<C15>%1 should get a Ban! :D"
SSBmultiKillMessage[0]"<C03>%1 had a Double-Kill!."
SSBmultiKillMessage[1]"<C11>%1 had a Triple-Kill!"
SSBmultiKillMessage[2]"<C09>%1 had a Multi-Kill!"
SSBmultiKillMessage[3]"C12>%1 had a Mega-Kill!"
SSBmultiKillMessage[4]"<C00>%1 had a ULTRA-KILL!!!!!"
SSBmultiKillMessage[5]"<C10>%1 had a M O N S T E R K I L L !!!"
SSBmultiKillMessage[6]"<C13>%1 had a L U D I C R O U S K I L L !!!!"
SSBmultiKillMessage[7]"<C06>%1 had a H  O  L  Y   S  H  I  T !!!!!!!"
SSBmultiKillMessage[8]"<C14>%1 had a W I C K E D - S I C K !!!..."
mh2GoldMHAmultiKillMessage[0]"<C03>%1 had a Double Kill!."
mh2GoldMHAmultiKillMessage[1]"<C09>%1 had a Multi Kill!"
mh2GoldMHAmultiKillMessage[2]"C12>%1 had a Mega Kill!"
mh2GoldMHAmultiKillMessage[3]"<C00>%1 had a ULTRA KILL!!!!!"
mh2GoldMHAmultiKillMessage[4]"<C10>%1 had a M O N S T E R  K I L L !!!"
mh2GoldMHAmultiKillMessage[5]"<C13>%1 had a L U D I C R O U S  K I L L !!!!"
mh2GoldMHAmultiKillMessage[6]"<C06>%1 had a H  O  L  Y   S  H  I  T !!!!!!!"
mh2GoldMHAmultiKillMessage[7]"<C14>%1 had a Is Still GOING..."


Cxx = the color for the message. ( this is on NexgenHud.uc) ( i have added colors for multikill messages ( C11 to C15)). ( this is only on my custom version of Nexgen) i don't know if is possible to add it direcly on the plugin if i want to relased this plugin for the Nexgen112 and Nexgen112N)

Code: Select all

 // Colors.
const C_RED = 0;
const C_BLUE = 1;
const C_GREEN = 2;
const C_YELLOW = 3;
const C_WHITE = 4;
const C_BLACK = 5;
const C_PINK = 6;
const C_CYAN = 7;
const C_METAL = 8;
const C_ORANGE = 9;
const C_DARKRED = 10;
const C_DARKYELLOW = 11;
const C_DARKORANGE = 12;
const C_PINKLIGHT = 13;
const C_PURPLE = 14;
const C_GREENLIGHT = 15;
Last edited by Letylove49 on Wed Nov 23, 2022 11:06 pm, edited 1 time in total.
Image



<[MHA]>Letylove49 aka -=]UK[=-Shado

Letylove49
Skilled
Posts: 174
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: <[MHA]> /UK Admin
Location: suisse

New Project : NexgenSSBMB112SDL

Post by Letylove49 » Wed Nov 23, 2022 11:02 pm

hello
my new project is the follow : i want to display on the hud the mulitkillmessage on the color like they are dispay on the center , and i know this is possible with Nexgen.


when i try to compile: ( i have removed smartssb uncompilinh log)

i have smartSB111c file into my system directory. i don't understand why i got this error with smartsb111c
i can't have the uc file with Wotgralexporter. but the pcx and sound i can. very strange.

Code: Select all

 
Heading: --------------------SmartSBStats--------------------
Heading: --------------------SmartSB111c--------------------
Heading: --------------------Nexgen112SDL--------------------
Heading: --------------------NexgenCC--------------------
Heading: --------------------NexgenSSBMB112SDL--------------------
Warning: Failed to load 'NexgenSSBMB112SDL.u': Can't find file 'NexgenSSBMB112SDL.u'
Warning: Failed loading package: Can't find file 'NexgenSSBMB112SDL.u'
Log: Analyzing...
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBClient.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBClient
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBClientConfigRCP.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBClientConfigRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBConfig.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBConfig
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBConfigExt.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBConfigExt
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBConfigSys.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBConfigSys
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBLang.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBLang
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBMain.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBMain
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\NexgenSSBMB112SDL\Classes\NexgenSSBMBServerSettingsRCP.uc)
Log: Imported: Class NexgenSSBMB112SDL.NexgenSSBMBServerSettingsRCP

Log: Parsing SmartSBSpawnNotifyPRI
Error: C:\UT coding\UnrealTournament\SmartSB111c\Classes\SmartSBSpawnNotifyPRI.uc(1) : Error, Missing 'Class' definition
Critical: appError called:
Critical: Failed due to errors.
Exit: Executing UObject::StaticShutdownAfterError
Critical: CompileError
Critical: TryCompile
Critical: FScriptCompiler::CompileScript
Critical: (Class SmartSB111c.SmartSBSpawnNotifyPRI, Pass 0, Line 1)
Critical: MakeScript
Critical: MakeScript
Critical: MakeScript
Critical: MakeScript
Critical: DoScripts
Critical: UEditorEngine::MakeScripts
Critical: UMakeCommandlet::Main
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 11/23/22 22:43:31

Code: Select all

/***************************************************************************************************
 *
 *  Nexgen Smart score board Multikill Brodcast  package .
 *
 *  $CLASS        NexgenSSBMBClient
 *  $VERSION      1.00 (22-11-2022 16:00:00)
 *  $AUTHOR       [SDL]Shado initial version
 *  $CONTACT      shado49@hotmail.fr
 *  $DESCRIPTION  Client controller for the Nexgen smart score board Multikill Brodcast plugin For smart Score Board 111c .
 *
 **************************************************************************************************/
class NexgenSSBMBClient extends NexgenExtendedClientController;

var SmartSBGameReplicationInfo SSBGame;

//Messages
var localized string ssbmultiKillMessage[9];                // Multi kill message strings for SSB111c.



//Clientside
var float lastKillTime;                           // Last time this player killed another player.
var int multiLevel;                               // Number of kills on a short time.



// Misc settings.
const maxMultiScoreInterval = 3.0;
Var bool buseSSBBrodcastMultikillMessage;		 // Enable Brocast Multikill Messages.	

// Client side settings.
const SSTR_UseSSBBrodcastMultikillMessage = "UseSSBMultikillMessage";        // Enable SSB Multikill Messages.

// Client side settings default values.
const SSTRDV_UseSSBBrodcastMultikillMessage = "false";



/***************************************************************************************************
 *
 *  $DESCRIPTION  Modifies the setup of the Nexgen remote control panel.
 *  $OVERRIDE
 *
 **************************************************************************************************/
simulated function setupControlPanel() {
 
    	
	client.addPluginClientConfigPanel(class'NexgenSSBMBClientConfigRCP');
	
	if (client.hasRight(client.R_ServerAdmin)) {
		
		client.addPluginConfigPanel(class'NexgenSSBMBServersettingsRCP');
		
	}
}



/***************************************************************************************************
 *
 *  $DESCRIPTION  Initializes the client controller.
 *  $OVERRIDE
 *
 **************************************************************************************************/
simulated event postNetBeginPlay() {
	if (bNetOwner) {
		super.postNetBeginPlay();
		
		// Load localization support.
		lng = spawn(class'NexgenSSBMBLang', self);
		
		
   
          // Check if SSB Multikill should be enabled.
		bUseSSBBrodcastMultikillMessage = client.gc.get(SSTR_UseSBBrodcastMultikillMessage, SSTRDV_UseSSBBrodcastMultikillMessage) ~= "true";

          }
}


/***************************************************************************************************
 *
 *  $DESCRIPTION  Called when a player was killed by another player.
 *  $PARAM        killer  The pawn that killed the other pawn. Might be none.
 *  $PARAM        victim  Pawn that was the victim.
 *
 **************************************************************************************************/
function scoreKill(Pawn killer, Pawn victim) {
	local NexgenClient client;
	local NexgenSSBMBClient xClient;
    
	
	if (killer != none && victim != none && killer != victim) {
		// Get extended client controller.
		client = control.getClient(killer);
		if (client != none) {
			xClient = NexgenSSBMBClient(client.getController(class'NexgenSSBMBClient'.default.ctrlID));
		}
		
		if (xClient != none) {
			// Check for double, Triple, multi, mega, ultra, monster, Ludicrous kills, Holyshit, Wicked-Sick.
			if (level.timeSeconds - xClient.lastKillTime < maxMultiScoreInterval) {
				xClient.multiLevel++;
        broadcastMultiKill(xClient.multiLevel, client.playerName);
			} else {
				xClient.multiLevel = 0;
			}
			
			// Update last kill time.
			xClient.lastKillTime = level.timeSeconds;
		}
		
	}
}




/***************************************************************************************************
 *
 *  $DESCRIPTION  Broadcasts an SSB Multikill Message to all players.
 *
 **************************************************************************************************/
function broadcastSSBMultikill(int type, string playerName) {
  local string msg;
  

if(bUseSSBMultikillMessages==True) && (bBrocastSSBMultikillMessages==True);
  
  if (type == 0) {
    msg = class'NexgenUtil'.static.format(SSBMultikillMessage, playerName);
  } else if(type == 1)   {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[0], playerName);
  } else if(type == 2) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[1], playerName);
  } else if(type == 3) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[2], playerName);
  } else if(type ==4) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[3], playerName);
  } else if(type == 5) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[4], playerName);
  } else if(type == 6 ) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[5], playerName);
  }else if(type == 7) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[6], playerName);
  }else if(type >= 8 && type <= 10) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[7], playerName);
  }else if(type >= 11 && type <=20 ) {
    msg = class'NexgenUtil'.static.format(SSBmultiKillMessage[8], playerName);
  }
  if(msg != "") control.broadcastMsg(msg);
}



/***************************************************************************************************
 *
 *  $DESCRIPTION  Default properties block.
 *
 **************************************************************************************************/

defaultproperties
{   

SSBmultiKillMessage(0)="<C03>%1 had a Double-Kill!."
SSBmultiKillMessage(1)="<C11>%1 had a Triple-Kill!"
SSBmultiKillMessage(2)="<C09>%1 had a Multi-Kill!"
SSBmultiKillMessage(3)="C12>%1 had a Mega-Kill!"
SSBmultiKillMessage(4)="<C00>%1 had a ULTRA-KILL!!!!!"
SSBmultiKillMessage(5)="<C10>%1 had a M O N S T E R K I L L !!!"
SSBmultiKillMessage(6)="<C13>%1 had a L U D I C R O U S K I L L !!!!"
SSBmultiKillMessage(7)="<C06>%1 had a H  O  L  Y   S  H  I  T !!!!!!!"
SSBmultiKillMessage(8)="<C14>%1 had a W I C K E D - S I C K !!!..."


    ctrlID="NexgenSSBMBClient"
    
} 

Code: Select all

/***************************************************************************************************
 *
 *  Nexgen Enchanced Multikill Brodcast package .
 *
 *  $CLASS        NexgenSSBMBConfig
 *  $VERSION      1.12 (7-11-2022 22:00:00)
 *  $AUTHOR       Shado initial version
 *  $CONTACT      shado49@hotmail,fr
 *  $DESCRIPTION  Configuration class for the Nexgen Enchanced Multikill Brodcast plugin.
 *
 **************************************************************************************************/
class NexgenSSBMBConfig extends NexgenPluginConfig;


var bool Config  bBrocastSSBMultikillMessages;          // use SSB Multikill Messages.


// Replication / data transfer control.
var int dynamicChecksums[1];                      // Checksum for the dynamic replicated variables.
var int dynamicChecksumModifiers[1];              // Dynamic data checksum salt.                      


const CT_MultikillServerSettings;                //  server settings config type.


/***************************************************************************************************
 *
 *  $DESCRIPTION  Replication block.
 *
 **************************************************************************************************/
replication {

	reliable if (role == ROLE_Authority)
		// Dynamic.	May change during the game.
		dynamicChecksums, dynamicChecksumModifiers,

        // SSB MultikillBrodcastsettings config type.
		BrocastSSBMultikillMessages;
		
		
}


/***************************************************************************************************
 *
 *  $DESCRIPTION  Calculates a checksum of the replicated dynamic variables.
 *  $PARAM        configType  The configuration type for which the checksum is to be calculated.
 *  $REQUIRE      configType == CT_MultikillServerSettings ||		
 *  $RETURN       The checksum of the replicated variables.
 *
 **************************************************************************************************/
simulated function int calcDynamicChecksum(byte configType) {
	local int checksum;
	local int index;
	
	checksum += dynamicChecksumModifiers[configType];
	
	switch (configType) {
		case CT_MultikillServerSettings: //  server settings config type.
			checksum +=               
			        int(BrocastSSBMultikillMessages) << 1 ; 
                   
	}
			break;

	return checksum;
}


/***************************************************************************************************
 *
 *  $DESCRIPTION  Updates the checksums for the current replication info.
 *  $PARAM        configType  The configuration type for which the checksum is to be calculated.
 *  $ENSURE       dynamicChecksums[configType] == calcDynamicChecksum(configType)
 *
 **************************************************************************************************/
function updateChecksum(byte configType) {
	dynamicChecksumModifiers[configType] = rand(maxInt);
	dynamicChecksums[configType] = calcDynamicChecksum(configType);
}



/***************************************************************************************************
 *
 *  $DESCRIPTION  Updates the global server settings & notifies the other clients.
 *  $PARAM        BrocastFNNMultikillMessages   Brodcast Multikill Messages of FragNewNet Mod.
 *  $PARAM        BrocastSSBMultikillMessages  Brodcast Multikill Messages of SSB Mutator.
 *  $PARAM        BrocastMH2GOLDMHAMultikillMessages  Brodcast Multikill Messages of MonsterHunt2 MHA Edition .
 *
 **************************************************************************************************/
function setServerSettings( bool BrocastSSBMultikillMessages)
 {                          
                           
                          
	// Check rights.
	if (!client.hasRight(client.R_ServerAdmin)) {
		return;
	}
	
	
	
	// Save settings.

    	
     control.sConf.BrocastSSBMultikillMessages = BrocastSSBMultikillMessages;
	control.sConf.saveConfig();
	
	// Apply settings.
	

     if (BrocastSSBMultikillMessages) {
		level.game.SmartSB.SmartSB = BrocastSSBMultikillMessages;
	}

	
	// Notify clients.
	control.signalConfigUpdate(control.sConf.CT_MultikillServerSettings);
	client.showMsg(control.lng.settingsSavedMsg);
	
	// Log action.
	logAdminAction(control.lng.adminUpdateMultikillServerSettings);
}



 
Image



<[MHA]>Letylove49 aka -=]UK[=-Shado