Why is this not working?
-
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
-
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