Guest Posted January 5, 2008 Posted January 5, 2008 is there a function for this? like if a person pressed a key it would do something.
Guest Posted January 5, 2008 Posted January 5, 2008 no i mean like a server function where if some on pressed a it would send them a message.
AlienX Posted January 5, 2008 Posted January 5, 2008 bindKey does this for you. Wiki: http://development.mtasa.com/index.php?title=bindKey Code example which says "Hello" to them when they press F5 function playerF5Down ( playerElement, key, state ) outputChatBox ( "Hello", playerElement ) end function onPlayerJoin() bindKey ( source, "F5", "down", playerF5Down ) end addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerJoin ) (This code is untested and might not work, if it does not work then get back to me) if ( DISGRACE_ACTIVE ) then local disgracedPlayer = getFedorsElementID() if ( disgracedPlayer ) then showTextForFedor ( disgracedPlayer, "DISGRACE!", 5000, 255, 0, 0 ) 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