Quote:
Originally Posted by Adddeeee
Then we will try that solution
If we use a DB NPC named DB_Items we could store all the information regarding the items in that NPC.
But what happens with the clientside of the level NPC? Shall we have a copy of all the items information on the clientside? Because we can't read the DB NPCs information from the client side right?
Thank you 
|
triggerclient a weapon with the data you want to send, IE, have a class join the generic shop class, have that triggerserver the NPC when you want the shop to open, then have the NPC trigger a weapon the player has that opens the shop GUI with the information provided. Can have a trigger in the class as well to hide the shop should the player leave the level or get too far away.
PHP Code:
triggerserver("npc", "DB_Items", "getitems") //possibly level name as well to restrict what shops have what items
triggerclient("gui", shopweaponname, "senditems", this.items);