These things are used to pick up and drop an item.
Class melon:
NPC Code:
if (created) {setimg melon.gif;
setshape2 1,1,{22,22};}
if (actionpickup) {
setstring clientr.melon, #v(strtofloat(#s(clientr.melon))+1);
addweapon melon;
destroy;}
Weapon melon:
NPC Code:
if (actionserverside) { putnpc2 playerx,playery,{join melon;} ;}
//#CLIENTSIDE
if (playerchats&&strequals(#c,drop)){
triggeraction 0,0,serverside,melon,#a;
setstring clientr.melon, #v(strtofloat(#s(clientr.melon))-1);}
Weapon pickup:
NPC Code:
if (weaponfired) {
triggeraction playerx+1.5+vecx(playerdir)*2,
playery+2+vecy(playerdir)*2,pickup,;}
Some compination of these scripts must be causing that
when it(class melon) is picked up you get +2 in the clientr.melon instead of the +1 its supposed to give.
But I cant seem to find out what it is.
Help?
