Advertisement
midou1451

Untitled

Jul 17th, 2018
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. function ENT:Use(ply)
  2. if(ply:IsPlayer())then
  3. local lookAtX,lookAtY = WorldToScreen(ply:GetEyeTrace().HitPos or Vector(0,0,0),self:GetPos()+self:GetAngles():Up()*1.55, 0.2375, self:GetAngles())
  4. if inrange(-31, -34, -17, -55, lookAtX, lookAtY) and ply:getDarkRPVar("money") >= TPRINTERS_CONFIG.UpgradePrice_Yellow and self.Speed < 9 then
  5. sound.Play( "buttons/button15.wav", self:GetPos(), 100, 100, 1 )
  6. ply:SetNWInt("player_argent_sale", ply:GetNWInt("player_argent_sale") + ( -TPRINTERS_CONFIG.UpgradePrice_Yellow ) )
  7. self.Speed = self.Speed + 1
  8. DarkRP.notify( ply, 1, 5, "Votre printer a était amélioré!" )
  9. UpdatePrinter(self)
  10. elseif self.PrintedMoney > 0 then
  11. caller:SetNWInt("player_argent_sale", caller:GetNWInt("player_argent_sale") + (self:GetHolding()*self:GetSellPrice()))
  12. DarkRP.notify( ply, 0, 5, "Vous avez récuperé "..self.PrintedMoney.. "€" )
  13. self.PrintedMoney = 0
  14. UpdatePrinter(self)
  15. end
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement