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

crsszero

script mod problems! realy need help !

Recommended Posts

I want to disable the damage of vehicles.

So i override the onContact method of Class CarScript ,here is the carscript.c code ↓

modded class CarScript extends Car {

	override void OnContact( string zoneName, vector localPos, IEntity other, Contact data )
    	{
			Print("vehicle zoneName : " + zoneName + " crashed!!!");
    	}
}

and my config.cpp files likes this ↓

class CfgPatches
{
    class FirstMod
    {
        requiredAddons[] = {""};
    };
};
class CfgMods
{
    class FirstMod
    {
        type = "mod";
        class defs
        {

            class worldScriptModule
            {
                value = "";
                files[] = {"4_World/entities/vehicles"};
            };
        };
    };
};

//this change worked!
class CfgMagazines
{
    class DefaultMagazine;
    class Magazine_Base: DefaultMagazine{};
    class Mag_AKM_30Rnd: Magazine_Base
	{
        count=90;
    };
};

but the problem is ,when i pack it and load to the game, i found the modification of Magazines worked but the method overide failed.

i dont know why,could anyone help me?

Share this post


Link to post
Share on other sites

×