(adsbygoogle = window.adsbygoogle || []).push({});
I recently came across ZeiiKeN's
You must login or register to view this content., which has a lot of helpful script on how to spawn different weapons and perks on certain parts of the map. The script can be found
You must login or register to view this content.. The script seems to work fine except for one minor thing. For some reason, the cost of any set perk or weapon is multiplied by the number of players in the game. For example, if the set cost of a weapon is 500, and if there are 4 players, the cost of the weapon is 2000. The player can purchase the weapon if they have more than 500 points, but their points will be subtracted by 2000. I initially thought there was something wrong with the logic of his WeaponsSystem(string, origin, cost, weapon) function but his logic seems fine. There is nothing I saw that changes the cost based on the number of players.
So my next step was to just divide the cost by the number of players in the game, and use that value when running i.score -= cost;. However, for some reason, I am not able to divide or mod anything within this function, and I can't pass in a value that has been divided or mod div to the function either. This leads me to think this is compiler related problem. Anybody else came across a similar problem?
I am using the GSC Studio by iMCSx.