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
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