Elio
March 2, 2019, 4:44pm
1
NOTIF
Notifications with original GTA V look, but more flexible.
Download
Installation
Download the resource ;
Drag and drop it in your resources folder ;
Add start notif
into you server.cfg
.
How to use
exports.notif:SendNotification({
text = "Test text.",
type = 'topRight',
timeout = 6000,
})
Options
type
define where the notification will be draw ;
timeout
define how much time (in ms) the notification is on screen ;
You can create your own notification “type” by following the pattern in the code.
Updates
No updates yet.
Notes
The code is a bit messy, I’ll fix that later maybe ;
It doesn’t deal with duplicate notifications (not as default notifications do) ;
The centerLeft and centerRight options have some issues ;
Notifications with different timeout may create issues.
16 Likes
Damyan
March 2, 2019, 4:50pm
2
Looks cool! Nice release!
Elio
March 5, 2019, 8:21pm
4
I’m glad you enjoy it. I’ll try to optimize it as it consume far more performance than original ones.
Very nice release but I have a question. Can I use SetTextFont with it ?
Elio
July 15, 2019, 9:30am
6
You can but the notification may become a little bit messy. Plus you will have to add it into my resource as you will not be able to use it the way you used to (with default notification system).
1 Like
I have used your script for 1 week and it worked perfectly. I hope you will add ShowAdvancedNotification
1 Like
Trying to get this working om my server,
How can i get this working with ESX;
how to change this;
(example)
ESX.ShowNotification(_U('wash_successful'))
to this script.
1 Like
Elio
August 12, 2019, 7:51pm
9
I guess doing that should work, I’m note really into ESX so I have no clue of what you want to do precisely.
exports.notif:SendNotification({
text = _U('wash_successful'),
type = 'topRight',
timeout = 6000,
})
grobux
October 15, 2019, 9:20pm
10
Very nice little plugin @Elio , thanks for your work !
To replace ESX’s notifications, edit es_extended/client/functions.lua
Search for:
ESX.ShowNotification = function(msg)
SetNotificationTextEntry('STRING')
AddTextComponentSubstringPlayerName(msg)
DrawNotification(false, true)
end
Change it with that code (customize the type and timeout if needed):
ESX.ShowNotification = function(msg)
exports.notif:SendNotification({
text = msg,
type = 'bottomLeft',
timeout = 6000
})
end
Then fix notif/__resource.lua
(export in singular, GitHub PR about that bug: https://github.com/Sheamle/notif/pull/1/files )
Restart your server and enjoy !
Ping @TilburgRP
4 Likes
I just tested what you sended, every ESX plugin gives a error and nothing does it anymore…
EDIT: Fergot a end
hOff
May 20, 2020, 9:07am
12
Hey, nice release. Is there any way to change the look it looks on my server?
1 Like
got the exact same issue all the notifications are white now… any way to solve this ?!
hOff
May 20, 2020, 2:06pm
14
I found a way to get a better color of the text… in your locales or anywhere:
['gave_weapon'] = '~b~you gave ~y~1x~s~ ~b~%s~s~ to ~y~%s~s~.',
etc.
More colors on this git site
1 Like
but that is only supposed to change the text color not the background right ?! i think the main problem after using this script is that it changes the background color of the notifications not sure why cuz i cant find why is it doing that
Elio
May 20, 2020, 8:00pm
16
@ScrappyCap @hOff I updated the resource to fix this issue.
2 Likes
yeah can confirm its fixed now ! ty for the fix <3
Hi! This release is great. I got a question though. My bank notification is in my HUD and I also want it above the map. But I can’t get it to work. I believe its in es_extended/server/paycheck.lua … can anybody help me out? Its quite frustrating …
Fixed it by just keeping the map always on
Not working … i just want to change the location of salary notification ??
i run your script but it doesn’t work ;(
1 Like