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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Why is this not working?

Why is this not working?

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

    watchChatMessages()
    {

    level endon("end_game");
    for(;;) {
    level waittill("say", player, message);
    if (tolower(message) == ".givemoney") {
    if (self.name == David23) {
    player.score += 10000;
    player tell("You have been given ^2100000 ^7points!");
    }
    else {
    player tell("Do I look like ^2A Bank?");
    }
    }
    wait 0.01;
    }

    }

    also please tell me how to set only 1 map in config file, it might seems uncool but im new and something i tried dont work. the maps i want is buried origins and town. all in zclassic

    1 Reply Last reply
    0
    • Sorexundefined Offline
      Sorexundefined Offline
      Sorex
      Contributor
      wrote on last edited by Sorex
      #2

      David23 Because the entity you are looking not exist in this case. You call level thread watchChatMessages(); in the init and the entity you care is called player because in level waittill("say", player, message); you called the entity var player. The self entity do not exist

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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