I ask because now that our server is functional and running a bunch of great resources, we have a pretty fat list of unique keybindings. I was hoping there is a simple resource that allows you to attach an image to a keybinding that pops up while holding the key. Personally, I’d use this for a keybinding layout manual, but it could be used for a bunch of things like rules, ads, server info and so on.
Mac
Not 100% sure, but think that IsControlPressed is the function to check if a player is holding a key down.
https://runtime.fivem.net/doc/reference.html#_0xF3A21BCD95725A4A
This would be a client code inside a thread.
Controls:
https://wiki.fivem.net/wiki/Controls
interesting. Would this be a self-standing resource or would it be added to somewhere in particular you think?
You can code it in whatever file you want. You can code it in your main gamemode/framework/resource file where you keep everything that keeps your server functioning or you can make a separate resource file. As long as it’s a client resource, everything should be good. Forgot to mention that you will need to work with some css and html.
Examine this release to get a better understanding of how it works: https://forum.cfx.re/t/release-simple-disclaimer/24540
Ahhh mhm mhm. Yah I used Simple Disclaimer for a while but it interfered with the skinchanger and character creator we have going (on first time visits), so I got rid of it. It worked well and customizing images was easy.
We’ve set everything up on ESX and character creator pops up right when you join, having you type in character info. Right after that, the skinchanger/character customizer pops up. The Disclaimer would pop up at the beginning too and would get in the way of those features. Some people click E to bypass and some move their character when trying to figure out what’s going on, which cancels the character customizer and basically locks the player to that default model until they relog. It could have been rebinded but it would still be there and confuse new players. So we got rid of it.
We’ve created a full forum/website to go along with the server, so we just have basic info in our loading screen and tell them to go to the website to join and read rules and changelogs.
I wish there was a way to lock a player in place until the process was complete, since basically any movement cancels the creator screens, but it’s an evolving system I guess. Either that or I’m too dense to figure out how to get it to feel right.
Well that’s just a simple problem. You just have to change when the disclaimer is shown. Move the function that shows the disclaimer somewhere where the player finishes setting up his character and then show him the disclaimer. That’s it.
For locking the player in position, I’m not sure if it’s the best solution, but you can use DisableControlAction (https://runtime.fivem.net/doc/reference.html#_0xFE99B66D079CF6BC). You can disable the player from moving, shooting and so on.