We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Lets do it for 3 weapons and 3 locations: W1, W2, W3, L1, L2, L3
When the player brings a unit to L1 set ore to 100
When the player brings a unit to L2 set ore to 200
When the player brings a unit to L3 set ore to 300
At every of these waypoints also tell him his weapon codes:
When the player has W1 add 1 to ore.
When the player has W2 add 2 to ore.
When the player has W3 add 3 to ore.
And tell the player to note the code stored in the resource.
Then make a set of beacons where he can for example add 100, 30, 10, 5 and 1 to his code (saved in the resource again) and make a reset or subtract function too for false entries.
Note that I uses binary numbers representing the weapons (next weapons would be numbered 8, 16, 32, etc.). This way you can determine which weapons he had. For example code 44 is 32 + 8 + 4 = W3, W4, W6. There's no other possible combination. Thats a property of binary numbers.
Also the numbers I used above are way to obvious, but you should have understoood the principle and be able to add more complex codes.
When reloading you should first teleport him to his location like this: (keep order from highest to lowest!)
Current Player has gathered at least 300 ore
-> move all men for Current Player to L3
-> subtract 300 ore
Current Player has gathered at least 200 ore
-> move all men for Current Player to L2
-> subtract 200 ore
Current Player has gathered at least 100 ore
-> move all men for Current Player to L1
-> subtract 100 ore
And then give him is weapon(s):
Current Player has gathered at least 4 ore
-> Create W3 for Current Player at Weapons stock
-> subtract 4 of ore
Current Player has gathered at least 2 ore
-> Create W2 for Current Player at Weapons stock
-> subtract 2 of ore
Current Player has gathered at least 1 ore
-> Create W1 for Current Player at Weapons stock
-> subtract 1 of ore
Current Player has gathered at most 0 ore
-> set switch start
If you already used the resources for other purposes you will have to store the resources in a death counter temporarily.
Here's a tut on how to:
Binary CountoffOr use the custom or the kills score for it and display the respective leaderboard.
Here is a topic with a similar question if you need more details:
Trigger linking