Advertisement
rcs2112

Untitled

Oct 14th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. AddCSLuaFile("cl_init.lua")
  2. AddCSLuaFile("shared.lua")
  3. include("shared.lua")
  4.  
  5.  
  6. function ENT:Initialize()
  7.  
  8. self:SetModel("models/props_c17/cashregister01a.mdl")
  9.  
  10. self:PhysicsInit(SOLID_VPHYSICS)
  11. self:SetMoveType(MOVETYPE_VPHYSICS)
  12. self:SetSolid(SOLID_VPHYSICS)
  13. self:SetPos(self:GetPos() + Vector(0,0,60))
  14. self:SetAngles(self:GetAngles() + Angle(0,-90,0))
  15. local phys = self:GetPhysicsObject()
  16. if phys:IsValid() then
  17. phys:Wake()
  18. end
  19.  
  20.  
  21. self:SetShekelAmount(0)
  22.  
  23. end
  24.  
  25. function ENT:StartTouch(ent)
  26.  
  27. if ent:GetClass() == "coin" then
  28. self:SetShekelAmount( self:GetShekelAmount() + 1 )
  29.  
  30.  
  31.  
  32.  
  33. ent:Remove()
  34. end
  35.  
  36.  
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement