• 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!

OTClient Help ExtendOpCode String To Array

supermortaliz

Member
Joined
Jan 26, 2014
Messages
76
Solutions
6
Reaction score
12
i send array but ExtendOpcode Converting array to string how i convert again in array?

Exm to call in otclient:
playersT["Mihawk"] = {title = "[Admin]"}
or
playersT["Mihawk"].title = [Admin]

or maybe send all normal string and after i separate all with string.sub?

Server ExtendOpCode
Lua:
table.insert(content, {['Mihawk'] = {title = "[Admin]"}})
    doSendPlayerExtendedOpcode(cid, 55, json.encode(content))

OTclient ExtendOpcode
Lua:
function updateTitle(creature)
local protocolGame = g_game.getProtocolGame()
if protocolGame then
    protocolGame:sendExtendedOpcode(55)
    playersT = Opcodetitles
    local name = creature:getName()

    if creature:isPlayer() then
        if playersT[name] then
            creature:setTitle(playersT[name].title, titleFont, color)
        end
   end

end
end
1695648865532.png
 
Back
Top