The first argument of your slash handler (msg) is what comes after the base slash command + one whitespace character, so "add Playersname", in this case. And in this function, cmd will be "add" and arg "Playersname".