Well first no clue on what you have server wise.
You need a hashtable
Some people use .xml for those type of pos idk why..
-Stick with hashes,,..
Btw im not familiar with saving positions yet, So i could be false on anything but i am 99% sure i should be correct!
-First
I dont know if you have a login system..
If you do have a login system you will need a something like
Position.Get( player.Name );
This should get the saved position if it does not work in the login part attemt to add to
function onPlayerSpawn
That would definetly do the trick.
.Get
will Get the players data in this case the position.
You should be some what okay on your CMD for saving positions
Unable to testfunction onPlayerCommand( player, cmd, text )
{
if ( cmd == "pos" )
{
local pos = player.Pos;
Position.Add( player.Name , pos.x + "," + pos.y + "," + pos.z + "," );
Position.Save(LU/data/Position.hsh
MessagePlayer( "Your position was saved at: " + pos.x + ", " + pos.y + ", " + pos.z , player );
MessagePlayer( "You will spawn hear at your next login", player );
SaveHashes();
}
You may not need to create the hashtable idk but in case
function CreateHashes()
{
Positions <- HashTable( "Positions" );
}
I dont think you will need to call for a load on this hashtable due to your making a call to
.Get
the position when the player spawns.
But in case you should have something like
function LoadHashes()
{
// This is where we are going to be loading the hash files
// First we need to create them
CreateHashes();
// And then load them
Position.Load(LU/data/Positions.hsh" );
}
Like i said though i have not got into positions and this should have you 99% there. i actually plan on doing something like this on my server.
Some reason when i see others create this it never loads the pos,. usaly you have to type something like
/loadpos
i dont like that..
Please let me know how this goes