Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: sending
1. Sending request to server - OWL
Cze??, wgra?em sobie paczk? OWL i przy pr?bie zarejestrowania mam "Sending request to server". Wszystko mam dobrze pod??czone, w razie czego dam skrypt (has?a wygwiazdkowane)

P.S. Modu?y wgrane

connection.lua

[lua]
-- connection settings
local hostname = "87.98.236.134"
local username ="db_41935"
local password = "*****************"
local database = "db_41935"
local port = 3306

-- global things.
local MySQLConnection = nil
local resultPool = { }
local sqllog = false
local countqueries = 0

-- connectToDatabase - Internal function, to spawn a DB connection
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)

-- destroyDatabaseConnection - Internal function, kill the connection if theres one.
function destroyDatabaseConnection()
if (not MySQLConnection) then
return nil
end
mysql_close(MySQLConnection)
return nil
end
addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), destroyDatabaseConnection, false)

-- do something usefull here
function logSQLError(str)
local message = str or 'N/A'
outp...