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

YeeAmFam

Spawn Player With Low hunger, thirst and health.

Recommended Posts

Hey fellas! First time here, but I just want to get straight into it. 

 

Does anybody know how I can set the player's hunger and thirst to low in init.c?

I've managed to set the health to 1, but I have to be able to set the initial hunger and thirst to 1 as well.

 

Oh and is there a more active dev channel somewhere? Discord, maybe?

Edited by YeeAmFam
I'm just forgetful

Share this post


Link to post
Share on other sites
class CustomMission: MissionServer
{




	override void InvokeOnConnect(PlayerBase player, PlayerIdentity identity)
	{
		super.InvokeOnConnect(player, identity);
		player.GetStatEnergy().Set(1);
		player.GetStatWater().Set(1);
	}
};

There is a modding Discord around (probably not official though), but unfortunately I don't have the address to it. 

  • Like 2

Share this post


Link to post
Share on other sites
22 hours ago, NoBeansForMe said:

class CustomMission: MissionServer
{




	override void InvokeOnConnect(PlayerBase player, PlayerIdentity identity)
	{
		super.InvokeOnConnect(player, identity);
		player.GetStatEnergy().Set(1);
		player.GetStatWater().Set(1);
	}
};

There is a modding Discord around (probably not official though), but unfortunately I don't have the address to it. 

Brillian! Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

×