Message
Name
Type
Description
-- player.lua
local function message(self, msg)
if msg.Client then
local x, y, z = msg.Data.x, msg.Data.y, msg.Data.z
self:Move(x, y, z)
local move_message = {
x = msg.Data.x,
y = msg.Data.y,
z = msg.Data.z
}
api.client.Message(self.ID, move_message)
end
end
-- Receive a typical move message, sent from the client to the game server.
-- Reconstruct the same move message.
-- Send the move message back, from the server to the client.Last updated