Jump to content

Show icon when somone is typing.....


DazzaJay

Recommended Posts

I used the old kchaticons version many weeks, now i replaced the code you have posted and the problem appears, DazzaJay have the same problem (i don´t downloaded the new version that DazzaJay have uploaded on community.multitheftauto.com, i replaced it myself [and with DazzaJay´s version the problem is the same])

so its very implausible that the problem don´t come from your fix ;)

Link to comment
  • Replies 134
  • Created
  • Last Reply

Top Posters In This Topic

But could you just try the old version again and try to recreate the problem ? You see, I only changed the rate of data sent. Admittedly, I haven't look at the server side of this so it's plausible that it may reply to the client and "control" wether or not the icon is displayed. I would have thought this to be inside the client code. Maybe the original author could adopt the change I made and implement it ?

Link to comment

Had a look at the code: I can see why the chat icon is having a problem. After sending the chat pulse form the client, the server sends it back to all players at which point their icon is hidden until the frame render event handler decides wether or not to show it. So if I cut down the bandwidth for you, you get a sticky icon. A suggestion would be to go into ktypestatus_cl.lua and:

Remove the guiSetVisible() line from:

  
function updateList(newEntry, newStatus) 
    chattingPlayers[newEntry] = newStatus 
    if(not chatIconFor[newEntry]) then 
        chatIconFor[newEntry] = guiCreateStaticImage(0, 0, guix, guiy, "chatbubble.png", false ) 
    end 
    guiSetVisible(chatIconFor[newEntry], false)         -- << REMOVE 
end 
  

and put something similar into:

  
function showTextIcon() 
    local playerx,playery,playerz = getElementPosition ( getLocalPlayer() ) 
    for player, truth in pairs(chattingPlayers) do 
        guiSetVisible(chatIconFor[player], false)         -- << ADDED 
               ... 
  

See if that helps.

Link to comment

hm now i have:

  
function updateList(newEntry, newStatus) 
    chattingPlayers[newEntry] = newStatus 
    if(not chatIconFor[newEntry]) then 
        chatIconFor[newEntry] = guiCreateStaticImage(0, 0, guix, guiy, "chatbubble.png", false ) 
    end 
    guiSetVisible(chatIconFor[player], false) 
end 
  

but when i press ENTER to send the message, the chat icon don´t go away

Link to comment

then this?

  
function updateList(newEntry, newStatus) 
    chattingPlayers[newEntry] = newStatus 
    if(not chatIconFor[newEntry]) then 
        chatIconFor[newEntry] = guiCreateStaticImage(0, 0, guix, guiy, "chatbubble.png", false ) 
    end 
     function showTextIcon() 
            local playerx,playery,playerz = getElementPosition ( getLocalPlayer() ) 
            for player, truth in pairs(chattingPlayers) do 
            guiSetVisible(chatIconFor[player], false) 
end 
  

don´t work too.

Link to comment

I meant in the function "updateList()" REMOVE the line that's like "guiSetVisible(...)". The other snippet was an INCOMPLETE function - I was just showing you were to paste this line:

  
guiSetVisible(chatIconFor[player], false) 
  

into the function "showTextIcon()" i.e. put it just after the "for" loop. It's similar to the one you've removed but not the same.

Link to comment

you mean

  
function updateList(newEntry, newStatus) 
    chattingPlayers[newEntry] = newStatus 
    if(not chatIconFor[newEntry]) then 
        chatIconFor[newEntry] = guiCreateStaticImage(0, 0, guix, guiy, "chatbubble.png", false ) 
    end 
    guiSetVisible(chatIconFor[player], false) 
end 
  

right? but then when i press ENTER to send the message, the chat icon don´t go away

Link to comment

Nope. I mean remove one line from updateList() and add one to showTextIcon() (as shown above).

Edit: Why don't you contact the original author and just have him implement the original bandwidth-reducing change I made ?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...