[Dev-Resource] Mythic Notifications

how would i change these

 exports.pNotify:SendNotification({
                                text = ('Mugged NPC Successfuly'), 
                                type = "success", 
                                timeout = 1000, 
                                layout = "centerRight", 
                                queue = "right",
                                killer = false,
                                animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}

ive tried this

 exports.mythic_notify:client:SendAlert({
                                text = ('Mugged NPC Successfuly'), 
                                type = "success", 
                                timeout = 1000, 
                                layout = "centerRight", 
                                queue = "right",
                                killer = false,
                                animation = {open = "gta_effects_fade_in", close = "gta_effects_fade_out"}
exports['mythic_notify']:DoHudText('success', 'Mugged NPC Successfully')

thank you i have one more question for you. How can i change these with your lovely notifications.

	if(xPlayer.getMoney() >= 2000) then
		xPlayer.removeMoney(2000)
		
		xPlayer.addInventoryItem('fixkit', 1)
		
		notification("Du köpte en ~g~Reparationslåda")
	else
		notification("Du har inte tillräckligt med ~r~pengar")
	end		
end)
	if(xPlayer.getMoney() >= 2000) then
		xPlayer.removeMoney(2000)
		
		xPlayer.addInventoryItem('fixkit', 1)
		exports['mythic_notify']:DoHudText('success', 'Du köpte en Reparationslåda')
	else
		exports['mythic_notify']:DoHudText('error', 'Du har inte tillräckligt med pengar')
	end		
end)
1 Like

it didnt work :frowning:

is there a reason this wouldn’t work without throwing a single error?

Does this support playing sound aswell - like pNotify does?

Hey, thanks for the amazing resource.

i wanted to ask if you could provide any good example to use for this

TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'type', text = 'message' })

i already know how to use the export one but this one kinda confused me.

No? Chances are it’s either implementation that’s not correct, or an error elsewhere in your code. When I said this was a stupidly basic resource I wasn’t joking. It’s like 20 lines all together lol

Nope, not by default. I have no reason for it. Folks are more than welcome to make contributions to it and make PR’s though.

Just a way I have setup so I can send alerts from server-side. Using this when dealing with using items etc

TriggerClientEvent('mythic_notify:client:SendAlert', self.source, { type = 'success', text = data.item.label .. ' x' .. data.item.qty .. ' Added'})
1 Like

oooohhh !! that make a lot of sense now. sorry still new to coding and trying to learn stuffs.

Thank you again !

How to change " 4 Type of Notification in Server - side ?
Can you give example for me ?

for some reason whenever I try to use the:

exports['mythic_notify']:DoHudText('type', 'message')

over an ESX notification, it won’t work, and I get no errors :/, I am sure I am the stupid one I just don’t get it lol

Is there a way to move the location of the notification? I’m not finding it anywhere. Thanks

2 Likes

Cheers mate ! Where can i change opacity of the message box ?

Honestly not sure, not used ESX. But if it’s a client script should work as long as that code is being executed.

CSS, change the positional stuff for notif-container class.

Same thing, in the CSS. If you’re wanting to change opacity for all, can change notification class and add it. Or for each types you can add it onto their respective css classes.

2 Likes

Hi again, i wanna know how do you use the
DoCustomHudText - Displays For Set Time (In Milliseconds)
where you set the milliseconds at ? Any example would really appreciated.

Just pass a 3rd argument.

exports['mythic_notify']:DoCustomHudText('inform', 'Some Random Text', 55000)

Make sure you’ve pulled the latest code from Github, I made an oopsie refactoring stuff and broke timers.

1 Like

Thank you again. i think mine still the newest one since the “latest” update was 13 days ago

where do i have to put this? exports[‘mythic_notify’]:DoHudText(‘type’, ‘message’) i want to add a notification for belt

In a client script where you want to show a notification