Welcome to Epoch Mod Community

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

  • 0
Krankie

Force Drop Backpack before Skin Change

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

Share this post


Link to post
Share on other sites

8 answers to this question

  • 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.

Share this post


Link to post
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

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


Link to post
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.  

SchwEde likes this

Share this post


Link to post
Share on other sites
  • 0

there is an outcommented line in the original code that just needs the // removed infront to make them unable to change skin with backpack..

Share this post


Link to post
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

  • Latest Donations

  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Advertisement
  • Forum Statistics

    • Total Topics
      26316
    • Total Posts
      242907
  • Member Statistics

    • Total Members
      29361
    • Most Online
      1497

    Newest Member
    loos3r
    Joined