As of September 18 2017, the useatcmd() command has been deprecated.
If you were using useatcmd() for built-in @commands you can simply replace it with atcommand():
useatcmd("@command") ➜ atcommand("@command")
If you were using useatcmd() for custom @commands (registered with bindatcmd()) you can use doevent() instead:
useatcmd("@custom") ➜ doevent("MyNPC::OnUseCommand");
MyNPC is the name of the NPC in which you used bindatcmd() OnUseCommand is the event you registered with bindatcmd()
Edge cases:
useatcmd(), unlike atcommand(), uses the group id of the attached player rather than running with admin privileges. If you need to check whether or not a player should be able to use a command, use can_use_command()
if (can_use_command("@foobar")) {
atcommand("@foobar");
} else {
dispbottom("You cannot use this command!");
}