• making a npc
    3 replies, posted
Been working on a small script for a NPC I made, anyways I am having a bit of trouble with the actual function for the npc, atm I want the npc to take the entity in this case it is a package of weed and in return spit out 950 dollars on the ground. [code] function ENT:StartTouch( drug ) if drug == ents.FindByName("durgz_weed") and drug:IsValid() then DarkRP.createMoneyBag(Vector(0, 0, 25), 950) end end [/code] any suggestions would be awesome I am having a bit of trouble. thanks
[code] if drug:GetClass() == "durgz_weed" then DarkRP.createMoneyBag(self:GetPos() + Vector(0,0,25), 950) end [/code]
Are you sure it's meant to be called "durgs_weed" rather than "drugs_weed"
[QUOTE=MPan1;47921222]Are you sure it's meant to be called "durgs_weed" rather than "drugs_weed"[/QUOTE] That is the correct entity name for it. The author for some reason decided to do it that way.
Sorry, you need to Log In to post a reply to this thread.