![]() |
show image in player chat
So, is there a way to do this?
|
Not using the default chat system, no. You'd have to completely script your own chat system in order to make changes to your liking, but I can imagine it being entirely possible to implement images in a custom chat system.
At first I wasn't quite sure why anyone would want to put images in chat, but I figure if it's not fully controlled by the player as to exactly what image is used, and when, then I could see something like a scripted chat system where emoticons like :) and :D are shown when their respective character combinations are entered. |
k, we do have a chat system, somewhat. Just curious how you could bring up an image in anything like that though. I guess just a showimg?
|
Yes. Stop the text where you show the image, then start again at the end of it's width (plus a space or so), and make sure you get enough room on top/bottom of it.
|
I think something like this is way past your capabilities.
|
Its just showing a 0 where the image should be. If someone could tell me how to use setimg, or something else in this to show it up please. It's not regular chat, we're using bubbles and chat, so its all getting redrawn. help :(
PHP Code:
|
Quote:
And besides, you're not doing any showimg(), changing the text x/y, etc. |
I know. I tried setimg in a few places but it didn't work. I was trying to ask where it should go in there, because I can't figure it out.
|
As said before, you should really use a custom chat system for this.
|
Quote:
|
Quote:
Find the text's width, place it correctly, show the image, find the text after's width, place it correctly, if there's another image show it, etc. |
Well what Im confused on is where to show the image. In the code above, I have it break up the players chat, then replace it with the array[1] in the list for any chat in array[0]. The only problem im having is trying to figure out where a showimg would fit in and work first, then Ill work on resizing it. Any ideas?
|
I'm not sure why you need to be finding the width of the text. Split apart the input for every emoticon. Add the first part of the text. Display the emoticon. Add the rest of the text with x=imagex+imagewidth+spacer.
|
Quote:
|
Only problem is you just can't insert an image in any sort of chat system, custom or not. You'd have to compile the text and images separately. That means for each player you'd have an image for text, then a smiley, then text, then two smileys, then text again and so on. That could ramp up the image count really fast, and even custom chat systems with just text can be pretty laggy as it is.
|
Dusty speaks the truth.
You could probably do something along the lines of replacing the emoticon text with spaces and placing the emoticon between those spaces as a separate showimg. That would require a lot of testing, to get the coordinate placement correct. It's not really worth it, imo. |
| All times are GMT +2. The time now is 07:55 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.