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!