Conversation
TomGrobbe
left a comment
There was a problem hiding this comment.
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.
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.
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) |
| end) | ||
|
|
||
| RegisterCommand('blackout', function(source) | ||
| TriggerClientEvent('vSync:blackout', source) |
| end | ||
|
|
||
| RegisterCommand('time', function(source, args, rawCommand) | ||
| TriggerClientEvent('vSync:time', source, args) |
| ShowNotification(message, blink) | ||
| end) | ||
|
|
||
| --[[ UNIVERSAL MENU HOOKING STUFF ]]-- |
There was a problem hiding this comment.
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.