ZerXDE
November 17, 2022, 2:35am
1
knxr-antitroll
A very simple script that disables several features for new players.
Features
Admin Command to Toggle antitroll: /troll
Anti VDM
Disable Drive By
Disable Shooting
Disable Punching / Disable Punching Damage
Installation:
download the script from here , and move it to your resource’s folder.
add ensure knxr-antitroll
to your server.cfg
enjoy!
Dependencies
es_extended (ESX) or qb-core
oxmysql
Download:
12 Likes
M0SK4
November 18, 2022, 6:47am
2
Any way to start it for all new players without triggering the /troll “id” command?
2 Likes
ZerXDE
November 18, 2022, 3:29pm
4
It works with the esx:playerLoaded
event.
New players are automatically given the time you set in Config under Config.HowLong
.
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded',function(xPlayer, isNew, skin)
TriggerServerEvent("knxr-antitroll:onjoin", isNew)
end)
3 Likes
Great work!
Can we expect QBCore version too? I know community would love this!
5 Likes
[script:knxr-antitrol] SCRIPT ERROR: @knxr-antitroll /server/sv_main.lua:58: knxr-antitroll was unable to execute a query!
[script:knxr-antitrol] Duplicate entry ‘9313bd2263747a76e48780d9e147d07aa6137791’ for key ‘PRIMARY’
[script:knxr-antitrol] insert into antitroll_time (identifier, time_left) values (?, ?) [“9313bd2263747a76e48780d9e147d07aa6137791”,30]
[script:knxr-antitrol] > insert (@knxr-antitroll /server/sv_main.lua:58)
[script:knxr-antitrol] > updateOrInsert (@knxr-antitroll /server/sv_main.lua:88)
[script:knxr-antitrol] > handler (@knxr-antitroll /server/sv_main.lua:110)
[script:knxr-antitrol] > (@oxmysql /dist/build.js:22256)
[script:knxr-antitrol] > processTicksAndRejections (node:internal/process/task_queues:96)
[script:knxr-antitrol] > async rawQuery (@oxmysql /dist/build.js:22224)
ZerXDE
February 2, 2023, 8:29pm
7
1 Like
the script isn’t working, the Database doesn’t update the time, and yes i have set it in the database to every 5 minutes still doesn’t updates.
1 Like
ZerXDE
February 13, 2023, 10:25pm
9
Hey @gabrieltr0008 ,
thanks for your message. I looked over the code and found something that was braking the database updating. You can download the fixed version here .
Please tell me if you encounter any more problems with the script.
GitHub release: Release knxr-antitroll - v1.1.0 · ZerXGIT/knxr-antitroll · GitHub
Direct download: https://github.com/ZerXGIT/knxr-antitroll/releases/download/v1.1.0/knxr-antitroll.zip
1 Like
No problem. thank you very much for fixing this bug i appreciate it.
1 Like
i noticed 1 more bug, admins cannot use the /troll command to toggle it. I have admin ace permissions.
1 Like
ZerXDE
February 15, 2023, 1:01pm
12
1 Like
Hello, the time is still not updating in the database for me, can you please check it again and try it on your test server? it would be very helpfull, thanks.
ZerXDE
February 15, 2023, 5:48pm
14
Do you get any errors, because I tested it on my server?
I don’t get any errors in the console and no errors in f8
Guten tag, eine allgemien frage wie löse ich das problem mit der admin premission ? Ich habe ja den admin rang und es ist mein eigenes server und trotzdem kann ich den command nicht nutzen. Es wird mir im f8 angezeigt das ich nicht die permssion hätte. Wäre super eine antwort zu bekommen damit ich das problem fix beheben kann. Lg
ZerXDE
December 26, 2023, 6:46pm
17
Changelog: QB-CORE SUPPORT! (v1.3.0)
qb-core is now supported by knxr-antitroll you can set the framework in the config.lua.
Config.Framework = "QBCore" -- The Framework you are using (ESX, QBCore)
If you update the script from a older version delete the old SQL table!
Full Changelog : Comparing v1.2.0...v1.3.0 · ZerXGIT/knxr-antitroll · GitHub
Download : https://github.com/ZerXGIT/knxr-antitroll/releases/download/v1.3.0/knxr-antitroll.zip
If there are any problems please let me know!
~ ZerX
2 Likes
Hello here are the problems encountered:
When we use a multichar it does not calculate the ‘char1, char2’ of the identifier.
When we do /troll it does not activate/deactivate anti-troll
1 Like
ZerXDE
January 20, 2024, 9:45pm
19
Hey SamBradley,
Really appreciate you taking the time to report these issues:
With the multichar problem: I’d like to understand a bit more. Is the system not saving ‘char1, char2’ at all, or is the expectation for each character to have an individual troll time record?
On the /troll command issue: Could you provide some extra insights? Were there any error messages, or did it just not respond? Any additional details will be really helpful for us to troubleshoot and fix the problem.
Thanks again for the report!
~ ZerX
1 Like
Do you plan to make like a unlock feature? So if we set 60 minutes then when we hit zero they get unwhitelisted or temp banned until an admin unlock/ whitelist them. That could make many allowlist procedures to a fantasy