PDA

View Full Version : Client:GetAccountName()


phate8908
01-02-2019, 09:00 AM
this adds GetAccountName() to client in lua since for some reason we don't have it there

Append to client_ext.lua

function Client:AccountName()
local AccountName = ""
local MySQLi = require('MySQLi')
local connection = MySQLi:Connect()
connection:query("select name from account where id = '" .. self:AccountID() .. "'")
local result = connection:store_result()
for i,name in result:rows() do
AccountName = name
end
result:free()
return AccountName
end

WARNING: requires MySQL Connect (http://www.eqemulator.org/forums/showthread.php?t=42243) to work