Need help to my first plugin ^^
#3
Thank the 2 commands work ! ^^
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 Wink
Reply
Thanks given by:


Messages In This Thread
RE: Need help to my first plugin ^^ - by xoft - 02-16-2015, 04:29 AM
RE: Need help to my first plugin ^^ - by Infinity-Codeur - 02-16-2015, 05:03 AM
RE: Need help to my first plugin ^^ - by NiLSPACE - 02-16-2015, 05:06 AM
RE: Need help to my first plugin ^^ - by xoft - 02-16-2015, 05:14 AM



Users browsing this thread: 4 Guest(s)