Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Sign in to follow this  
AXEL777

Rewritng classes other mods

Recommended Posts

I am install a modification Expansion Game chat.

I am try create a my submod with this as sample:

modded class ExpansionGlobalChat
{	
	override void GlobalChat(CallType type, ref ParamsReadContext ctx, ref PlayerIdentity sender, ref Object target)
	{
		GetExpansionChatBase().GlobalChat(type, ctx, sender, target);
		Param2< string, string > data;
        if ( !ctx.Read( data ) ) return;

		if( type == CallType.Server )	
        {
			string name = sender.GetName();
			string steamid = sender.GetPlainId();
			string bisid = sender.GetId();
			string idtable = sender.GetPlayerId().ToString();
			string log_date_time = ExpansionGetDateTime();

			string format = "[" + log_date_time + "] " + "[Chat]" + " " + name + "(steamid=" + steamid + ", bisid=" + bisid + ") " + data.param2;

			Print(format);
		}
	}
};

but i am get error:

9e606c48f596280634e38184a372c134.png

How correct rewriting and customise functios in class other mod?

Share this post


Link to post
Share on other sites

Worked, fix:

class CfgPatches
{
	class DayZExpansionChat_SelverLogs
	{
		units[]={};
        weapons[]={};
        requiredVersion=0.1;
        requiredAddons[]=
        {
			"DayZExpansionChat"
        };
	};
};

Thanks other community forums

Edited by AXEL777

Share this post


Link to post
Share on other sites
Sign in to follow this  

×