1. Players can still spawn as many tents as they want. Add 'tentSpawned = true' to option 1, to prevent this.
2. Even if above would work, then only one player could spawn a tent and remove it, considering the variables you're using are the same for every player. Use a table to store the boolean value and use the player's guid or object 'tostring(player)' as a key to access the boolean value.
3. ^ same goes for the scaling.
4. Upon starting the script, the scaling options will
never work, as it requires a certain boolean value to be true, which simply can't be true in the current context (as they're declared false at the start of the script).
5. Scaling is unlimited. You never assign false to the boolean values 'sizePlusOne' and 'sizeMinusOne'.
6. No need for an else statement if there is nothing next to it. (else end, just end suffices)
7. Option 5 should be player:GossipComplete() instead.
8. I suggest putting a player:GossipComplete() to every option OR a return to the main menu OR a player:GossipComplete() at the end of the script so it always ends after it's run its course. This is because when you spawn a tent now, the menu will remain, yet unclickable.
9. Your 'if (intid == 1) then' scope spans over the entire function. You're missing an end at line 29 and have an end too much at line 59.
10.
Code:
local GetClosestTent = pUnit:GetGameObjectNearestCoords(x, y, z, Tent) --Making a variable for removing the tent.
Above doesn't work, pUnit does not exist in the given context.
I think that's about all. The idea is interesting but I've seen it done before with a tent, although without the scaling. I'd like to see a more advanced approach to this, i.e. being able to spawn multiple tents, maybe a campfire included and so on. However, fix up the given issues first before you attempt it.
Keep it up.