I’m trying to make a system where players can rent rooms for a certain amount of time and invite their friends to the room, and I have it mostly done, but there’s one problem. I have no idea how to make it so if someone is already renting the room, nobody else can rent it until that person leaves. How would I start?
A Couple of ways:
table to store records of Rooms, you can Assign a Variable to that a room to indicate that a person owns the Room, you can either:
forloop to iterate through this
tableand check if the table exists for that room
table.find()to get the
indexfor the room, if the key doesnt exist, it will return
nil, otherwise, it will return a
ObjectValue to store the Owner of the Room, So when Players attempt to get the room, You can check the
Values of the
ObjectValue to determine this, You might also be able to use a
for loop for this.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.