Hi all,
I’m trying to figure out how to make a script pretty much on my own from Lua for the first time, and am running into multiple different issues that my collective coding brain power can’t really cope for right at this moment. I’ve been trying all morning to find a way to make a server-side script for fivem that effectively turns off the ability to use shv or any of its related plugins or trainers, etc, through the use of a whitelist, as opposed to turning it off for everyone. I’m leaning more towards the use of steam ids as the method of auth because that’s required to get into the server anyway via the corresponding sv_auth level functions that I have enabled as of right now. Its for a VRP server right now but I’m going for a more compatible method for later use on other potential servers. This is what I have so far:
Also please don’t mind my errors if there’s anything obvious as I’m more used to drag and drop than scratch.
shv-allow-client.lua
local allowedToUseScriptHookV = false;
--
RegisterNetEvent('foundation:playerAllowedToUseScriptHookV')
AddEventHandler('foundation:playerAllowedToUseScriptHookV', function(allowedToUseScriptHookV)
end)
isAllowedToUseScriptHookV = allowedToUseScriptHookV
if not isAllowedToUseScriptHookV then
-- Deny client usage of shv here
-- Denial method goes here - then stream method to server?, possibly allowing a server-side trainer instead?
else
Citizen.CreateThread(function(allowshv)
-- Allow client usage of shv here - meaning all client-side plugins
end)
__resource.lua
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
client_script "shv-allow-client.lua"
server_script "shv-allow-server.lua"
Nothing for ‘shv-allow-server.lua’ yet as I just barely started this morning.
Please help if possible. I was going for the ace server auth method (similar to easy admin or the vanilla admin perms, but am willing to accept other means if necessary).
Thanks,