Everything is fine, but there is no problem at all with the server or with the script, but nothing about this script appears
local accountFlags = {}
function getPlayerFlags(cid)
if not isPlayer(cid) then
return nil
end
local accountId = getPlayerAccountId(cid)
if accountFlags[accountId] then
return accountFlags[accountId]
end
local flagResult = db.getResult("SELECTflag
FROMaccounts
WHEREid
= " .. db.escapeString(accountId))
if(flagResult:getID() == -1) then
return nil
end
local flag = flagResult:getDataString("flag")
flagResult:free()
accountFlags[accountId] = flag
return accountFlags[accountId]
end
function onThink(interval, lastExecution)
local players = getOnlinePlayers()
if players then
for i, cid in ipairs(players) do
if not isPlayerGhost(cid) and isPlayer(cid) then
doSendMagicEffect(getPlayerPosition(cid), 5)
local flags = getPlayerFlags(cid)
if flags then
doSendAnimatedText(cid, 'Flag: ' .. flags, TEXTCOLOR_RED)
end
end
end
end
return true
end