The following code in addons/darkrpmodifications/food.lua doesn’t work. I get no errors:
model = “models/props/cs_italy/bananna.mdl”,
energy = 10,
price = 10,
requiresCook = false,
customCheck = function(ply)
local playerAll = player.GetAll()
for k, v in pairs(playerAll) do if v:Team() != TEAM_COOK then return false end end end
If I remove the custom check it works. If I leave it, the food is there, but it is not available for purchase.
How would I go about editing the spawned_food entity? I do not want to edit core DarkRP files… So how would I go about disabling that entity and entering it into darkrpmodification? Without editing the core files. I mean I know how I could by editing the core files… But like I said, I do not want to.