Jump to content
  • 0

Help with hide on login


Daegaladh

Question


  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  230
  • Reputation:   131
  • Joined:  11/21/11
  • Last Seen:  

I made a little mod for GMs to hide on login, but have a little problem: when you log on a pvp map, the pvp things (time attack logo and 1/1) won't show and I cannot target players without shift.

Any ideas of what is causing this and how to fix it? Thanks.

Here's my code:

pc.c

-    if (pc_can_use_command(sd, "hide", COMMAND_ATCOMMAND))
-        sd->status.option &= (OPTION_MASK | OPTION_INVISIBLE);
-    else
       sd->status.option &= OPTION_MASK;

   /**
    * Check if player have any item cooldowns on
    **/
   pc_itemcd_do(sd,true);

+    //Hide on login
+    if (pc_can_use_command(sd, "hide", COMMAND_ATCOMMAND)) {
+        sd->sc.option |= OPTION_INVISIBLE;
+        sd->vd.class_ = INVISIBLE_CLASS;
+        clif_changeoption(&sd->bl);
+    }

   // Request all registries (auth is considered completed whence they arrive)
   intif_request_registry(sd,7);
   return true;

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  117
  • Reputation:   18
  • Joined:  01/06/12
  • Last Seen:  

For the shift part, you can use /noshift. As for the PVP maps, I believe it's because PVP flag isn't enabled or GM is on Hide? I can't really help much on that as I'm not quite familiar with core src yet.

Edited by JoWei
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  183
  • Reputation:   15
  • Joined:  06/10/12
  • Last Seen:  

use a script...

OnPCLoginEvent:
if(group_id > 20) atcommand "@hide"; end;

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