Skip to content

Commit 97117d6

Browse files
draccJayFoxRox
authored andcommitted
chat: Add /me command
1 parent 0d41343 commit 97117d6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/module/chat.nut

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@ function onPlayerChat( player, text ) {
22
print(player.Name + ": " + text);
33
return 1;
44
}
5+
6+
function onPlayerCommand( player, cmd, text ) {
7+
cmd = cmd.tolower();
8+
if (cmd == "me") {
9+
Message("[#ffaabb]" + player.Name + " " + text);
10+
} else if (cmd == "help") {
11+
MessagePlayer("[#8080A0]/me", player);
12+
}
13+
}

0 commit comments

Comments
 (0)