Jump to content

Show icon when somone is typing.....


DazzaJay

Recommended Posts

MOD NOTE: The resource that mainly gets discussed here, "kchaticon", has been revived by MTA staff and re-uploaded to https://community.multitheftauto.com/index.php?p=resources&s=details&id=14639.

The latest version solves all problems discussed on the pages of this topic; it optimizes bandwidth, and also fixes chat icons remaining (floating) on the screen. The resource has been rewritten partially.

 

Im sure some of you have played Quake III before, and have seen the blue logo that appears over somones head when they have started to type a chat message.

well, i was wondering if it is possible to get a script that will display this image...... badchat.png above the players head when they have the "say" or "Team say" box open. (displayed on everyones screen above the player that is typing's head that is)

the good thing is that i belive you wouldent need to host the image on the server, as it is located in the game defaultly! its called "badchat" and is located in the /san andreas/models/txd/LD_CHAT.txd file!

can somone help out with a script like this?

:::EDIT:::

i have made a Photoshopped image of how i would like it to work when its done...... (click for bigger photoshopped image)

chatbubblephotoshopsmall.jpg

Link to comment
  • Replies 134
  • Created
  • Last Reply

Top Posters In This Topic

ok.

this has gotten a bit off topic.

so i will bring it back a bit.

from what i have learnt, the eaisiest method for this would be to bind it to the same keys that interact with the text chat box....

so if somone presses T or Y the icon appears above thier head.

and if they press Enter, Return or Esc, it removes the icon (if icon is above head)

sadly i dont know enough about scripting to do this, and the wiki makes me even more confused.

so can anyone point me in the right direction?

Link to comment

The same way anyone else who started off knowing nothing of lua, you learn.

If that is indeed how it works then you'd use that snippet to call a function which would add the image as eAi suggested here

find the player's position, add 1.5 or so to the Z axis. Then use getScreenFromWorldPosition on it and place a static image at that point.

I doubt you'd find anyone willing to write it for you unless they wanted it themself.

Link to comment

To be honest I think your being very rude, people are pointing you in the correct direction and by applying your brain you'd work it out.

If you want to be spoon fed, then I certainly can't remember a time when the community would do such a thing and I've been here since the days of 0.3.

Thats all I have to say.

Link to comment
I doubt you'd find anyone willing to write it for you unless they wanted it themself.

yeah, i remembered when the community used to be helpfull.

but all the good people left. and now nobody helps anyone.

back then coding was in mIRC, now its Lua, so obviously not as many people know it.

Link to comment

im not trying to be rude, im just trying to point out facts.

People used to help others. help them Learn how to do things...

just linking to stuff on the wiki, where the Examples are like this...

--This line does...

blabhalbalhb --abababa

--This line does this...

mooo

^^ taken from this link: http://development.mtasa.com/index.php? ... nputActive

isnt any help attall, to be precise it makes things more confusing to a learner, and is a pure waste of time.

Now, as ive said befoer, i know Nothing about LUA, i have been learning, But i CANT LEARN anything if i CANT SEE working examples.

thats why if you look back at all my old threads, from back when Mirc was in use, i would ask somthing, somone would give a decent example, and i would never ask for anything like it again, because i could remember it, and adapt that peicee of code to other similar things.

But with No help, no examples, it kind of makes things ridiculously hard.

Link to comment

An examples isn't really needed for the function as

"Returns true if the chatbox is receiving input, false if not active."

pretty much explains it all. It just returns a boolean value i.e true or false.

And anyhow, I gave you an example.

Link to comment

if isChatBoxInputActive() == true then 
  
outputChatBox("your typing") 
  
end 

Look, that peice of code... from what i understand....

if the chat box is open, then it outputs "your typing" to the chatbox,

is that correct?

and if so, how do i adapt that peice of code, to a .png image above somones head? and remove that image when they have closed the Say: box?

Link to comment

guiCreateStaticImage, guiSetVisible, getElementPosition, bindKey, addEvent, addEventHandler, triggerEvent

These are the most important functions you'll need to create what you want to.

Take a look in gamemode 'stealth'. To be more accurate 'gadgets_client.lua'

Link to comment
guiCreateStaticImage, guiSetVisible, getElementPosition, bindKey, addEvent, addEventHandler, triggerEvent

These are the most important functions you'll need to create what you want to.

Take a look in gamemode 'stealth'. To be more accurate 'gadgets_client.lua'

iil look into it after i get back from the Star Trek Marathon, and i will post back here if i cant figure it out.

Link to comment

At the near end of the file, you'll find comment

---INFRARED CODE

Just folow the code below. If you've played stealth (obviously you have) then you must have use the goggles (infrared). You can see where the ENEMY and TEAM players' are, soo you can also create image above them using the same method.

Link to comment

You've got to try to code it yourself, even if you make a complete mess of it. We're happy to help but we can't do it for you... Give us something to comment on.

The vast majority of wiki functions are documented. The one you picked out was really obvious - no arguments and just a boolean return. I know you might not find it obvious but thats more an issue with your general level of LUA/MTA experience which you can rectify by messing about writing some scripts :)

We're sorry we haven't got every function documented completely, we put literally thousands of man hours into that wiki and we're pretty happy with it - it's better documentation than you'll find for many other projects.

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