player.rupees can only truly be edited on the serverside like so.
PHP Code:
function onActionServerSide() {
if (params[0] == "caughtfish") {
player.rupees += int(random(1,5));
}
}
//#CLIENTSIDE
function onFishCaught() {
triggerserver("gui", name, "caughtfish");
}
And because you're using GS2 you can write the weaponfired like so..
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
// if stuff
// do stuff
}