I'd personally do something like have a class called "party" or whatever else you want to name it with a few functions like addPlayer, removePlayer, getPlayers, invitePlayer etc.
then create a party by doing something like
PHP Code:
function newParty(){
temp.party = new TStaticVar("Party_"@player.account);
party.join("party");
party.addPlayer(player);
}
then in the class
PHP Code:
public function addPlayer(pobj){
pobj.party = this;
this.members.add(pobj);
}
then when a player wants to invite someone, imagine by some chat command on the client that triggers the server with the account name
PHP Code:
function onActionServerside(cmd, target){
if(cmd == "inv"){
player.party.invitePlayer(findplayer(target));
}
if(cmd == "create"){
newParty();
}
}