Tokio Posted September 3, 2017 Posted September 3, 2017 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.. how to fix this?
Dimos7 Posted September 3, 2017 Posted September 3, 2017 you want apear only to player has press t for speak?
Tokio Posted September 3, 2017 Author Posted September 3, 2017 6 minutes ago, Dimos7 said: you want apear only to player has press t for speak? No, appear to every player
Dimos7 Posted September 3, 2017 Posted September 3, 2017 well in that case i think you need make a loop for every player but i am not 100 precent sure it will work
Tokio Posted September 3, 2017 Author Posted September 3, 2017 i tried this, but does not working 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now