You are not logged in.

  • Login
Bitte besucht unser neues Forum unter https://forum.nitrado.net | Please visit our new Forum at https://forum.nitrado.net

Dear visitor, welcome to Nitrado.net Prepaid Gameserver Community-Support - Archiv. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Magazin

User / Kunde

  • "Magazin" is male
  • "Magazin" started this thread

Posts: 80

Location: Bayern

  • Send private message

1

Sunday, January 13th 2019, 11:48pm

Dayz Sa Chat.c/ChatLine.c/ChatInputMenu.c - Global Chat Aktivieren ?

Hallo zusammen,
Ich habe hier etwas in der "dta/Scripts.pbo/5_Mission/GUI/Chat" gefunden was mir nach den Einstellungen zum Global Chat aussieht.
Jetzt bräuchte ich eure Hilfe & jemanden der vlt. etwas mehr von dem versteht.
Wäre echt gut wenn man wüsste wie man es aktiviert ^^

Chat.c

Spoiler Spoiler



if( channel & CCSystem )
{
if( g_Game.GetProfileOption( EDayZProfilesOptions.GAME_MESSAGES ) )
return;
}
else if( channel & CCAdmin )
{
if( g_Game.GetProfileOption( EDayZProfilesOptions.ADMIN_MESSAGES ) )
return;
}
else if( channel & CCDirect || channel & CCMegaphone || channel & CCTransmitter || channel & CCPublicAddressSystem )
{
if( g_Game.GetProfileOption( EDayZProfilesOptions.PLAYER_MESSAGES ) )
return;
}

ChatInputMenu.c

Spoiler Spoiler



override bool OnChange(Widget w, int x, int y, bool finished)
{
super.OnChange(w, x, y, finished);

if (!finished) return false;

string text = m_edit_box.GetText();

if (text != "")
{
GetGame().ChatPlayer(/*GetGame().ChatGetChannel()*/0, text);
if( !GetGame().IsMultiplayer() )
{
string name;
GetGame().GetPlayerName( name );
ChatMessageEventParams chat_params = new ChatMessageEventParams( CCDirect, name, text, "" );
MissionGameplay.Cast( GetGame().GetMission() ).m_Chat.Add( chat_params );
}
}

m_close_timer.Run(0.1, this, "Close");

GetGame().GetMission().HideChat();

return true;
}


ChatLine.c

Spoiler Spoiler



void Set(ChatMessageEventParams params) // Param 1 --> Channel, Param 2 --> sender name, Param 3 --> message, Param 4 ??
{
int channel;

m_NameWidget.SetText("");
m_TextWidget.SetText("");

SetColour(DEFAULT_COLOUR);
m_RootWidget.Show(true);

channel = params.param1; // 0 = Survior 1 = Game/System 2 = Admin

Print(channel);
/*
if (params.param2 != "")
{
m_NameWidget.SetText( params.param2 + " : ");
}

if( channel & CCSystem )
{
if(params.param2 != "")
{
m_NameWidget.SetText(GAME_PREFIX + ": " );
}
SetColour(GAME_TEXT_COLOUR);
}
else if( channel & CCAdmin )
{
m_NameWidget.SetText(ADMIN_PREFIX + ": ");
SetColour(ADMIN_TEXT_COLOUR);
}
else if( channel & CCTransmitter )
{
m_NameWidget.SetText(RADIO_PREFIX + params.param2 + " : ");
}
*/

if ( channel == CCSystem )
{
// Game
if(params.param2 != "")
{
m_NameWidget.SetText(GAME_PREFIX + ": " );
}
SetColour(GAME_TEXT_COLOUR);
}
else if ( channel == CCAdmin )
{
// Admin
m_NameWidget.SetText(ADMIN_PREFIX + ": ");
SetColour(ADMIN_TEXT_COLOUR);
}
else if ( channel == CCTransmitter )
{
// Radio - Trasnmitter
m_NameWidget.SetText(RADIO_PREFIX + params.param2 + " : ");
}
else if ( channel == 0 || channel == CCDirect || channel == CCSystem)
{
// Player
if(params.param2 != "")
{
m_NameWidget.SetText(params.param2 + " : ");
}
}


m_TextWidget.SetText(params.param3);

m_FadeTimer.FadeIn(m_RootWidget, FADE_IN_DURATION);
m_TimeoutTimer.Run(FADE_TIMEOUT, m_FadeTimer, "FadeOut", new Param2<Widget, float>(m_RootWidget, FADE_OUT_DURATION));
}

private void SetColour(int colour)
{
m_NameWidget.SetColor(colour);
m_TextWidget.SetColor(colour);
}

void Clear()
{
m_RootWidget.Show( false );
m_TimeoutTimer.Stop();
m_FadeTimer.Stop();
}
Magazin has attached the following file:
  • Chat.7z (2.48 kB - 0 times downloaded)

Bitte besucht unser neues Forum unter https://forum.nitrado.net| Please visit our new Forum at https://forum.nitrado.net