-
-
Notifications
You must be signed in to change notification settings - Fork 733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix/feat(es_extended): Basic Statebags + Correct vehicle spawning #696
Conversation
|
||
Player(self.source).state:set("identifier", self.identifier, true) | ||
Player(self.source).state:set("license", self.license, true) | ||
Player(self.source).state:set("job", self.job, true) | ||
Player(self.source).state:set("group", self.group, true) | ||
Player(self.source).state:set("name", self.name, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you keep calling the Player() function?
Player(self.source).state:set("identifier", self.identifier, true) | |
Player(self.source).state:set("license", self.license, true) | |
Player(self.source).state:set("job", self.job, true) | |
Player(self.source).state:set("group", self.group, true) | |
Player(self.source).state:set("name", self.name, true) | |
local stateBag = Player(self.source).state | |
stateBag:set("identifier", self.identifier, true) | |
stateBag:set("license", self.license, true) | |
stateBag:set("job", self.job, true) | |
stateBag:set("group", self.group, true) | |
stateBag:set("name", self.name, true) |
Maybe we can make it so that xPlayer.set is rewritten and uses statebag
Or new function xPlayer.setStatebag/xPlayer.setState
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could add more states like "handcuffed", "dragged", "onduty" and more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could add more states like "handcuffed", "dragged", "onduty" and more
🫣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or new function xPlayer.setStatebag/xPlayer.setState
then there would be no point in statebags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would also be a statebag, only simpler. And it would be available from xPlayer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's just an idea.
fixes 'id' issue, also fixes the "TextUI Is not displaying!" issues :)
This should in theory, stop the event from being abused, since mod menus were previously able to Trigger This event to set the user to a whitelisted job, assuming the user was near the job centre, so this now checks to make sure that the job is a non-whitelisted job, and warns when abused
SendNUIMessage({ | ||
action = 'show', | ||
message = message and message or 'ESX-TextUI', | ||
type = type(typ) == "string" and typ or 'info' | ||
type = type == 0 and "info" or type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An earlier error was the type number, which can only be a string. I think it should be the original.
Or put it in so that it can only be a string type.
No description provided.