How to kick someone from a FiveM server when they press F1


Could someone help me out here with making a script which when F1 is pressed it kicks that player from the server with the message ‘Remove Lambda Menu!’

Many thanks,


You know there is a disable scripthook option in your server.cfg right?


More specifically sv_scriptHookAllowed


Yes, I’m well aware of the scriptHookAllowed however I wanted to allow other scripthooks to operate hence why I wanted specifically the F1 key to kick the user with the message


You know they can change the controls to open it and such right?


Yes I am aware
Would you say there is any way around this? Without me wanting to remove scriptHook?