[Release] Additional Server Synchronization and ACL [1.0.6]

It’s not that simple. The functions ACL:isBanned, ACL:isBannedIP, ACL:isModerator and ACL:isAdminstrator would have to be modified. findi wouldn’t be completely removed from these functions (this is just a case-insensitive table search function) and the functions themselves would contain the queries. If you wanted to retain 100% original functionality, in psuedo it would be something like this for the isBanned function:

	local bannedWordsTable = query: "SELECT `word` FROM `BannedNames`";
	
	for k,v in pairs( bannedWordsTable ) do
		if string.find( playerName, v, 1, true ) ~= nil then
			self.lastError = "Your name or a part of it is not allowed."
			return true
		end
	end
	
	local qryIDs = {};
	
	for k,v in pairs( ids ) do
		qryIDs[k] = "`Ident`='" .. PSUEDO_FUNCTION_ESCAPE( v ) .. "'";
	end
	
	qryIDs = table.concat( qryIDs, "," );
	
	local isBanned = query: "SELECT COUNT(*) FROM `BannedIdents` WHERE " .. qryIDs;
	
	if isBanned then
		self.lastError = "You are banned."
		return true
	end

If you catch the drift you can give it a shot. Most time consuming for me would be to install EssentialMode and familiarize myself with its environment. I’d do this right now but yesterday I was inspired to make something else for FiveM, so I kind of want to work on just that for now.

@MsQuerade
I’ve changed settings in vars.lua to

	time = { h = 6, m = 0, s = 0, frozen = false, rates = {day = 1.0, night = 3.0} },

But it doesn’t apply: start time is still 00:00 at night.

Did you get the code from the project page by any chance? I checked and it seems that I failed to notice the GitLab rollback had any effect on my commits the other day. Re-commited the latest changes now.

Well, that

ACL.enablePlayerManagement = true

Didn’t have any effect. Time is still 00:00

Huh? Am I missing something? Your reply seems completely unrelated to my post…

If you downloaded the v1.0.5 .ZIP and time still starts at 0:00 then I need to know. If you got the files directly from the project page, then you need to fetch the files again (apart from config files, you can keep the ones you had).

@MsQuerade
Misunderstanding :slight_smile:
I’ve got v1.0.5 .ZIP

After reading your reply, I’ve checked your last commit at gitlab and there was only ACL.enablePlayerManagement = true

I’ll get back to you soon.

Hello! It work very nice for me but i have a question: How to change default values (when someone spawn) because it’s night for everyone connecting on server, even if i set the day, they all have to set time if they connect after me.
Is it possible to set the default options for day time and not frozen time on the server? How do i do that?

How do you set the time? With the commands provided, or with the reborn trainer/lambda menu? Any other mods that could possibly intervene with the time commands?

Already looking into the night issue, however if you set the time with the /time command then this should apply for everybody, even to newly connected players.

@MJRamon
In the server’s additional-sync.lua, change the third line to:
local secondOfDay = (ASData.time.h * 3600) + (ASData.time.m * 60) + ASData.time.s

It will fix your issue. Or update to 1.0.6.

1 Like

Updated to v1.0.6:

  • Time set in common/vars.lua will now be the default start time.
  • Config files are unaltered since last patch.
2 Likes

It did the trick. Thank you so much.

I change time on server with your command. /time NOON by example.
It works for everybody already here, but newly arrived players are still under night and have to pop the day again for everybody.

@MsQuerade
So, if I put crowd = 0 - there are no peds, as I wanted, but police (cops) are still there. How do I disable them too?

That’s beyond the scope of this script, but if you want a quick fix for that, get the lambda menu.

Hey, so i downloaded this script and everything was working fine.
Then something happened, the whitelist doesn’t work and none of the in game commands work either

Here is an image of what happens when someone connects to the server
https://gyazo.com/44633d8efa9cd3517811116875a0ad68

Any help is much appreciated

@MsQuerade

Hello Here,

Whitelist is working fine here. But just a stupid question,

How do you find your steamid like steam:1100001baadface ??

I mean i’m using https://steamid.io/ to find my steamid64 or other steamid information but how to convert to the format used by five m ???

edit : PROBLEM SOLVE (steamid64 --> hex)

It also shows in your server window/log when you try to connect and you get denied.

@the_welsh_vader
Hmm. Is that an old version you’re running, or are the files tampered with? I see warnings that shouldn’t be there in the first place. Is this something you can reproduce? Also please try the new version (you can likely keep your config files).

@MsQuerade

So this is what happens when I use this script,

I put the folders inside a folder called whitelisted in the resource folder and leave the config as is when downloaded.
I then go to citmp-server and add it to the list so the server knows its there, I start the server and the server is whitelisted and i’m unable to join. I then shut the server down and add an IP/steam id, delete the cache and restart the server. Then when someone who isn’t whitelisted on the server manages to join and I get that error every time someone does join.

Like I said before the script was working wonderfully and then something happened and now it doesn’t work at all. Do I need essential mode on the server for this script to work?

You don’t need essential mode. Do you know what that “something” is that happened? Would you mind zipping your folder and upload it, then send it to me (private message so any private data such as IPs won’t be public)? (Or for good measure, upload every resource you have if it’s not too big)

Good day,
@MsQuerade
I am currently having an issue… when i black out the server i am unable to “stop the blackout”…
Using “blackout 1” vs “blackout 0” changes nothing.
*I am running the commands in IceCon - everything appears to be working except the blackout argument in regards to stopping the blackout.
Any suggestions would be greatly appreciated!