Quote:
Originally Posted by fowlplay4
Right, well it doesn't work because you're trying to use triggerserver in a level npc.
|
Quote:
Originally Posted by Astram
PHP Code:
function onActionServerSide(cmd) { if (cmd == "buy") { player.rupees -= thiso.price; addweapon(thiso.weapon); } }
|
thiso.price and thiso.weapon are undefined on the serverside, you need to use the params you are sending in triggerserver, you need to invoke the object for addweapon (player.addweapon())
You also really shouldn't define the weapon name and cost on the clientside since it opens it up for all sorts of abuse.