Jump to content
  • 0

Unknown command when players are using @


Question

Posted (edited)

How to do when the players type any @ or # command should always show an error message like 99 admins instead of parsing it to a literal public chat? to protect players who doesn't have all the commands so it won't have to be embarrassing when they accidentally type or misspelled typing a command that is not on their list. thanks in advance


bump

post-16531-0-30611100-1459780759_thumb.jpg

Edited by Corruption

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

info = get_atcommandinfo_byname(atcommand_checkalias(command + 1));
if (info == NULL) {
+ // if (pc_get_group_level(sd) == 0) // TODO: remove or replace with proper permission
+ // return false;


sprintf(output, msg_txt(sd,153), command); // "%s is Unknown Command."
clif_displaymessage(fd, output);
atcommand_get_suggestions(sd, command + 1, is_atcommand);
return true;
}

I just edited this line in atcommand.c i just put // but the gm command still shows in public chat

ex

@item

@recall

#item

Edited by Photons
  • 0
Posted (edited)
info = get_atcommandinfo_byname(atcommand_checkalias(command + 1));
if (info == NULL) {
+ // if (pc_get_group_level(sd) == 0) // TODO: remove or replace with proper permission
+ // return false;


sprintf(output, msg_txt(sd,153), command); // "%s is Unknown Command."
clif_displaymessage(fd, output);
atcommand_get_suggestions(sd, command + 1, is_atcommand);
return true;
}

I just edited this line in atcommand.c i just put // but the gm command still shows in public chat

ex

@item

@recall

#item

 

Thank you for that. But still what i really wanted is  when you type an @ command it shows (@commands is an unknown command) for players :( Someone help? pls.

Edited by Corruption

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...