Hallo leute ich habe ein Problem undzwar wenn ich mein IPB-Connector starte komm immer **NETWORK TROUBLE**.#
Die Daten sind richtig angegeben . und das MySql Module hab ich auch gestartet .
[2013-12-22 15:59:00] MODULE: Loaded "MySQL 5.0 database module" (0.50) by "Alberto Alonso <[email protected]>"
Script :
Spoiler anzeigen
Lua
local serverContainer = {}
serverContainer.Settings = {}
-- settings
serverContainer.Settings.user = ''
serverContainer.Settings.pass = ''
serverContainer.Settings.host = ''
serverContainer.Settings.name = ''
serverContainer.startResource = function()
local connection = dbConnect('mysql', 'dbname='..serverContainer.Settings.name..';host='..serverContainer.Settings.host, serverContainer.Settings.user, serverContainer.Settings.pass)
if connection then
outputDebugString('[IPB-CONNECTER]: Could connect to the mysql server')
serverContainer.connection = connection;
else
outputDebugString('[IPB-CONNECTER]: Couldn\'t connect to the mysql server')
end
end
addEventHandler('onResourceStart', resourceRoot, serverContainer.startResource)
serverContainer.loginClient = function(user, pass)
local qh = dbQuery(serverContainer.connection,'SELECT * FROM members WHERE name = ?',user)
local result, row, errmsg = dbPoll ( qh, 5000 )
if row > 0 then
for id, result in ipairs(result) do
local salt = result['members_pass_salt']
local username = result['members_display_name']
local password = result['members_pass_hash']
if salt and username and password then
local newPass = md5(md5(salt):lower()..md5(password):lower()):lower()
if newPass == password then
triggerClientEvent(source,'onClientSuccessfullyLogin',source)
outputChatBox('#ff6666[SERVER]#ffffff You have successfully login.', source,1,1,1,true)
else
outputChatBox('#ff6666[SERVER]#ffffff This account doesn\'t exists or the password is wrong.', source,1,1,1,true)
end
end
end
end
end
addEvent('onClientLogins', true)
addEventHandler('onClientLogins', root, serverContainer.loginClient)
Alles anzeigen
Hoffe ihr könnt mir helfen.