Graal Pastebin
New PastePasted on November 13, 2011.
View the raw file
function onActionServerSide() { if (params[0] == "purchase") { client.gold -= abs(params[2]); player.addweapon(params[1]); } } //#CLIENTSIDE // Your other code.. public function displayItem(itemname, itemprice, itemdesc, realitem) { this.shop_price = itemprice; this.shop_realitem = realitem; Shop_Text1.text = "Item:" SPC itemname; Shop_Text2.text = "Price:" SPC itemprice; Shop_MultiLine1.text = itemdesc; Shop_Window1.visible = true; } function Shop_Button1.onAction() { if (client.gold >= this.shop_price) { if (findweapon(this.shop_realitem) != NULL) { triggerserver("gui", this.name, "purchase", this.shop_realitem, this.shop_price); } } } function Shop_Button2.onAction() { Shop_Window1.visible = false; }