You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function init()
ProtocolGame.registerExtendedOpcode(98, teste)
function terminate()
ProtocolGame.unregisterExtendedOpcode(98)
function refresh()
g_game.getProtocolGame():sendExtendedOpcode(98, buffer)
function teste(protocol, opcode, buffer)
print(buffer)
end
Server Files
function onExtendedOpcode(player, opcode, buffer)
if opcode == OPCODE_LANGUAGE then
-- otclient language
if buffer == 'en' or buffer == 'pt' then
-- example, setting player language, because otclient is multi-language...
-- player:setStorageValue(SOME_STORAGE_ID, SOME_VALUE)
end
else
-- other opcodes can be ignored, and the server will just work fine...
end
if opcode == 98 then
if buffer == "teste" then
player:sendExtendedOpcode(98, "teste")
end
end
end
Talkaction
function onSay(player, words, param)
player:sendExtendedOpcode(player, 98, "teste")
return print("Opcode Enviado")
end
The text was updated successfully, but these errors were encountered:
Review and dont close....
Client Files
teste.lua
Server Files
Talkaction
The text was updated successfully, but these errors were encountered: