Advertisement
Guest User

Untitled

a guest
May 24th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. Where can I add these?
  2. ply.notificationType = {"You sold some dank weed", ""}
  3. ply:addEXP(earning*2)
  4.  
  5. // Here we serv the Pizza
  6. function ENT:ServPizza(pizza,ply)
  7. local pizzaID = pizza:GetPizzaID()
  8. local pizzaData = zpizmak.config.Pizzas[pizzaID]
  9.  
  10. local ValidCustomer
  11. local ValidCustomerTime = 999999
  12. for k, v in pairs(self.Customers) do
  13. if (v.agentPlate:GetPizzaID() == pizzaID and v.agentPlate:GetPizzaWaitTime() < ValidCustomerTime) then
  14. ValidCustomer = v
  15. ValidCustomerTime = v.agentPlate:GetPizzaWaitTime()
  16. end
  17. end
  18.  
  19. if ValidCustomer then
  20.  
  21. pizza.Delivered = true
  22.  
  23. local pizzaPrice = zpizmak.f.GetPizzaFullIngredientPrice(pizzaID)
  24. local earnings = pizzaPrice + pizzaData.Price
  25.  
  26. if (pizza:GetCurrentState_Index() == 3) then
  27. zpizmak.f.Notify(ply, zpizmak.language.Customer_ServPizza_good, 0)
  28. elseif (pizza:GetCurrentState_Index() == 4) then
  29. earnings = earnings * zpizmak.config.Customer_BurnedPizzaPenalty
  30. zpizmak.f.Notify(ply, zpizmak.language.Customer_ServPizza_bad, 1)
  31. end
  32.  
  33. timer.Remove("CustomerTable_" .. self:EntIndex() .. "_Customer_" .. ValidCustomer.agent:EntIndex())
  34. pizza:Remove()
  35.  
  36. local customerData = zpizmak.config.Customers[ValidCustomer.customerID]
  37. local ServAnim = customerData.ServAnim[math.random(#customerData.ServAnim)]
  38. zpizmak.f.CreateAnimTable(ValidCustomer.agent, ServAnim, 1)
  39. local dur = ValidCustomer.agent:SequenceDuration(ValidCustomer.agent:LookupSequence(ServAnim))
  40.  
  41. timer.Simple(dur, function()
  42. if (IsValid(self) and IsValid(ValidCustomer.agent)) then
  43. zpizmak.f.Notify(ply, zpizmak.language.Customer_Pays .. " +" .. zpizmak.config.Currency .. tostring(earnings), 0)
  44. self:DeSpawnCustomer(ValidCustomer, earnings)
  45. end
  46. end)
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement