Tokio

[HELP] What wrong with isChatBoxInputActive?

Recommended Posts

i added this line to a nametag script:

if isChatBoxInputActive() then
	dxDrawImage ( sx - math.max(nameWidth/2, teamWidth/2) - imageSize - 1*scale, sy - imageSize, imageSize, imageSize, "logo.png" )
end

but when i press 't', the image show in all players nametag.. :S how to fix this?

Share this post


Link to post
6 minutes ago, Dimos7 said:

you want apear only to player has press t for speak?

No, appear to every player

Share this post


Link to post

well in that case i think you need make a loop for every player but  i am not 100 precent sure it will work

Share this post


Link to post

i tried this, but does not working :S 

					for i,player in pairs(getElementsByType("player")) do
						if getElementData(player,"typing") == true then
							if not getElementData(player,"showtyping") then
								setElementData(player,"showtyping",true,true)
							end
                   	dxDrawImage ( sx - math.max(nameWidth/2, teamWidth/2) - imageSize - 1*scale, sy - imageSize, imageSize, imageSize, "chat.png" )
						else
							if getElementData(player,"showtyping") then
								setElementData(player,"showtyping",false,true)
							end        
						end
					end

 

Share this post


Link to post

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.