Nous sommes le 20 Avr 2024, 15:13


Online     TeamSpeak UT99     UnrealTournament-V3     Download     Utfiles medor     Vote Weborama     Vote Unrealtop200     Vote xtremetop100     free TeamSpeak     Unreal Soundtracks     Google    Mini-Chat Mini-Chat

Poster un nouveau sujet Répondre au sujet  [ 10 messages ] 
 Masker Multikill et death messages dans le hud de Nexgen 
Auteur Message
Avatar de l’utilisateur

Inscription: 03 Nov 2008, 01:39
Messages: 485
Localisation: TrefF Member
Nouveau message Masker Multikill et death messages dans le hud de Nexgen
Besoin d aide pour masquer ces messages dans le hud de Nexgen

J'ai deja créer les case a coché dans Nexgen

Fichier(s) joint(s):
Nexgen112KB.jpg
Nexgen112KB.jpg [ Array Kio | Vu 1893 fois ]


Cependant ca ne fonctionne pas.

Citation:
Var bool bHidebutDrawDeaths; // Hide Death Messages ?

Var bool bHidebutDrawKills; // Hide Kills Messages ?






Code:
/***************************************************************************************************
*
* $DESCRIPTION Adds a message to the message HUD.
* $PARAM msg The message that is to be displayed.
* $PARAM msgType Message type identifier.
* $PARAM pri1 Replication info of the first player involved.
* $PARAM pri2 Replication info of the second player involved.
*
**************************************************************************************************/
simulated function message(string msg, name msgType, PlayerReplicationInfo pri1, PlayerReplicationInfo pri2) {
local int playerColor;
local int messageColor;
local bool bIsSpecSayMsg;
local PlayerReplicationInfo specPRI;
local GameReplicationInfo gri;
local int index;
local string locationName;


// Check if the message was send by a spectator using say.
if (msgType == 'Event' && instr(msg, ":") >= 0) {
// Get shortcut to the game replication info.
gri = player.gameReplicationInfo;

// Find a player.
while (index < arrayCount(gri.PRIArray) && gri.PRIArray[index] != none) {
if (gri.PRIArray[index].bIsSpectator &&
left(msg, len(gri.PRIArray[index].playerName) + 1) ~=
(gri.PRIArray[index].playerName $ ":")) {
if (bIsSpecSayMsg) {
if (len(gri.PRIArray[index].playerName) > len(pri1.playerName)) {
pri1 = gri.PRIArray[index];
}
} else {
bIsSpecSayMsg = true;
pri1 = gri.PRIArray[index];
}
}
index++;
}
}

// Check message type.
if (bIsSpecSayMsg) {
// Chat message. Special case: player is spec and using say (not teamsay).
if (pri1.talkTexture != none) {
faceImg = pri1.talkTexture;
}
addChatMsg(C_METAL, pri1.playerName $ ": ", C_METAL, mid(msg, len(pri1.playerName) + 1));

} else if (pri1 != none && msg != "" && (msgType == 'Say' || msgType == 'TeamSay')) {
// Chat message.
playerColor = getPlayerColor(pri1);
if (pri1.talkTexture != none) {
faceImg = pri1.talkTexture;
}

if (msgType == 'TeamSay') {
if (pri1.bIsSpectator && !pri1.bWaitingPlayer) {
messageColor = C_WHITE;
} else {
messageColor = C_GREEN;
}

if (!pri1.bIsSpectator) {
if (pri1.playerLocation != none) {
locationName = pri1.playerLocation.locationName;
} else if (pri1.playerZone != none) {
locationName = pri1.playerZone.zoneName;
}
}
} else {
if (pri1.bIsSpectator && !pri1.bWaitingPlayer) {
messageColor = C_METAL;
} else {
messageColor = C_ORANGE;
}
}

if (locationName != "" && bShowPlayerLocation) {
addChatMsg(playerColor, pri1.playerName, C_CYAN, " (" $ locationName $ "): ", messageColor, msg);
} else {
addChatMsg(playerColor, pri1.playerName $ ": ", C_GREEN, msg);
}

} else if (msg != "") {
// Other message.
addColorizedMessage(msg, pri1, pri2);
}
}



/***************************************************************************************************
*
* $DESCRIPTION Adds a message to the area just below the chatbox. Before the message is added an
* attempt will be made to highlight player names. This is done by checking if the
* messages contain the names of the given player replication info objects.
* $PARAM msg Message to add.
* $PARAM pri1 Replication info of the first player involved.
* $PARAM pri2 Replication info of the second player involved.
*
**************************************************************************************************/
simulated function addColorizedMessage(string msg, PlayerReplicationInfo pri1, PlayerReplicationInfo pri2) {


local string firstPlayerName;
local string secondPlayerName;
local int firstIndex;
local int secondIndex;
local int firstPlayerColor;
local int secondPlayerColor;
local string msgPart1;
local string msgPart2;
local string msgPart3;
local int msgColor;
local string tempPlayerName;
local int tempIndex;
local int tempPlayerColor;





// Get message color.
msgColor = class'NexgenUtil'.static.getMessageColor(msg);
if (msgColor < 0) {
msgColor = C_CYAN;
}
msg = class'NexgenUtil'.static.removeMessageColorTag(msg);

// Get player name indices.
getPlayerNameIndices(msg, pri1, pri2, firstIndex, secondIndex);

// Get player names & colors.
if (pri1 != none) {
firstPlayerName = pri1.playerName;
firstPlayerColor = getPlayerColor(pri1);
}
if (pri2 != none) {
secondPlayerName = pri2.playerName;
secondPlayerColor = getPlayerColor(pri2);
}

// Swap first and second player if necessary.
if (secondIndex >= 0 && (secondIndex < firstIndex || firstIndex < 0)) {
tempPlayerName = secondPlayerName;
tempIndex = secondIndex;
tempPlayerColor = secondPlayerColor;
secondPlayerName = firstPlayerName;
secondIndex = firstIndex;
secondPlayerColor = firstPlayerColor;
firstPlayerName = tempPlayerName;
firstIndex = tempIndex;
firstPlayerColor = tempPlayerColor;
}

// Split message.
if (firstIndex >= 0 && secondIndex >= 0) {
msgPart1 = left(msg, firstIndex);
msgPart2 = mid(msg, firstIndex + len(firstPlayerName), secondIndex - firstIndex - len(firstPlayerName));
msgPart3 = mid(msg, secondIndex + len(secondPlayerName));
} else if (firstIndex >= 0) {
msgPart1 = left(msg, firstIndex);
msgPart2 = mid(msg, firstIndex + len(firstPlayerName));
secondPlayerName = "";
} else {
firstPlayerName = "";
secondPlayerName = "";
msgPart1 = msg;
}

// Add message.

// Check if(bHidebutDrawDeaths=True)= (do not add Message Deaths)
//Check if (HbHidebutDrawKills=True)=(do not Add message Kills)



addMsg(msgColor, msgPart1, firstPlayerColor, firstPlayerName, msgColor, msgPart2,
secondPlayerColor, secondPlayerName, msgColor, msgPart3);
}



/***************************************************************************************************
*
* $DESCRIPTION Attemps to locate the indices of player names in the given message. To speed up
* the locating process you can pass the player replication info actors of the
* players that are most likely to be included in the message.
* $PARAM msg The message which may contain player names.
* $PARAM pri1 Replication info of the first player involved.
* $PARAM pri2 Replication info of the second player involved.
* $PARAM index1 The location in the string where the first player name occurs.
* $PARAM index2 The location in the string where the second player name occurs.
* $ENSURE (index1 >= 0 ? pri1 != none : true) && (index2 >= 0 ? pri2 != none : true)
*
**************************************************************************************************/
simulated function getPlayerNameIndices(string msg, out PlayerReplicationInfo pri1,
out PlayerReplicationInfo pri2, out int index1,
out int index2) {
local PlayerReplicationInfo tmpPRI;
local GameReplicationInfo gri;
local int index;
local int nameIndex;
local int tmpIndex;

// Get shortcut to the game replication info.
gri = player.gameReplicationInfo;



// Initially no indices have been found.
index1 = -1;
index2 = -1;

// Check if the first PRI is actually in the message. This appears not to be the case for some
// messages (for example with the Stranglove weapon mod).
if (pri1 != none && instr(msg, pri1.playerName) < 0) {
pri1 = none;
}

// Swap player replication info's if needed.
if (pri1 == none && pri2 != none) {
pri1 = pri2;
pri2 = none;
} else if (pri1 != none && pri2 != none && len(pri2.playerName) > len(pri1.playerName)) {
// Ensure the longest playername is located first.
tmpPRI = pri1;
pri1 = pri2;
pri2 = tmpPRI;
}



// Get the position of the first player name in the message.
if (pri1 == none) {
// No PRI found, try to find one.
index = 0;
while (index < arrayCount(gri.PRIArray) && gri.PRIArray[index] != none) {

// Get current player replication info.
tmpPRI = gri.PRIArray[index];

// Get position of the players name in the message.
nameIndex = instr(msg, tmpPRI.playerName);

// Select PRI?
if (nameIndex >= 0 && (pri1 == none || len(tmpPRI.playerName) > len(pri1.playerName))) {
// Yes, no name has been found so far or a longer player name has been found.
pri1 = tmpPRI;
index1 = nameIndex;
}

// Continue with next player name.
index++;
}
} else {
// Already got PRI, just find the index of the name.
index1 = instr(msg, pri1.playerName);
}



// Get the position of the second player name in the message.
if (pri1 != none && pri2 == none) {
// No PRI found, try to find one.
index = 0;
while (index < arrayCount(gri.PRIArray) && gri.PRIArray[index] != none) {
// Get current player replication info.
tmpPRI = gri.PRIArray[index];

// Get position of the players name in the message.
nameIndex = instr(msg, tmpPRI.playerName);

// Check for overlap.
if (index1 >=0 && nameIndex >= 0 && index1 <= nameIndex &&
nameIndex < index1 + len(pri1.playerName)) {
// Overlap detected, check if name occurs after the first player name.
nameIndex = instr(mid(msg, index1 + len(pri1.playerName)), tmpPRI.playerName);
if (nameIndex >= 0) {
nameIndex += index1 + len(pri1.playerName);
}
}

// Select PRI?
if (nameIndex >= 0 && (pri2 == none || len(tmpPRI.playerName) > len(pri2.playerName))) {
// Yes, no name has been found so far or a longer player name has been found.
pri2 = tmpPRI;
index2 = nameIndex;
}

// Continue with next player name.
index++;
}

} else if (pri2 != none) {
// Already got PRI, just find the index of the name.
nameIndex = instr(msg, pri2.playerName);

// Check for overlap.
if (index1 >= 0 && nameIndex >= 0 && index1 <= nameIndex && nameIndex < index1 + len(pri1.playerName)) {
// Overlap detected, check if name occurs after the first player name.
nameIndex = instr(mid(msg, index1 + len(pri1.playerName)), pri2.playerName);
if (nameIndex >= 0) {
nameIndex += index1 + len(pri1.playerName);
}
}

// Set index.
index2 = nameIndex;
}
}



/***************************************************************************************************
*
* $DESCRIPTION Adds a message to the chatbox. The message is split in several parts, so each can
* be displayed in a specified color.
* $PARAM col1 Color of the first part of the message.
* $PARAM text1 First part of the message.
* $PARAM col2 Color of the second part of the message.
* $PARAM text2 Second part of the message.
* $PARAM col3 Color of the third part of the message.
* $PARAM text3 Third part of the message.
* $PARAM col4 Color of the fourth part of the message.
* $PARAM text4 Fourth part of the message.
* $PARAM col5 Color of the fifth part of the message.
* $PARAM text5 Fifth part of the message.
*
**************************************************************************************************/
simulated function addChatMsg(int col1, string text1,
optional int col2, optional string text2,
optional int col3, optional string text3,
optional int col4, optional string text4,
optional int col5, optional string text5) {
local int index;
local NexgenRCPChatLog chatLogPanel;

// Find position in messages list.
if (chatMsgCount < arrayCount(chatMessages)) {
index = chatMsgCount;
chatMsgCount++;
} else {
// List is full, shift messages.
for (index = 1; index < chatMsgCount; index++) {
chatMessages[index - 1] = chatMessages[index];
}
index = chatMsgCount - 1;
}

// Store message.
chatMessages[index].text[0] = text1;
chatMessages[index].text[1] = text2;
chatMessages[index].text[2] = text3;
chatMessages[index].text[3] = text4;
chatMessages[index].text[4] = text5;
chatMessages[index].col[0] = col1;
chatMessages[index].col[1] = col2;
chatMessages[index].col[2] = col3;
chatMessages[index].col[3] = col4;
chatMessages[index].col[4] = col5;
chatMessages[index].timeStamp = timeSeconds;


chatLogPanel = NexgenRCPChatLog(client.mainWindow.mainPanel.getPanel(class'NexgenRCPChatLog'.default.panelIdentifier));
if (chatLogPanel != none)
chatLogPanel.addChatMsg (text1@text2@text3@text4@text5);
}



/***************************************************************************************************
*
* $DESCRIPTION Adds a message to the area below the chatbox. The message is split in several
* parts, so each can be displayed in a specified color.
* $PARAM col1 Color of the first part of the message.
* $PARAM text1 First part of the message.
* $PARAM col2 Color of the second part of the message.
* $PARAM text2 Second part of the message.
* $PARAM col3 Color of the third part of the message.
* $PARAM text3 Third part of the message.
* $PARAM col4 Color of the fourth part of the message.
* $PARAM text4 Fourth part of the message.
* $PARAM col5 Color of the fifth part of the message.
* $PARAM text5 Fifth part of the message.
*
**************************************************************************************************/
simulated function addMsg(int col1, string text1,
optional int col2, optional string text2,
optional int col3, optional string text3,
optional int col4, optional string text4,
optional int col5, optional string text5) {
local int index;

// Find position in messages list.
if (msgCount < arrayCount(messages)) {
index = msgCount;
msgCount++;
} else {
// List is full, shift messages.
for (index = 1; index < msgCount; index++) {
messages[index - 1] = messages[index];
}
index = msgCount - 1;
}

// Store message.
messages[index].text[0] = text1;
messages[index].text[1] = text2;
messages[index].text[2] = text3;
messages[index].text[3] = text4;
messages[index].text[4] = text5;
messages[index].col[0] = col1;
messages[index].col[1] = col2;
messages[index].col[2] = col3;
messages[index].col[3] = col4;
messages[index].col[4] = col5;
messages[index].timeStamp = timeSeconds;
}


_________________
Shado


Image

Image


30 Sep 2011, 00:31
Profil Envoyer un e-mail Site Internet
Administrateur
Avatar de l’utilisateur

Inscription: 01 Oct 2008, 01:14
Messages: 5598
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
Ta essayé de mettre le message en noir pour qu'il soit en transparent ?
Ou faire comme sur snipermania il est en rouge foncé et on le voie presque pas. Mais si ça se trouve c'est un gros générateur de crash vu la cadence à laquelle les monstres peuvent dégager.

_________________
UT99 files
Image
Image
Image
Image
Image
Image
Image


30 Sep 2011, 07:11
Profil Envoyer un e-mail
Avatar de l’utilisateur

Inscription: 03 Nov 2008, 01:39
Messages: 485
Localisation: TrefF Member
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
merci de votre aide mais ce truc de masker les mutlikill tombe a l' eau j'ai fais une version avec seuleuement 3 lignes d' affichages et le gas étais ok avec ça.

_________________
Shado


Image

Image


04 Oct 2011, 21:37
Profil Envoyer un e-mail Site Internet
Administrateur
Avatar de l’utilisateur

Inscription: 01 Oct 2008, 01:14
Messages: 5598
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
Du coup ça réduit la hauteur du champ alors ?

Comme ça on devrais plus avoir de chevauchement pour ceux qui joue avec une petite résolution :ok1:

_________________
UT99 files
Image
Image
Image
Image
Image
Image
Image


05 Oct 2011, 03:35
Profil Envoyer un e-mail
Avatar de l’utilisateur

Inscription: 03 Nov 2008, 01:39
Messages: 485
Localisation: TrefF Member
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
si tu veut voir le résultat vas ici : Killerbee's Stronger Monster Playground | Sponsored by ()mG\81.68.211.23:3777

_________________
Shado


Image

Image


12 Oct 2011, 18:53
Profil Envoyer un e-mail Site Internet
Administrateur
Avatar de l’utilisateur

Inscription: 01 Oct 2008, 01:14
Messages: 5598
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
Il est fou j'ai du dépassé les 100 fichiers à télécharger et il a pas les memes fichiers que sur ut-files .............déjà 4 mismatch .........je vais laisser tomber :marteau: :baton:

_________________
UT99 files
Image
Image
Image
Image
Image
Image
Image


12 Oct 2011, 19:54
Profil Envoyer un e-mail
Avatar de l’utilisateur

Inscription: 22 Oct 2011, 09:35
Messages: 11
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
on fais comment juste pour changer les messages des multikill svp ????


26 Oct 2011, 15:31
Profil Envoyer un e-mail
Administrateur
Avatar de l’utilisateur

Inscription: 01 Oct 2008, 01:14
Messages: 5598
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
Ça c'est juste pour l'affichage dans le hud de nexgen car en monsterhunt ça affiche tellement de messages à la minute que ça doit charger un peut le server.

Tu veut faire le changement pour toi ou pour tous les joueurs ? avec ou sans modifier les sons ? pour quel gametype ?

_________________
UT99 files
Image
Image
Image
Image
Image
Image
Image


26 Oct 2011, 15:58
Profil Envoyer un e-mail
Avatar de l’utilisateur

Inscription: 22 Oct 2011, 09:35
Messages: 11
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
Pour tous les joueurs et changer les sont est une bonne idée aussi par la meme ocase :) ( bien vu ^^ )


28 Oct 2011, 13:03
Profil Envoyer un e-mail
Administrateur
Avatar de l’utilisateur

Inscription: 01 Oct 2008, 01:14
Messages: 5598
Nouveau message Re: Masker Multikill et death messages dans le hud de Nexgen
Ben en fait c'est fais puisque tu as mis le smartctf plus son pack UT3.

_________________
UT99 files
Image
Image
Image
Image
Image
Image
Image


28 Oct 2011, 13:47
Profil Envoyer un e-mail
Afficher les messages postés depuis:  Trier par  
Poster un nouveau sujet Répondre au sujet  [ 10 messages ] 


Qui est en ligne

Utilisateurs enregistrés : Aucun utilisateur enregistré


Vous ne pouvez pas poster de nouveaux sujets
Vous ne pouvez pas répondre aux sujets
Vous ne pouvez pas éditer vos messages
Vous ne pouvez pas supprimer vos messages
Vous ne pouvez pas joindre des fichiers

Rechercher:
Aller à:  
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.
Traduction par: phpBB-fr.com