NPC Code:
else if (playerchats&&strequals(#c,rent mine 1)&&playergralats=>5&&mine.onea=0&&ownsmine){
say2 You already have a mine!;
}
The bolded part is a flag. The only problem is that even when the flag is set, it won't give the message "You already have a mine!"