Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. How to set the score in bo2 zombies?

How to set the score in bo2 zombies?

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
3 Posts 2 Posters 64 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • KXYZ3646undefined Offline
    KXYZ3646undefined Offline
    KXYZ3646
    wrote on last edited by
    #1

    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
    }
    
    
    
    1 Reply Last reply
    0
    • KXYZ3646undefined Offline
      KXYZ3646undefined Offline
      KXYZ3646
      wrote on last edited by
      #2

      It is a mod for a solo game

      1 Reply Last reply
      0
      • Marsh_undefined Offline
        Marsh_undefined Offline
        Marsh_ Contributor
        wrote on last edited by
        #3

        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.

        Heelps.png

        1 Reply Last reply
        0

        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Donate