Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 5th, 2020 152 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --|**********************************************************************
  2. --|* Project           : Visual Life Selfmade
  3. --|* Author            : N0pe
  4. --|* Date              : 27.11.2019
  5. --|**********************************************************************
  6.  
  7. NPCManager = inherit(Object)
  8.  
  9. function NPCManager:constructor()
  10.     self.m_NPCPeds = {
  11.         ["NPC"] = {
  12.             { 143, -2055.158203125, 464.6298828125, 35.171875, 283.01489257812, 0, 0, 1.5, "Matambo", "NPC_VEHICLERENT" },
  13.             { 35, -1967.1875, 296.31640625, 35.263648986816, 88.262786865234, 0, 0, 1.5, "Udo", "NPC_UDOQUEST", "" },
  14.             --        { 2, -1599.9775390625, 800.9150390625, 6.8203125, 229.03273010254, 0, 0, 1.5, "Amuk", "Waffendealer" },
  15.             --        { 15, -1579.05078125, 807.525390625, 6.8203125, 268.67749023438, 0, 0, 1.5, "Ali", "Waffenh├Ąndler" },
  16.             --        { 59, -1483.748046875, 760.865234375, 7.1778392791748, 88.147399902344, 0, 0, 1.5, "Dieter", "Verkehrsbetriebe" },
  17.             --        { 158, -1060.5390625, -1198.341796875, 129.21875, 272, 0, 0, 1.5, "Klausi", "Farmer" },
  18.             --        { 194, 1714.845703125, -1671.1142578125, 20.224201202393, 1, 18, 0, 1.5, "Emma", "Fahrzeugstelle" },
  19.             { 309, -1608.2333984375, 792.12890625, 6.8203125, 132, 0, 0, 1.5, "Markus", "Abfallwirtschaft", "VL:CLIENT:JobGUI:show", "cleaner" },
  20.             { 94, -1826.076171875, 42.228515625, 15.122790336609, 270, 0, 0, 1.5, "Detlef", "VL:CLIENT:JobGUI:show", "trucker" },
  21.             { 20, -2227.103515625, 287.076171875, 35.3203125, 357, 0, 0, 1.5, "Herbert", "Taxifahrer", "VL:CLIENT:JobGUI:show", "taxidriver" },
  22.             --        { 281, -1606.7373046875, 728.9951171875, -5.2421875, 358, 0, 0, 1.5, "Officer Smith", "Asservatenkammer" },
  23.             --        { 249, -1604.8623046875, 783.7958984375, 6.8203125, 35, 0, 0, 1.5, "Skinner", "Auktionator" },
  24.             --        { 281, -1572.431640625, 657.546875, 7.1875, 265, 0, 0, 1.5, "Officer Morgan", "Abschlepphof" },
  25.             { 253, -2102.12109375, -12.3251953125, 35.3203125, 275, 0, 0, 1.5, "Alfred", "Stra├čenreinigung", "VL:CLIENT:JobGUI:show", "streetcleaner" },
  26.             --        { 144, 1709.7275390625, 701.4765625, 10.8203125, 90, 0, 0, 1.5, "Dildo Beutlin", "Dealer" },
  27.             { 161, -2579.4404296875, 310.095703125, 5.1796875, 90, 0, 0, 1.5, "Albert", "Landwirt", "VL:CLIENT:JobGUI:show", "farmer" },
  28.             --        { 21, 161.8681640625, -18.5439453125, 1.578125, 270, 0, 0, 1.5, "Louis", "Hanfdealer" },
  29.             { 21, -1412.2861328125, -299.2998046875, 6.203125, 137, 0, 0, 1.5, "Jeremy", "Pilot", "VL:CLIENT:JobGUI:show", "pilot" },
  30.         },
  31.         ["Homeless"] = {
  32.             { -2025.4755859375, 454.5458984375, 35.172294616699, 1, "Haste mal nen Euro?" }
  33.         },
  34.     }
  35.  
  36.     self:createNPC()
  37. end
  38.  
  39. function NPCManager:createNPC()
  40.     self.m_PedCount = 0
  41.     for _, v in ipairs(self.m_NPCPeds["NPC"]) do
  42.         local sphere = {}
  43.         local ped = createPed(v[1], v[2], v[3], v[4], v[5])
  44.         sphere[ped] = createColSphere(v[2], v[3], v[4], v[8])
  45.  
  46.         ped:setInterior(v[6])
  47.         ped:setDimension(v[7])
  48.         ped:setFrozen(true)
  49.         ped:setData("infoPed", true)
  50.         ped:setData("pedName", v[9])
  51.         ped:setData("pedInfo", v[10])
  52.         ped:setData("pedFunction", v[11])
  53.  
  54.         addEventHandler("onColShapeHit", sphere[ped], function(element, dim)
  55.             if element:getType() == "player" and dim then
  56.                 if not element:isInVehicle() then
  57.                     if ped:getData("infoPed") then
  58.                         if ped:getData("pedFunction") then
  59.                             if ped:getData("pedFunction") == "VL:CLIENT:JobGUI:show" then
  60.                                 element:triggerEvent(ped:getData("pedFunction"), element, v[12])
  61.                             else
  62.                                 element:triggerEvent(ped:getData("pedFunction"), elementl)
  63.                             end
  64.                         else
  65.                             Vehiclerent:triggerRent(element)
  66.                         end
  67.                     end
  68.                 end
  69.             end
  70.         end)
  71.  
  72.         self.m_PedCount = self.m_PedCount + 1
  73.     end
  74.  
  75.     for key, value in pairs(self.m_NPCPeds["Homeless"]) do
  76.         local sphere = {}
  77.         local ped = createPed(137, value[1], value[2], value[3], value[4])
  78.         sphere[ped] = createColSphere(value[1], value[2], value[3], 1.5)
  79.  
  80.         ped:setData("homelessPed", true)
  81.         ped:setFrozen(true)
  82.  
  83.         addEventHandler("onColShapeHit", sphere[ped], function(element, dim)
  84.             if element:getType() == "player" and dim then
  85.                 if not element:isInVehicle() then
  86.                     if ped:getData("homelessPed") then
  87.                         element:sendMessage("#7cb2e6[Obdachloser Mann] #ffffff" .. value[5], 255, 255, 255)
  88.                     end
  89.                 end
  90.             end
  91.         end)
  92.  
  93.         self.m_PedCount = self.m_PedCount + 1
  94.     end
  95.  
  96.  
  97.     outputDebugString("Es wurden " .. self.m_PedCount .. " InfoNPC's geladen")
  98. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top