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 77 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.
  • 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

      • Login

      • Don't have an account? Register

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