Great! What exactly fixed the problem?
For your scoring issue, you will need to make ScoreW (and ScoreE) a public variable with the
publicVariable command.
publicVariable broadcasts the variable to all clients so everyone has the correct current value.
Here is a suggestion on how to do this (untested). I'll try to do this in SQS but I only really know SQF so pardon any errors. This method should be MP compatible but maybe not JIP compatible.
Initialize the variable just like you would any global variable in the init.sqs
init.sqs:ScoreW = 0 ; Initializes the starting value as a global variable (to later be made public).
This way everybody starts with the same value. You haven't said how the team earns points. It is not important for this example, but, however you do it, you have to make sure you use the
publicVariable command whenever the point value changes. So, if the team does something to earn 10 points then it needs look something like this:
ScoreW = ScoreW + 10 ; Yeah! The team earned 10 points!
publicVariable "ScoreW" ; broadcast the new value of ScoreW so all teammates know the current score after earning points.
Then when we get to AirMenue.sqs, whichever client is executing it will know the current correct value (and know if they have enough points to make the mapSingleClick request). Also make sure to use
publicVariable again to broadcast the new value of ScoreW after the script determines the team has enough points for the onMapSingleClick request:
AirMenue.sqs:
...#WEST
? ScoreW < 50 : onMapSingleClick "";titletext ["Your side has not enough points","plain down"];Player addaction ["Support Menue", "Support\supportmenue.sqs"]; exit
~1
ScoreW = ScoreW - 50
publicVariable "ScoreW" ; broadcast the new value of ScoreW so all teammates know the current score after deducting points.
onMapSingleClick '[_pos] exec "Support\AirW.sqs"; true';titletext ["Click on the map to set your firedirection","plain down"]
~1
exit
...
Ideally you would only track scores on the server in order to make sure everyone is only working from a single value, but I don't think it is necessary in your case as long as you always broadcast the new value as soon as it changes.
Good luck!