Thank the 2 commands work ! ^^
This is my new code :
But in chat i have "position register" or "You have tp into you old position" And "Info : something went wrong while executing command" in my server i don't have any error just in minecraft chat What is the probleme ?
Thank in advance
This is my new code :
PlayerPos = {}
function Initialize(Plugin)
PLUGIN = Plugin
Plugin:SetName("Position")
Plugin:SetVersion(1)
--Command
cPluginManager.BindCommand("/getposition", "permissionnode", GetPos, " - Get your position")
cPluginManager.BindCommand("/getTp", "permissionnode", GetTp, " - Tp to position")
LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
return true
end
function GetPos(Split,Player)
PlayerPos[Player:GetUniqueID()] = Vector3d(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ())
Player:SendMessage("Position Register")
end
function GetTp(Split,Player)
Player:TeleportToCoords(PlayerPos[Player:GetUniqueID()].x, PlayerPos[Player:GetUniqueID()].y, PlayerPos[Player:GetUniqueID()].z)
Player:SendMessage("You have tp into you old position")
But in chat i have "position register" or "You have tp into you old position" And "Info : something went wrong while executing command" in my server i don't have any error just in minecraft chat What is the probleme ?
Thank in advance

