Advertisement
Jak92

Nextbot NPC USE Gives Money

May 4th, 2023
1,503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. ENT.Type = "nextbot"
  2. ENT.Base = "base_nextbot"
  3.  
  4. ENT.PrintName = "Shopkeeper"
  5. ENT.Category = "DarkRP"
  6.  
  7. ENT.Spawnable = true
  8.  
  9. function ENT:Initialize()
  10.     self:SetModel("models/props_c17/door01_left.mdl")
  11.     self:SetSolid(SOLID_BBOX)
  12.     self:SetCollisionGroup(COLLISION_GROUP_WEAPON)
  13.     self:SetMoveType(MOVETYPE_NONE)
  14.     self:SetHealth(100)
  15.  
  16.     self:AddFlags(FL_OBJECT)
  17.     self:SetCustomCollisionCheck(true)
  18. end
  19.  
  20. function ENT:AcceptInput(name, activator, caller, data)
  21.     if name == "Use" and IsValid(caller) and caller:IsPlayer() then
  22.         caller:addMoney(100)
  23.     end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement