Sziasztok letöltöttem mivel elvileg see v2 és megszeretném nézni mi merre.. csakhogy nem indul el az sgs_mysql resource és a log nem ír róla semmit csak annyit hogy [2017-01-09 10:10:37] ERROR: sgs_accounts/sources.lua:1: exports: Call to non-running server resource (sgs_mysql) [string \"?\"]
mysql:
local hostname = \"127.0.0.1\"
local username = \"mta_22299\"
local password = \"h6p5bLxI\"
local database = \"mta_22299\"
local port = 3306
local MySQLConnection = nil
local resultPool = { }
local sqllog = false
local countqueries = 0
function connectToDatabase(res)
MySQLConnection = mysql_connect(hostname, username, password, database, port)
if (not MySQLConnection) then
if (res == getThisResource()) then
cancelEvent(true, \"Cannot connect to the database.\")
end
return nil
end
return nil
end
addEventHandler(\"onResourceStart\", getResourceRootElement(getThisResource()), connectToDatabase, false)
function destroyDatabaseConnection()
if (not MySQLConnection) then
return nil
end
mysql_close(MySQLConnection)
return nil
end
addEventHandler(\"onResourceStop\", getResourceRootElement(getThisResource()), destroyDatabaseConnection, false)
function sgs_logsQLError(str)
local message = str or \'N/A\'
outputDebugString(\"MYSQL ERROR \"..mysql_errno(MySQLConnection) .. \": \" .. mysql_error(MySQLConnection))
end
function getFreeResultPoolID()
local size = #resultPool
if (size == 0) then
return 1
end
for index, query in ipairs(resultPool) do
if (query == nil) then
return index
end
end
return (size + 1)
end
function ping()
if (mysql_ping(MySQLConnection) == false) then
destroyDatabaseConnection()
connectToDatabase(nil)
if (mysql_ping(MySQLConnection) == false) then
sgs_logsQLError()
return