How to set the score in bo2 zombies?
-
Hello, I have been working on a mod which sets the round and score. Round works but I am having problems with the score. Can someone please provide me support with this?
(Placed in scripts -> zm)
main() { if (isDefined(level.onPlayerConnect)) { level.onPlayerConnect = ::onPlayerConnect; } else { onPlayerConnect(); } } onPlayerConnect() { self endon("disconnect"); self thread setRound(25); // Set the desired round here (e.g., round 10) self thread setMoney(5000); // Set the desired money here (e.g., 5000 points) } setRound(round) { while(level.round_number < round) { level.round_number = level.round_number + 1; wait 0.05; // Small delay to prevent crashing } level notify("round_set"); } setMoney(amount) { self.score = 1000; //DOESNT WORK //HELP }
-
It is a mod for a solo game
-
Idk what I'm doing when it comes to this sort of thing so I can't tell you why my code works and yours doesn't but hopefully it'll help you by seeing it. Good luck and mad respect that your keeping your code looking clean and easy to understand.