Closed bleachyblue closed 2 years ago
It was added there in the first attempt to fix the issue. (Before the started variable) I'm sure you could move it out of the block however will this make a difference? Unnecessary if statement running multiple times if it causes no issue.
It was added there in the first attempt to fix the issue. (Before the started variable) I'm sure you could move it out of the block however will this make a difference? Unnecessary if statement running multiple times if it causes no issue.
I'll move it out because if the resource is restarted then switch will be false and if the player just spawns or changes characters using the command then switch will be true.
Some users were experiencing issues with departments duplicating in game when attempting to edit/create characters. The start function is being called more than once, a variable has been created to ensure that the checkPerms event is only triggered once.
There's probably a slightly more efficient way to fix this issue however I don't fancy backtracking the code to prevent breaking changes.