Jump to content
  • 0

How to Remove /w or /who in game?


K i n G

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  17
  • Reputation:   1
  • Joined:  11/05/22
  • Last Seen:  

Please help me to disable /w or /who or commands of normal players

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  148
  • Reputation:   21
  • Joined:  11/12/18
  • Last Seen:  

On 9/9/2023 at 1:52 AM, K i n G said:

Please help me to disable /w or /who or commands of normal players

just go to your truck folder conf/groups.yml and comment who command or set it to false.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  17
  • Reputation:   1
  • Joined:  11/05/22
  • Last Seen:  

2 hours ago, Forshaken said:

just go to your truck folder conf/groups.yml and comment who command or set it to false.

Thank you for replying,

I need the ' / ' command not the ' @ ' command 😞

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  148
  • Reputation:   21
  • Joined:  11/12/18
  • Last Seen:  

1 hour ago, K i n G said:

Thank you for replying,

I need the ' / ' command not the ' @ ' command 😞

oh my bad, go to clif.cpp and find 

/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
/// 00c2 <count>.L
void clif_user_count(map_session_data* sd, int count)
{
    int fd = sd->fd;

    WFIFOHEAD(fd,packet_len(0xc2));
    WFIFOW(fd,0) = 0xc2;
    WFIFOL(fd,2) = count;
    WFIFOSET(fd,packet_len(0xc2));
}

Change to 

 

/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
/// 00c2 <count>.L
void clif_user_count(map_session_data* sd, int count)
{
/*
    int fd = sd->fd;

    WFIFOHEAD(fd,packet_len(0xc2));
    WFIFOW(fd,0) = 0xc2;
    WFIFOL(fd,2) = count;
    WFIFOSET(fd,packet_len(0xc2));
*/
}

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  148
  • Reputation:   21
  • Joined:  11/12/18
  • Last Seen:  

Just now, Forshaken said:

oh my bad, go to clif.cpp and find 

/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
/// 00c2 <count>.L
void clif_user_count(map_session_data* sd, int count)
{
    int fd = sd->fd;

    WFIFOHEAD(fd,packet_len(0xc2));
    WFIFOW(fd,0) = 0xc2;
    WFIFOL(fd,2) = count;
    WFIFOSET(fd,packet_len(0xc2));
}

Change to 

 

/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
/// 00c2 <count>.L
void clif_user_count(map_session_data* sd, int count)
{
/*
    int fd = sd->fd;

    WFIFOHEAD(fd,packet_len(0xc2));
    WFIFOW(fd,0) = 0xc2;
    WFIFOL(fd,2) = count;
    WFIFOSET(fd,packet_len(0xc2));
*/
}

dont forget to compile after applying the changes

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  148
  • Reputation:   21
  • Joined:  11/12/18
  • Last Seen:  

19 hours ago, K i n G said:

Thank you for replying,

I need the ' / ' command not the ' @ ' command 😞

or if you just want to remove it for normal player's perspective just follow the code below

 

/// Amount of currently online players, reply to /w /who (ZC_USER_COUNT).
/// 00c2 <count>.L
void clif_user_count(map_session_data* sd, int count)
{
+ if(sd->group_id >= 1) { // you can adjust the group id here
       int fd = sd->fd;

       WFIFOHEAD(fd,packet_len(0xc2));
       WFIFOW(fd,0) = 0xc2;
       WFIFOL(fd,2) = count;
       WFIFOSET(fd,packet_len(0xc2));
+ }
}
 

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...