Thread: Large variables
View Single Post
  #8  
Old 06-19-2003, 07:42 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Bes way is to store the data in the players account (strings without any . in it), and only copy to clientr. strings when you want the player to display it. To get the stuff from another online player you can use with (getplayer()). Imagine you store the items in item#v(itemid) strings, and the current player wants to get the item information from player 'Stefan':

NPC Code:

itemid = 0;
setstring this.item,;
with (getplayer(Stefan)) {
setstring this.item,#s(item#v(itemid));
}
setstring clientr.otheritem#v(itemid),#s(this.item);



That copies the item0 string from 'Stefan' into this.item, and then copies to some clientr. string so that the current player can display it.
Reply With Quote