Jump to content

onClientKey


Jockie

Recommended Posts

It would be great if someones want to add to MTA 1.1 (or 1.0.4)

Here's the request of it @ Mantis: http://bugs.mtasa.com/view.php?id=3482

This request is there already for like 3 years but it's still not added. :|

I need this so bad for dxDrawText things.

Grtz. Jockie :?

Hmm thats a nice idea, but do some examples

like this:

function outputthekey() 
   local PK = getPressedKey(getLocalPlayer()) 
   outputChatBox (getPlayerName(getLocalPlayer()).." pressed the "..PK.." key!!") 
end 
addEventHandler ("onClientKey", resourceRoot, outputthekey) 
  

idk if that is correct but its an idea

Link to comment
  • 1 month later...

you could just bind all keys to particular function.

  
binds= { "A", } --fill this with all key names 
localP=getLocalPlayer() 
addEvent("onClientKey",false) 
  
function bindEventHandler(key,state) 
  triggerEvent("onClientKey",localP,key,state) 
end 
  
for k,v in pairs(binds) do 
  bindKey (v,"both",bindEventHandler) 
end 
  

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...