Well DirkDigger, I can't understand why you have such an attitude. We need to understand better what happened to you, so you can get a better answer. So don't get mad if you use vague words like "guard" instead of specific FOnline concepts like slave, merc, militia. And no, the PK does not need to be there, cause he can just tell his mercs/slaves to kill everyone they see AND to say there. After that, the PK can just leave and the trap he'd set up will work just fine.
Also, I wonder if you knew about Town Preview, which allows you to see if there are players stading in the entrances of towns, whitout actually entering. You can toggle this from the world map, look for a button with a sign that says "Town Preview" and then choose which entrance you want to preview. If you see people with guns or stuff like that, which looks suspicious, it's better not to enter.
Don't rage at those who don't do anything to you, including people like Floodnik who say dying is normal here. Although gridcamping is not allowed, death is certainly something normal, and something you should be prepared to meet almost all the time. So sorry, but if you don't like it, this game might actually not be the best for you.