Jump to content
Sign in to follow this  

Getting a 3d overlay for gasmask to work in multiplayer with respawn.

Recommended Posts



I'm doing a CBRN mission for multiplayer using the Contact DLC.

The idea is to have all players wearing a gas mask to have an overlay.

The script is working fine until a player makes a respawn. 

I've tried to use onPlayerRespawn.sqf but with limited success - it again works only on spawn and not respawn.

Whenever I equip the gas mask from the body of my pervious character the code works nicely...


I'm guessing, I'm not referring to the player properly, but I'm not sure how to proceed. Can I get some help with this?

The while loop also doesn't seem to be the best implementation, but I am also not sure how to approach this, guessing an EventHandler could work, but I couldn't find anything about equipped items.


onPlayerRespawn.sqf code:

while {true} do {
    if ("G_AirPurifyingRespirator_01_nofilter_F" in goggles player) then
        call{"_unit" cutRsc ["RscCBRN_APR_02", "PLAIN", -1, false];};
    if !("G_AirPurifyingRespirator_01_nofilter_F" in goggles player) then
        nul = "player" cutText ["", "PLAIN"];

Thank you!

Edit: Also tried to get this work by making a repeatable trigger, this also works until a respawn is performed. 
Condition: "G_AirPurifyingRespirator_01_nofilter_" in goggles varPlayerName; 
On Activation: call{"varPlayerName" cutRsc ["RscCBRN_APR_02", "PLAIN", -1, false];};
On Deactivation: nul = "varPlayerName" cutText ["", "PLAIN"];

This has been resolved here:


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