What am i doing wrong???im trying to make it if a restraunt member says /sub a sub will appear and the other player can touch the sub and it will dissapear.
NPC Code:
// Food Script created by ...
if(created){
setstring this.foodtype,sub; }
if(playerchats&&strequals(#c,/#s(this.foodtype))){
putnpc2 playerx+.5+vecx(playerdir)*2,playery+1+vecy(player dir)*2,{
if(created){
setimg sub.png;
}
if(playertouchsme){
playerhearts=playerfullhearts;
}
}
}