addEventHandler ( "onResourceStart", resourceRoot,
function ( )
for theKey, thePlayer in ipairs ( getElementsByType ( "player" ) ) do
if ( not isKeyBound ( thePlayer, "F2" ) ) then
bindKey ( thePlayer, "F2", "down",
function ( player )
-- Your Code
end
)
end
end
end
)