• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Get list of names and compare.

kaka12555

New Member
Joined
Jun 18, 2009
Messages
2
Reaction score
0
I am learning scripting Lua and i created one code which change player's name and check in database if the player's name typed exists.

Here is the code:
Code:
local resultId = ("SELECT name FROM players")
    if resultId then
        repeat
            table.insert(t, result.getDataString(resultId, "name"))      
        until not result.next(resultId)
        result.free(resultId)
    end
    if (param == "nomes") then
        for i,v in ipairs(t) do
            player:sendCancelMessage(i.. " Nome> " ..v)
        end
    end

ps: i have used the sendCancelMessage to test the dbquery.
ps 2: if possible, send me a link or tutorial with all commands of database of TFS.

Please help me i am bad with database + lua (in tfs xD)

Information: TFS 1.0
 
Back
Top