Clickable link? [PLUS]

Zoodem

New Member
Aug 10, 2018
27
2
How I can add a clickable link for the bubble?
Ex. http or https...

HRi.png
 

JayC

Always Learning
Aug 8, 2013
5,505
1,401
In your chatevent and shoutevent , you add a method that checks for a link (starts with https) and add ahref to it... Suedocode:

Code:
private string checkUrl(string msg){
    If(!msg.Contains("http"))
        return msg;
    String newMsg = "";
    String[] parts = msg.Split(" ");
    Foreach(String s in parts){
           If(!s.StartsWith("http"))
            NewMsg += s;
           Else
           NewMsg += "<a href=\"" + s + "\">Link</ahref>";
    }
   Return NewMsg;
}
 

rhystagram

New Member
Dec 26, 2015
24
4
late reply, but if you still need help, he said the code checks to see if it starts with "http" not <a href="whatever.com">... Did you just try and see if that get's turned into a link..?

filtering html means "<a href="site.com">" and "</a>" gets removed and all you're left with is Google.
 

rhystagram

New Member
Dec 26, 2015
24
4
Yes filter is enabled..
I'm not asking if your word filters enabled. This has nothing to do with the word filter.
HTML code in chat is not allowed, so its removed by default by the server - again, this has nothing to do with the wordfilter.

When you want to write a link, you just have to type , do NOT write <a href="google.com">Google</a> (assuming you have the code JayCustom gave you working)
 

rhystagram

New Member
Dec 26, 2015
24
4
You'll need to learn how to edit and compile the emulator.
I don't use plus, so I couldn't help you with that sorry.

Maybe someone who can could quickly do it for you, compile it and give you a server with it in there.
 

Zoodem

New Member
Aug 10, 2018
27
2
I have tried to include the code.. but I get a error when I start the emu..
Code:
image.png


Error:
Code:
error CS0127: 'ChatEvent.Parse(GameClient, ClientPacket)': A return keyword must not be followed by any expression when method returns void
 

JayC

Always Learning
Aug 8, 2013
5,505
1,401
Bro that's a seperate method I gave you , you don't just stick that into the existing code... And it's pseudocode so I coded it on my phone so it may not work properly or it may have syntax errors
 

Users who are viewing this thread

Top