Is anyone willing to share a /help command? What I mean by this is when a player types /help, certain information will show for example a list of commands. I have been trying to find this and edit other command scripts to do this but no luck so far. I think a lot of people would like this. Thanks in advance
TriggerEvent('es:addCommand', 'help', function(source, args, user)
TriggerClientEvent("chatMessage", source, "", {0, 0, 0}, "/somecommand - Does something")
TriggerClientEvent("chatMessage", source, "", {0, 0, 0}, "/somecommand2 - Does something too")
...
end)
Requires essentialmode though.
Thanks its working perfectly
Im a bit of a noob but do i making a file in the resources or in essentialmode folder and if so where?
I added it to sv_admin.lua and my es now gets some sort of error
Don’t add it to sv_admin.lua but run it as an serperate resource.
I tried its still not working
Did you copy the whole thing? There are three dots in the script he means you can add more lines with info to it by that, be sure to remove the “…” from the script.
Can someone just send me an example file please
I tried this and it’s not working, someone can help me ?
resource.lua
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
dependency 'essentialmode'
server_script 'help.lua'
help.lua
TriggerEvent('es:addCommand', 'help', function(source, args, user)
TriggerClientEvent("chatMessage", source, "", {0, 0, 0}, "/cuff ID - Menotter un joueur")
TriggerClientEvent("chatMessage", source, "", {0, 0, 0}, "/heal ID - RĂ©animer un joueur")
TriggerClientEvent("chatMessage", source, "", {0, 0, 0}, "M - Contrôles du véhicule")
TriggerClientEvent("chatMessage", source, "", {0, 0, 0}, "X - Mettre les mains en l'air")
TriggerClientEvent("chatMessage", source, "", {0, 0, 0}, "F5 - Menu personnel")
end)
---------------------------------------please delete
Is there a way without essentialmode?
where does it get put?
Since I just noticed this, even though it was 3 years ago, here is one I made: GitHub - notsiege-dev/help-command: A simple, open-source help command for FiveM servers. It can be adapted for RedM with some modification.
Just in case anyone comes back