fix: gwsockets auto detect

This commit is contained in:
Linventif 2024-05-08 02:29:00 +02:00
parent d77bc64372
commit 581c270446
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24

View File

@ -2,7 +2,18 @@
// WebSocket // WebSocket
// //
if !file.Exists("bin/gm_gwsockets.dll", "LUA") then local function websocketDLLExist()
local files, _ = file.Find("lua/bin/*", "GAME")
for k, v in pairs(files) do
if (v:find("gwsockets")) then
return true
end
end
return false
end
if !websocketDLLExist then
timer.Simple(4, function() timer.Simple(4, function()
gmInte.logHint("GWSockets is not installed !, Syncronize feature will not work !") gmInte.logHint("GWSockets is not installed !, Syncronize feature will not work !")
gmInte.logHint("Please install it from https://github.com/FredyH/GWSockets/releases") gmInte.logHint("Please install it from https://github.com/FredyH/GWSockets/releases")