-
Notifications
You must be signed in to change notification settings - Fork 51
Add Universal Menu Hooks #5
base: master
Are you sure you want to change the base?
Conversation
TomGrobbe
left a comment
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.
Some small changes that I'd like to see to remove/improve duplicate/unnecessary events/code. Other than that looks all good. And sorry for the delay, completely forgot about this. You should've reminded me!
| end | ||
|
|
||
| RegisterCommand('freezetime', function(source, args) | ||
| TriggerClientEvent('vSync:freezeTime', source) |
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 did you add a unnecessary client event here? Why not just have a function that you call from both the registerCommand, as well as the new event which will check permissions and update time options accordingly? that saves an unnecessary call to the client and back to the server.
|
|
||
| RegisterCommand('freezeweather', function(source, args) | ||
| RegisterCommand('freezeweather', function(source) | ||
| TriggerClientEvent('vSync:freezeWeather', source) |
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.
Same here, seems like an unnecessary client event to me, unless I'm missing something obvious here.
| end) | ||
|
|
||
| RegisterCommand('weather', function(source, args) | ||
| TriggerClientEvent('vSync:weather', source, args) |
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.
Same here
| end) | ||
|
|
||
| RegisterCommand('blackout', function(source) | ||
| TriggerClientEvent('vSync:blackout', source) |
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.
And also here
| end | ||
|
|
||
| RegisterCommand('time', function(source, args, rawCommand) | ||
| TriggerClientEvent('vSync:time', source, args) |
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.
And here as well
| ShowNotification(message, blink) | ||
| end) | ||
|
|
||
| --[[ UNIVERSAL MENU HOOKING STUFF ]]-- |
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.
maybe add a link to where people can get/find info about this universal menu? I don't mind a link there just so people know what it's for 😉
No description provided.