Passwords on servers

I know it would be hard, but please add this!

*Make it so we can put a password on our server
By doing this servers do not have to do a whitelist system all I would have to do is tell my friends the password is (Password) and they would be able to join and I won’t have to keep adding new guys to the whitelist

@Boss What do you think???

meanwhile:

# set to false to hide from the online server list
Announce: true

to

# set to false to hide from the online server list
Announce: false

1 Like

You could just modify/strip the freeroam gamemode to auto ‘gen’ a password of your choosing and insert it into the DB as they join. Then all you would need to do is tell them the password to be able to move and all that…

.# do change
RconPassword: xxxxx

Bring it to work, how hard can that be ? :wink:

He’s not talking about rcon. He’s talking about a password to actually join the server.

1 Like

Ohhh … sorry thought that it was the ‘Access password’ to the server :no_mouth:

Rcon is an administrator login to manage the server. In general rcon is used to change server settings and such. With other games it is used to kick, ban, set things like gravity, damage, etc. For FiveM, rcon is very limited without additional scripting, but its another “method” of managing servers.

well I have already built one and released it under my own personal github account here: https://github.com/timnboys/FiveMServerPasswordScript

Thanks for answers, I will try to look on it :relaxed:

The link has expired, please submit it. Possible ?

it has already been fixed and reuploaded to my own github

Hi keyedinsoftware :slight_smile:.

I have tried your password function today but it does not work, I get a lot of ‘lua / Runtimeassembly’ errors :cry:, please help.

well it appears you don’t have the path of the dll file that calls home to the “backend” right
check to make sure the path to the dll is correct here:
https://github.com/timnboys/FiveMServerPasswordScript/blob/master/passprotection/passwordprotection.lua#L7
also make sure you actually have a lib folder with the dll files in them as you see here:
https://github.com/timnboys/FiveMServerPasswordScript/tree/master/passprotection/lib

I’m sorry but, why are you loading “FiveRebornHttpContent.dll” into the assembly?

You know FiveM has a PerfomHttpRequest method that should do what you want (it’s also async).

Find more here:
https://wiki.fivem.net/wiki/PerformHttpRequest

Edit 1:
Also, I’ve had a quick peek at your code and it doesn’t look like you’re sending anything to the server, instead your checking if the player’s name is the same as the output of “password.php”… That isn’t a password system, it looks more like a whitelist system…

Edit 2:
Just had a look at the “backend” files and it looks like you’re checking if the player’s name is the same as the password… Why?

mostly because when I made the script I had not yet understood how to make fivem prompt for the password before connecting to the server(no one has documented that yet) and furthermore checking if the username = the password was the easiest way of doing this for the time being when it was wrote to have basically a password system.
FiveRebornHttpContent.dll is my dll function I have used long ago(when this script was wrote) to allow me to get the content of the response only not the status code,etc and display the “content” to the script to check it against the password entered as username

if you have an idea of how to prompt a user for the password on the playerconnecting event please tell me and then I wouldn’t have to use the username<->password check anymore and actually make it prompt for the password instead.

I explained why because at the time this was written there was no documentation on how to prompt the user to enter the password in on the playerconnecting event so unless that has been implemented I had to do it via the player’s username since there is no other way I know at the time it was written to do it like I really wanted it; to prompt with a dialog box saying enter password and then verify the password like it would if I knew how to do that.

I’m pretty sure you can’t do that… You can try by having a look into creating a custom loading screen but even then, I’m certain the player would be able to connect to the server just by waiting… The best way (I can think of) to have a password on the server is to prompt the player when they spawn.
This is probably best way to do this with the current system.

I assume this is why this thread is in “Feature Requests” because honestly, I can only see a password system being implemented into the core server/client code rather than with addons.

I think I’ve done setup right, but now I’m confused :open_mouth:.

Should the username be the password? Øhhh, then, is there only one player who can log in or can everyone? I do not really understand …

If you can, make it with a real login box and a fixed password, so you will become a famous man here in forum because a lot of people want a good password function without ‘essential mode’ and without being dependent on a Steam account.
:relaxed:.

who to make a password for my server?