New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teamswitch Side variable. #57

Open
stankpunatra opened this Issue Jan 12, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@stankpunatra

When locked to a team, attempting to switch to a restricted team, the dialog variable for telling the player which side they were playing as is not displaying.

The message in-game appears as "You have played as %1 for too long...." instead of replacing %1 with variables for 'blufor' or 'opfor'
Have been scratching my head trying to fix this minor issue. Any help is appreciated.

@stankpunatra

This comment has been minimized.

Show comment
Hide comment
@stankpunatra

stankpunatra Jan 13, 2015

To anyone else having the same issue, I managed a slight work-around. Not sure it's the best way, or even proper way to achieve it, but it does work.

in client\functions\playerSpawn.sqf

original starting at line 41:
uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];
_msgBox = [localize "STR_WL_Loading_Teamswitched"] spawn BIS_fnc_guiMessage;

Changed to:
uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];
_prevSide = switch (playerSide) do
{
//case "SIDE", in this instance,is the side you are switching to.
case BLUFOR: { "OPFOR" }; //if switching to BLUFOR, say you've played on Opfor too long
case OPFOR: { "BLUFOR" }; //if switching to OPFOR say you've played on BluFor too long.
};
_msgBox = format [localize "STR_WL_Loading_Teamswitched", _prevSide] spawn BIS_fnc_guiMessage;

If this can be considered a 'proper' fix, then go ahead review and close out, otherwise, still open to suggestions on any better method to do this.

To anyone else having the same issue, I managed a slight work-around. Not sure it's the best way, or even proper way to achieve it, but it does work.

in client\functions\playerSpawn.sqf

original starting at line 41:
uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];
_msgBox = [localize "STR_WL_Loading_Teamswitched"] spawn BIS_fnc_guiMessage;

Changed to:
uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];
_prevSide = switch (playerSide) do
{
//case "SIDE", in this instance,is the side you are switching to.
case BLUFOR: { "OPFOR" }; //if switching to BLUFOR, say you've played on Opfor too long
case OPFOR: { "BLUFOR" }; //if switching to OPFOR say you've played on BluFor too long.
};
_msgBox = format [localize "STR_WL_Loading_Teamswitched", _prevSide] spawn BIS_fnc_guiMessage;

If this can be considered a 'proper' fix, then go ahead review and close out, otherwise, still open to suggestions on any better method to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment