[Release] FiveM-BanSql

Hi, i am having problem that the script after restarts gets “banned” players who are not really banned but have really close ip that the banned one have… Lets say your ip is: 82.22.22 and on db there is ban with 82.22.21 the player with = 82.22.22 gets banned, with same reason 82.22.21 having existing ban … After server restart the bans just leave…

Hey guys. I have a small problem.

Everytime I will run from my anticheat (server.lua): TriggerEvent(“BanSql:ICheat”, “Auto-Cheat Custom Reason”,TargetId) it will give me that the script can’t found the player id. https://prnt.sc/tq3ts5

Does anyone know how to fix this?

1 Like

The command is not working on new extended

just replace commands with something like this:

RegisterCommand('sqlban', function(source, args, raw)
	local xPlayer = ESX.GetPlayerFromId(source)
	if xPlayer.getGroup == Config.Permission then
		cmdban(source, args)
	else
		TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM ', 'Insufficient Permissions.' } })
	end
end)

and make sure to add this in the top:

ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

Where do I import this on my database? Is it inside the users tab or essentialmode

How can I unban somebody when there is 2 players using the same steam name?? Please help
I tryied the /sqlunban Steam name And it’s found 2. How can I choose between the two players?

Thanks for the reply!

how can i do so the guy who gets banned se who banned him?

can you make a update so its in the config?

i think its a good update

I got a problem with /sqlunbanning a person, because SQL finds 2 players with the same name. Is there an option to specify which one I want to unban, or both?

line 421error

my line 421 is:
setKickReason(Text.yourban … BanList[i].reason … Text.timeleft … txtday … Text.day … txthrs … Text.hour … txtminutes … Text.minute … Text.by … sourceplayername)

i want place bansql and warnsql (strikesql) in my DB, and add command /history to see warns and bans in a list, how can I do it?

When i try to ban someone all it says is that it couldnt find the id.
Can anyone explain what might be the cause to this problem?

And 0 errors.

Never mind, found the problem.
UPDATE ESSENTIAL MODE TO LATEST. It will fix it.

hello when i download and everything it works but when i try to toggle noclip or anything like that it does it twice

Hola, se puede usar sin essentialmode o sacar una version para que no la use ?

Is there anyway to get this working with ESX 1.2 which doesn’t use essentialmode?

When I try to load into my server I get stuck on “We are checking if you are banned.” Anyone have a fix?