View Single Post
  #4  
Old 11-13-2011, 08:40 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
The problem is that you're triggering serverside like it's a weapon. You can't do that.

Instead, something like

PHP Code:
function onCreated() {
  
this.itemName "whatever";
  
this.itemPrice 123123;
  
  
this.setShape(11616); // so it can be triggered)
}

function 
onActionPurchase() {
  echo(
player.account " wants to purchase this item!");
}

//#CLIENTSIDE
function Shop_Button1.onAction() {
  if (
client.gold client.store1 || client.gold == client.store1) {
    if (!(
hasweapon((@client.realitem)))) {
      
triggerAction(this.xthis.y"purchase"null);
    }
  }

I am using a class. Why are you telling me to assign item details in the class when I will be selling different items at different prices?
__________________

Last edited by Emera; 11-13-2011 at 08:51 PM..
Reply With Quote