Jump to content
  • 0

Unknown command when players are using @


Corruption

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  04/12/13
  • Last Seen:  

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
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  12/13/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  04/12/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  12/13/12
  • Last Seen:  

Idk either how to do that but in case i really need that in the future i'll give you a bump!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  04/12/13
  • Last Seen:  

bump


bump

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  08/22/12
  • Last Seen:  

You'll have to search in the pc_groups.c file. 

 

What you're looking for is in the pc_group_can_use_command.

Link to comment
Share on other sites

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.

×
×
  • Create New...