Hey guys. I’m new to the lua coding scene and I have a question about some code.
I’m running darkrp and I’ve put in cocaine shipments. Here is the code for the cocaine.
function ENT:Use( activator, caller ) self:Remove() if ( activator:IsPlayer() ) then local health = activator:Health() activator:SetHealth( health + math.random(5,50)) end end
When i hit E on the cocaine it removes it but doesn’t give health and leaves a weird shadow.
The cocaine on the left is before i use it and the shadow on the right is afterwards without health gain.
Any help? Thanks