LielXD / xd_doorlock

Doorlock System for Fivem using ESX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with Notify change

SirSgtReal opened this issue · comments

I would like to change the Notify, I want to use pNotify.

Now I entered the following: Config.Custom_Notify = TriggerEvent('pNotify:SendNotification', Text, Time, Type).

When I enter it like this, I get the following error.

[ 1191047] [FiveM_b2699_GT] MainThrd/ ^1SCRIPT ERROR: @xd_doorlock/client/main.lua:11: attempt to index a nil value (global 'Config')^7
[ 1191047] [FiveM_b2699_GT] MainThrd/ ^3> fn^7 (^5@xd_doorlock/client/main.lua^7:11)
[ 1198079] [FiveM_b2699_GT] MainThrd/ ^1SCRIPT ERROR: @xd_doorlock/client/main.lua:33: attempt to index a nil value (global 'Config')^7
[ 1198079] [FiveM_b2699_GT] MainThrd/ ^3> ref^7 (^5@xd_doorlock/client/main.lua^7:33)

could you maybe help me with that?

Translated with Google translator

You should place your execute inside the function:

Config.ESX_Notify = false
Config.Custom_Notify = function(Text, Time, Type)
	TriggerEvent('pNotify:SendNotification', Text, Time, Type)
end

let me know if it helped you.

commented

Didn't Respond.