Jump to content
Sign in to follow this  
tinter

Removeallitems and Character Damage Module Only Affects Host

Recommended Posts

I have a mission in which all the playable units are sync'd up to a character damage module and in their init they have "removeallweapons this". Yet when I host a listen server, people say it's only me who's damaged and when people play recon paramedic or recon demo specialists, they have items in their inventory like medikit and FAKs, or in the demo's case, mine detector and toolkit. Yet when I play these classes my backpack is empty. Other people even say they can see the items in my inventory. Is it because I'm hosting a listen server rather than a dedicated one?

Share this post


Link to post
Share on other sites

Makena ticket on the feedback tracker so the devs can keep track of this issue.

Share this post


Link to post
Share on other sites

Try deleting the damage module and type

this setDamage 0.5

in their init.

0 is no damage - 1 is dead

Share this post


Link to post
Share on other sites

I can report that it fixed the damage portion. However, inventories are not consistent between client and host.

Share this post


Link to post
Share on other sites

have in the init.sqf a section that waits for player to be local then remove gear afterwards

// Wait until player is initialized
if !(isDedicated) then {

waitUntil {! isNull player && isPlayer player};

removeallweapons player;

};

Share this post


Link to post
Share on other sites

It would only happen once right? If I were to load a mp save it wouldn't remove their gear again, would it?

Share this post


Link to post
Share on other sites

MP saves is generally a bad idea, will likely break a lot and don't even think about it if you're using .sqf scripts

If you have

removeAllWeapons this;
removeAllItems this;

and it doesn't work, put up your mission

Share this post


Link to post
Share on other sites

It all works, thanks for the help.

Share this post


Link to post
Share on other sites

Try to avoid messing with gear on clients' machines before time>0.01. Or alternatively just manage players' gear on the server during pre-init (with scripts called from their init lines and thus run before the player even loads the mission), and don't run them at all on the clients. Both methods have their ups and downs, depending on what you want to achieve.

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  

×