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