Jump to content
  • 0

Force Drop Backpack before Skin Change


Krankie

Question

We've been having issues recently with the Character ID bug when someone has a part used magazine in their backpack.

 

In case you're unaware when a player has a part used magazine or similar in their backpack and they switch clothes it stops saving their character to the database.
You get messages such as "Could not sync Player! No Character ID for player PLAYER_NAME" in your RPT.

 

I've seen servers dealing with this in different ways, most just pop up a message and tell people to immediately logout and back in but it dawned on me when looking into an anti duping method that perhaps the best answer, rather than removing someone from gameplay is to just have them remove their backpack.

 

So I came across this: 

 

However it doesn't force you to remove your backpack, I just can't seem to get it to work.

 

I actually made the changes in the original player_wearClothes.sqf rather than in the mission, would that make any difference?

I didn't want to make the mission any larger than it already was.

 

Any help on getting that script working would be greatly appreciated.

 

Krankie

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Enter into your player_wearClothes.sqf the following:

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_83") , "PLAIN DOWN"] };

//prevent change with bp fix
dayz_myBackpack = unitBackpack player;
_newBackpackType = (typeOf dayz_myBackpack);
if(_newBackpackType != "") exitWith {cutText [format["You need to remove your backpack"], "PLAIN DOWN"];};

DZE_ActionInProgress = true;

This prevents a player changing clothes whilst wearing a backpack.

Link to comment
Share on other sites

  • 0

You 2 are legends!

 

It is a thing however I just learnt that putting the exact same code in my mission vs inside the dayz_code PBO means it does execute the code!

 

So I'm now wondering if I bother to implement the fixes F3cuk gives here: 

in my mission instead of inside the pbo's if that will fix the characterID issue.

 

Krankie

Link to comment
Share on other sites

  • 0

its not just putting them into the mission pbo.

F3uck changed the code to a call I think (instead of spawn)..

However the dayz_code pbo is almost useless.. its almost better to have all these put into mission (at least most of them)

Link to comment
Share on other sites

  • 0

Yea, I went with the dayz_code because I didn't want my mission file growing to a ridiculous size.

 

I've done the backpack fix as an interim solution and will look at F3cuks fix as a long term.

 

Thanks guys, you're help is greatly appreciated!

 

Krankie

Link to comment
Share on other sites

  • 0

Making the changes serverside in dayz_code.PBO means that they don't get executed on the client when they join. You MUST copy the necessary files to your mission PBO and execute them there. That way, when each client joins, they get a copy of your altered files and everything you have changed works. I can understand not wanting to blow the mission file size out but honestly, in this day of mega-fast internet and massive data plans, it doesn't really matter. It only mattered when people were trying to connect with dialup and slow assed connections.  

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...