02-16-2015, 04:29 AM
Hello, welcome to the forum.
You have the callback function signatures wrong. The first parameter is the split (array-table of strings that represent the command broken on individual spaces), the player is in the second parameter. This should work:
Also, your plugin will store the position for all players in a single variable, so the players will overwrite each other's last saved position. Is that intentional?
One last thing, the next time you post lua code, please wrap it in [ shcode=lua ] tag instead of [ php ] tag. I have edited your post to fix that. The code is then properly syntax-highlighted and doesn't scroll.
You have the callback function signatures wrong. The first parameter is the split (array-table of strings that represent the command broken on individual spaces), the player is in the second parameter. This should work:
... function GetPos(Split, Player) PlayerPos = Vector3d(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ()) Player:SendMessage("Position Register") end function GetTp(Split, Player) ...
Also, your plugin will store the position for all players in a single variable, so the players will overwrite each other's last saved position. Is that intentional?
One last thing, the next time you post lua code, please wrap it in [ shcode=lua ] tag instead of [ php ] tag. I have edited your post to fix that. The code is then properly syntax-highlighted and doesn't scroll.