Author Topic: Check clientsided-ly when a servercommand is sent  (Read 2967 times)

how would I check clientsided-ly when the client sends the server command "StartTalking"

Might want to look through my Connect 2 Chat add-on, as I use that.

But I think it's chatWhosTalking.addId(%id); or something, but look through my file, it may help.

http://forum.returntoblockland.com/dlm/viewFile.php?id=3835
« Last Edit: January 10, 2012, 11:14:51 PM by Superb »

"StartTalking" is called when the player presses the T key it makes those little blue names appear at the top that shows whos talking, I don't think it has the same thing as your mod?

"StartTalking" is called when the player presses the T key it makes those little blue names appear at the top that shows whos talking, I don't think it has the same thing as your mod?

When a player starts typing in a private message window in RTB Connect, it shows their name where the "blue names" are.

Also you can just use trace to figure out things, like I do.

Notice the C2C-KickFlow.
« Last Edit: January 10, 2012, 10:58:57 PM by Superb »

I don't understand how client sided code works really :c can you show me how i would make this work?

Well, when a person talks, this is called:

WhoTalkSo::AddId(%this,%id)

When a player stops talking, this is called:

WhoTalkSo::RemoveId(%this,%id)


Since i'm not entirely sure how to get names from the IDs (never needed to), you can probably package each of those functions and use chatWhosTalkingText.getValue(); to do some things.

so how do i client sided-ly check which id is being used when WhoTalkSo::AddId is called if(%id == IDHERE) doesn't appear to work

so how do i client sided-ly check which id is being used when WhoTalkSo::AddId is called if(%id == IDHERE) doesn't appear to work

What type of ID are you talking about, and how are you getting their ID besides from what the AddId function supplies?

Post all of your code please.

What type of ID are you talking about, and how are you getting their ID besides from what the AddId function supplies?

Post all of your code please.
I relize now that the id wasn't the players id lol
player id or player name would do also

package HideGlobalNameFromChat
{
   function whoTalkSO::addId(%this,%ID)
   {
      parent::addId(%this,%ID);
      if(%id == 6531)
      {
      commandtoserver('StopTalking');
      }
   }
}
activatePackage(HideGlobalNameFromChat);

Ok, now tell me exactly what this mod you have in mind is going to do, so i understand better.

Also

}
activatePackage(HideGlobalNameFromChat);


should be

};
activatePackage(HideGlobalNameFromChat);

Ok, now tell me exactly what this mod you have in mind is going to do, so i understand better.

Also

}
activatePackage(HideGlobalNameFromChat);


should be

};
activatePackage(HideGlobalNameFromChat);

oops i actually did fix that that was an older version sry
I'm attempting to hide the blue name that appears when a player starts talking

oops i actually did fix that that was an older version sry
I'm attempting to hide the blue name that appears when a player starts talking

Hide every single name, your name, some random persons name? What?

Hide every single name, your name, some random persons name? What?
just my name, id 6531 or name swollow

just my name, id 6531 or name swollow

ChatWhosTalking.setValue(strReplace(chatWhosTalking.getValue(),"yournamehere",""));

thanks for the help it worked mostly except at the very beginning of talking the name pops up but then is disappears its probably not fixable so thanks tell me if you think you can fix this otherwise I'll lock

package HideGlobalNameFromChat
{
   function whoTalkSO::addId(%this,%ID)
   {
      %a = ChatWhosTalking.setValue(strReplace(chatWhosTalking.getValue(),"Swollow",""));
      if(%a == "Swollow")
      {
      commandtoserver('StopTalking');
      }
      parent::addId(%this,%ID);
   }
};
activatePackage(HideGlobalNameFromChat);