drowned_and Posted December 1, 2011 Posted December 1, 2011 Hopefully someone can help me with this. I get this error but I got no clue why. "Server triggered the event onClientKey, but event is not marked as remotly Triggerable" Clientside: addEvent("onClientKey", true) addEventHandler("onClientKey", root, function(key, pressed) if key == getKeyBoundToCommand("screenshot") and pressed then local chatterName = getPlayerName ( getLocalPlayer() ) outputChatBox ( chatterName.." has made a screenshot.", true ) end end) Serverside: triggerClientEvent ( "onClientKey", getRootElement(), "playerUsesScreen" ,true )
Castillo Posted December 1, 2011 Posted December 1, 2011 -- client side: addEventHandler("onClientKey",root, function (key, pressed) if (key == getKeyBoundToCommand("screenshot") and pressed) then triggerServerEvent("onPlayerTookScreenshot",localPlayer) end end) -- server side: addEvent("onPlayerTookScreenshot",true) addEventHandler("onPlayerTookScreenshot",root, function () local chatterName = getPlayerName ( source ) outputChatBox ( chatterName.." has made a screenshot.", true ) 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