Jump to content
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×