Darkrp Notifications Not Appearing ?

I am trying to create a police ammo box:

I am trying to create it so when the government official walks up to it and interacts with it, money is taken off him and he is greeted with a notification that reads; “You have spent $”…ammoprice…" on ammo!"


function ENT:Use(a , caller)

	local ammoprice = 250
	caller:GiveAmmo( 25, "ar2", true)
	Player:AddMoney(-ammoprice)
	DarkRP.notify(caller, 1, 5, "You have spent $"..ammoprice.." on ammo!")

end

I have triple checked the code and can’t find anything wrong but still no notification or money taken. The only thing I could think it is, is that on DarkRP.notify I have put caller and it should be something else!

Video to show what is happening:

Help is greatly appreciated!

Use “caller” instead of “Player”




caller:addMoney( -ammoprice ) --> You notice I changed Player to caller, and AddMoney() to addMoney()



What about the notification not showing ? But thank you for that!

The notify code looks fine

The reason the notification wasn’t showing is most likely because the addmoney code was wrong, test it out and get back to me.

You need to check weather the player can afford ammoprice before taking it