Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Where can I add these?
- ply.notificationType = {"You sold some dank weed", ""}
- ply:addEXP(earning*2)
- // Here we serv the Pizza
- function ENT:ServPizza(pizza,ply)
- local pizzaID = pizza:GetPizzaID()
- local pizzaData = zpizmak.config.Pizzas[pizzaID]
- local ValidCustomer
- local ValidCustomerTime = 999999
- for k, v in pairs(self.Customers) do
- if (v.agentPlate:GetPizzaID() == pizzaID and v.agentPlate:GetPizzaWaitTime() < ValidCustomerTime) then
- ValidCustomer = v
- ValidCustomerTime = v.agentPlate:GetPizzaWaitTime()
- end
- end
- if ValidCustomer then
- pizza.Delivered = true
- local pizzaPrice = zpizmak.f.GetPizzaFullIngredientPrice(pizzaID)
- local earnings = pizzaPrice + pizzaData.Price
- if (pizza:GetCurrentState_Index() == 3) then
- zpizmak.f.Notify(ply, zpizmak.language.Customer_ServPizza_good, 0)
- elseif (pizza:GetCurrentState_Index() == 4) then
- earnings = earnings * zpizmak.config.Customer_BurnedPizzaPenalty
- zpizmak.f.Notify(ply, zpizmak.language.Customer_ServPizza_bad, 1)
- end
- timer.Remove("CustomerTable_" .. self:EntIndex() .. "_Customer_" .. ValidCustomer.agent:EntIndex())
- pizza:Remove()
- local customerData = zpizmak.config.Customers[ValidCustomer.customerID]
- local ServAnim = customerData.ServAnim[math.random(#customerData.ServAnim)]
- zpizmak.f.CreateAnimTable(ValidCustomer.agent, ServAnim, 1)
- local dur = ValidCustomer.agent:SequenceDuration(ValidCustomer.agent:LookupSequence(ServAnim))
- timer.Simple(dur, function()
- if (IsValid(self) and IsValid(ValidCustomer.agent)) then
- zpizmak.f.Notify(ply, zpizmak.language.Customer_Pays .. " +" .. zpizmak.config.Currency .. tostring(earnings), 0)
- self:DeSpawnCustomer(ValidCustomer, earnings)
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement