Advertisement
Noneatme

Untitled

Jul 1st, 2013
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 35.62 KB | None | 0 0
  1. -- Decompiled using luadec 2.1 UNICODE by sztupy (http://winmo.sztupy.hu) and viruscamp
  2. -- Command line was: C:\Users\Noneatme\Documents\luadec\selfclick_c.lua
  3.  
  4. local lp = getLocalPlayer()
  5. local x, y = guiGetScreenSize()
  6. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function()
  7.   -- upvalues: x , y
  8.   click_window = guiCreateWindow(x / 2 - 257, y / 2 - 132.5, 515, 265, "", false)
  9.   guiWindowSetMovable(click_window, false)
  10.   guiWindowSetSizable(click_window, false)
  11.   click_tabpanel = guiCreateTabPanel(9, 29, 497, 227, false, click_window)
  12.   click_tab_inv = guiCreateTab("Inventar", click_tabpanel)
  13.   click_grid_inv = guiCreateGridList(8, 6, 355, 190, false, click_tab_inv)
  14.   guiGridListSetSelectionMode(click_grid_inv, 2)
  15.   grid_inv_item = guiGridListAddColumn(click_grid_inv, "Item", 0.5)
  16.   grid_inv_anzahl = guiGridListAddColumn(click_grid_inv, "Anzahl", 0.4)
  17.   click_button_wegwerfen = guiCreateButton(368, 128, 121, 27, "Wegwerfen", false, click_tab_inv)
  18.   guiSetFont(click_button_wegwerfen, "default-bold-small")
  19.   click_button_benutzen = guiCreateButton(368, 164, 121, 27, "Benutzen", false, click_tab_inv)
  20.   guiSetFont(click_button_benutzen, "default-bold-small")
  21.   click_button_close1 = guiCreateButton(465, 7, 24, 22, "X", false, click_tab_inv)
  22.   guiSetFont(click_button_close1, "default-bold-small")
  23.   click_tab_sta = guiCreateTab("Statistik", click_tabpanel)
  24.   click_label_name1 = guiCreateLabel(15, 12, 99, 19, "Name:", false, click_tab_sta)
  25.   guiSetFont(click_label_name1, "default-bold-small")
  26.   click_label_name2 = guiCreateLabel(150, 12, 99, 19, "", false, click_tab_sta)
  27.   guiSetFont(click_label_name2, "default-bold-small")
  28.   click_label_spielzeit1 = guiCreateLabel(15, 32, 99, 19, "Spielzeit:", false, click_tab_sta)
  29.   guiSetFont(click_label_spielzeit1, "default-bold-small")
  30.   click_label_spielzeit2 = guiCreateLabel(150, 32, 99, 19, "", false, click_tab_sta)
  31.   guiSetFont(click_label_spielzeit2, "default-bold-small")
  32.   click_label_geld1 = guiCreateLabel(15, 52, 99, 19, "Geld:", false, click_tab_sta)
  33.   guiSetFont(click_label_geld1, "default-bold-small")
  34.   click_label_geld2 = guiCreateLabel(150, 52, 99, 19, "", false, click_tab_sta)
  35.   guiSetFont(click_label_geld2, "default-bold-small")
  36.   click_label_bankgeld1 = guiCreateLabel(15, 72, 99, 19, "Bankgeld:", false, click_tab_sta)
  37.   guiSetFont(click_label_bankgeld1, "default-bold-small")
  38.   click_label_bankgeld2 = guiCreateLabel(150, 72, 99, 19, "", false, click_tab_sta)
  39.   guiSetFont(click_label_bankgeld2, "default-bold-small")
  40.   click_label_fraktion1 = guiCreateLabel(15, 92, 99, 19, "Fraktion:", false, click_tab_sta)
  41.   guiSetFont(click_label_fraktion1, "default-bold-small")
  42.   click_label_fraktion2 = guiCreateLabel(150, 92, 99, 19, "", false, click_tab_sta)
  43.   guiSetFont(click_label_fraktion2, "default-bold-small")
  44.   click_label_rang1 = guiCreateLabel(15, 112, 102, 19, "Fraktionsrang:", false, click_tab_sta)
  45.   guiSetFont(click_label_rang1, "default-bold-small")
  46.   click_label_rang2 = guiCreateLabel(150, 112, 102, 19, "", false, click_tab_sta)
  47.   guiSetFont(click_label_rang2, "default-bold-small")
  48.   click_label_job1 = guiCreateLabel(15, 132, 99, 19, "Job:", false, click_tab_sta)
  49.   guiSetFont(click_label_job1, "default-bold-small")
  50.   click_label_job2 = guiCreateLabel(150, 132, 150, 19, "", false, click_tab_sta)
  51.   guiSetFont(click_label_job2, "default-bold-small")
  52.   click_label_gh1 = guiCreateLabel(15, 152, 99, 19, "Handyguthaben:", false, click_tab_sta)
  53.   guiSetFont(click_label_gh1, "default-bold-small")
  54.   click_label_gh2 = guiCreateLabel(150, 152, 99, 19, "", false, click_tab_sta)
  55.   guiSetFont(click_label_gh2, "default-bold-small")
  56.   click_label_bo1 = guiCreateLabel(15, 172, 99, 19, "Bonusobjekte:", false, click_tab_sta)
  57.   guiSetFont(click_label_bo1, "default-bold-small")
  58.   click_label_bo2 = guiCreateLabel(150, 172, 99, 19, "", false, click_tab_sta)
  59.   guiSetFont(click_label_bo2, "default-bold-small")
  60.   click_button_close2 = guiCreateButton(465, 7, 24, 22, "X", false, click_tab_sta)
  61.   guiSetFont(click_button_close2, "default-bold-small")
  62.   click_tab_lic = guiCreateTab("Lizenzen", click_tabpanel)
  63.   click_grid_lic = guiCreateGridList(8, 6, 355, 190, false, click_tab_lic)
  64.   guiGridListSetSelectionMode(click_grid_lic, 2)
  65.   grid_lic_schein = guiGridListAddColumn(click_grid_lic, "Lizenz", 0.5)
  66.   grid_lic_besitz = guiGridListAddColumn(click_grid_lic, "in Besitz", 0.4)
  67.   click_button_close3 = guiCreateButton(465, 7, 24, 22, "X", false, click_tab_lic)
  68.   guiSetFont(click_button_close3, "default-bold-small")
  69.   click_tab_veh = guiCreateTab("Fahrzeuge", click_tabpanel)
  70.   click_grid_veh = guiCreateGridList(8, 6, 450, 190, false, click_tab_veh)
  71.   guiGridListSetSelectionMode(click_grid_veh, 2)
  72.   grid_veh_slot = guiGridListAddColumn(click_grid_veh, "Slot", 0.1)
  73.   grid_veh_veh = guiGridListAddColumn(click_grid_veh, "Fahrzeug", 0.23)
  74.   grid_veh_zustand = guiGridListAddColumn(click_grid_veh, "Zustand", 0.3)
  75.   grid_veh_ort = guiGridListAddColumn(click_grid_veh, "Standort", 0.33)
  76.   click_button_close4 = guiCreateButton(465, 7, 24, 22, "X", false, click_tab_veh)
  77.   guiSetFont(click_button_close4, "default-bold-small")
  78.   guiSetVisible(click_window, false)
  79.   drogenpic = guiCreateStaticImage(0, 0, 1920, 1080, "clicksys/drogen.png", false)
  80.   guiSetVisible(drogenpic, false)
  81. end
  82. )
  83. openClickWindow1 = function()
  84.   -- upvalues: lp
  85.   local vis = guiGetVisible(click_window)
  86.   if vis == false and getElementData(lp, "windowvis") == false then
  87.     guiSetVisible(click_window, true)
  88.     showCursor(true)
  89.     setInventar()
  90.     setStatistik()
  91.     setLicenses()
  92.     guiGridListClear(click_grid_veh)
  93.     triggerServerEvent("setVehiclesServer", lp, lp)
  94.     setElementData(lp, "windowvis", true)
  95.   end
  96. end
  97.  
  98. addEvent("openClickWindow1", true)
  99. addEventHandler("openClickWindow1", getRootElement(), openClickWindow1)
  100. openClickWindow2 = function()
  101.   -- upvalues: lp
  102.   local vis = guiGetVisible(click_window)
  103.   if vis == false then
  104.     guiSetVisible(click_window, true)
  105.     showCursor(true)
  106.     setInventar()
  107.     setStatistik()
  108.     setLicenses()
  109.     guiGridListClear(click_grid_veh)
  110.     triggerServerEvent("setVehiclesServer", lp, lp)
  111.     setElementData(lp, "windowvis", true)
  112.   elseif vis == true then
  113.     guiSetVisible(click_window, false)
  114.     showCursor(false)
  115.     setElementData(lp, "windowvis", false)
  116.   end
  117. end
  118.  
  119. bindKey("i", "down", openClickWindow2)
  120. setInventar = function()
  121.   -- upvalues: lp
  122.   guiGridListClear(click_grid_inv)
  123.   local pro = getElementData(lp, "Inventar")
  124.   local pro1 = tonumber(gettok(pro, 1, string.byte("|")))
  125.   local pro2 = tonumber(gettok(pro, 2, string.byte("|")))
  126.   local pro3 = tonumber(gettok(pro, 3, string.byte("|")))
  127.   local pro4 = tonumber(gettok(pro, 4, string.byte("|")))
  128.   local pro5 = tonumber(gettok(pro, 5, string.byte("|")))
  129.   local pro6 = tonumber(gettok(pro, 6, string.byte("|")))
  130.   local pro7 = tonumber(gettok(pro, 7, string.byte("|")))
  131.   local pro8 = tonumber(gettok(pro, 8, string.byte("|")))
  132.   local pro9 = tonumber(gettok(pro, 9, string.byte("|")))
  133.   local pro10 = tonumber(gettok(pro, 10, string.byte("|")))
  134.   local pro11 = tonumber(gettok(pro, 11, string.byte("|")))
  135.   local pro12 = tonumber(gettok(pro, 12, string.byte("|")))
  136.   if pro1 >= 1 then
  137.     local row = guiGridListAddRow(click_grid_inv)
  138.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Blumen", false, false)
  139.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro1, false, false)
  140.   end
  141.   if pro2 >= 1 then
  142.     local row = guiGridListAddRow(click_grid_inv)
  143.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Fotoapparat", false, false)
  144.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro2, false, false)
  145.   end
  146.   if pro3 >= 1 then
  147.     local row = guiGridListAddRow(click_grid_inv)
  148.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Benzinkanister", false, false)
  149.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro3, false, false)
  150.   end
  151.   if pro4 >= 1 then
  152.     local row = guiGridListAddRow(click_grid_inv)
  153.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Rubbellos", false, false)
  154.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro4, false, false)
  155.   end
  156.   if pro5 >= 1 then
  157.     local row = guiGridListAddRow(click_grid_inv)
  158.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Snack", false, false)
  159.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro5, false, false)
  160.   end
  161.   if pro6 >= 1 then
  162.     local row = guiGridListAddRow(click_grid_inv)
  163.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Fertigessen", false, false)
  164.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro6, false, false)
  165.   end
  166.   if pro7 >= 1 then
  167.     local row = guiGridListAddRow(click_grid_inv)
  168.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Bier", false, false)
  169.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro7, false, false)
  170.   end
  171.   if pro8 >= 1 then
  172.     local row = guiGridListAddRow(click_grid_inv)
  173.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Zigaretten", false, false)
  174.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro8, false, false)
  175.   end
  176.   if pro9 >= 1 then
  177.     local row = guiGridListAddRow(click_grid_inv)
  178.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Nachtsichtgerät", false, false)
  179.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro9, false, false)
  180.   end
  181.   if pro10 >= 1 then
  182.     local row = guiGridListAddRow(click_grid_inv)
  183.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Newspaper", false, false)
  184.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro10, false, false)
  185.   end
  186.   if pro11 >= 1 then
  187.     local row = guiGridListAddRow(click_grid_inv)
  188.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Hanfsamen", false, false)
  189.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro11, false, false)
  190.   end
  191.   if pro12 >= 1 then
  192.     local row = guiGridListAddRow(click_grid_inv)
  193.     guiGridListSetItemText(click_grid_inv, row, grid_inv_item, "Drogen", false, false)
  194.     guiGridListSetItemText(click_grid_inv, row, grid_inv_anzahl, pro12, false, false)
  195.   end
  196. end
  197.  
  198. invClick = function()
  199.   if click_grid_inv then
  200.     local rowindex, columnindex = guiGridListGetSelectedItem(click_grid_inv)
  201.     local selectedItem = guiGridListGetItemText(click_grid_inv, rowindex, grid_inv_item)
  202.     if selectedItem == "Blumen" then
  203.       sItem = "blumen"
  204.     end
  205.   elseif selectedItem == "Fotoapparat" then
  206.     sItem = "foto"
  207.   elseif selectedItem == "Benzinkanister" then
  208.     sItem = "bcanister"
  209.   elseif selectedItem == "Rubbellos" then
  210.     sItem = "rubbel"
  211.   elseif selectedItem == "Snack" then
  212.     sItem = "snack"
  213.   elseif selectedItem == "Fertigessen" then
  214.     sItem = "fessen"
  215.   elseif selectedItem == "Bier" then
  216.     sItem = "bier"
  217.   elseif selectedItem == "Zigaretten" then
  218.     sItem = "zigs"
  219.   elseif selectedItem == "Nachtsichtgerät" then
  220.     sItem = "night"
  221.   elseif selectedItem == "Newspaper" then
  222.     sItem = "newspaper"
  223.   elseif selectedItem == "Hanfsamen" then
  224.     sItem = "samen"
  225.   elseif selectedItem == "Drogen" then
  226.     sItem = "drogen"
  227.   else
  228.     sItem = "none"
  229.   end
  230. end
  231.  
  232. addEventHandler("onClientGUIClick", getRootElement(), invClick)
  233. useObject = function(state)
  234.   -- upvalues: lp
  235.   if state == "left" and source == click_button_benutzen then
  236.     local pro = getElementData(lp, "Inventar")
  237.     local pro1 = tonumber(gettok(pro, 1, string.byte("|")))
  238.     local pro2 = tonumber(gettok(pro, 2, string.byte("|")))
  239.     local pro3 = tonumber(gettok(pro, 3, string.byte("|")))
  240.     local pro4 = tonumber(gettok(pro, 4, string.byte("|")))
  241.     local pro5 = tonumber(gettok(pro, 5, string.byte("|")))
  242.     local pro6 = tonumber(gettok(pro, 6, string.byte("|")))
  243.     local pro7 = tonumber(gettok(pro, 7, string.byte("|")))
  244.     local pro8 = tonumber(gettok(pro, 8, string.byte("|")))
  245.     local pro9 = tonumber(gettok(pro, 9, string.byte("|")))
  246.     local pro10 = tonumber(gettok(pro, 10, string.byte("|")))
  247.     local pro11 = tonumber(gettok(pro, 11, string.byte("|")))
  248.     local pro12 = tonumber(gettok(pro, 12, string.byte("|")))
  249.     if sItem == "blumen" then
  250.       local value = 1
  251.       triggerServerEvent("inviGiveObject", lp, lp, value)
  252.       local pro1 = pro1 - 1
  253.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  254.     elseif sItem == "foto" then
  255.       local value = 2
  256.       triggerServerEvent("inviGiveObject", lp, lp, value)
  257.       local pro2 = pro2 - 1
  258.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  259.     elseif sItem == "bcanister" then
  260.       if isPedInVehicle(lp) then
  261.         local value = 3
  262.         triggerServerEvent("inviGiveObject", lp, lp, value)
  263.       else
  264.         outputChatBox("Du musst in einem Fahrzeug sitzen!", 255, 48, 48)
  265.       end
  266.     elseif sItem == "rubbel" then
  267.       local value = 4
  268.       triggerServerEvent("inviGiveObject", lp, lp, value)
  269.       local pro4 = pro4 - 1
  270.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  271.     elseif sItem == "snack" then
  272.       local value = 5
  273.       triggerServerEvent("inviGiveObject", lp, lp, value)
  274.       local pro5 = pro5 - 1
  275.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  276.     elseif sItem == "fessen" then
  277.       local value = 6
  278.       triggerServerEvent("inviGiveObject", lp, lp, value)
  279.       local pro6 = pro6 - 1
  280.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  281.     elseif sItem == "bier" then
  282.       local value = 7
  283.       triggerServerEvent("inviGiveObject", lp, lp, value)
  284.       local pro7 = pro7 - 1
  285.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  286.     elseif sItem == "zigs" then
  287.       outputChatBox("Bitte verwende /smoke!", 255, 48, 48)
  288.     elseif sItem == "night" then
  289.       local value = 9
  290.       triggerServerEvent("inviGiveObject", lp, lp, value)
  291.       local pro9 = pro9 - 1
  292.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  293.     elseif sItem == "newspaper" then
  294.       outputChatBox("Bitte verwende /newspaper!", 255, 48, 48)
  295.     elseif sItem == "samen" then
  296.       outputChatBox("Bitte verwende /grow weed!", 255, 48, 48)
  297.     elseif sItem == "drogen" then
  298.       local value = 12
  299.       triggerServerEvent("inviGiveObject", lp, lp, value)
  300.       local pro12 = pro12 - 1
  301.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  302.     end
  303.     setInventar()
  304.   end
  305. end
  306.  
  307. addEventHandler("onClientGUIClick", getRootElement(), useObject)
  308. trashObject = function(state)
  309.   -- upvalues: lp
  310.   if state == "left" and source == click_button_wegwerfen then
  311.     local pro = getElementData(lp, "Inventar")
  312.     local pro1 = tonumber(gettok(pro, 1, string.byte("|")))
  313.     local pro2 = tonumber(gettok(pro, 2, string.byte("|")))
  314.     local pro3 = tonumber(gettok(pro, 3, string.byte("|")))
  315.     local pro4 = tonumber(gettok(pro, 4, string.byte("|")))
  316.     local pro5 = tonumber(gettok(pro, 5, string.byte("|")))
  317.     local pro6 = tonumber(gettok(pro, 6, string.byte("|")))
  318.     local pro7 = tonumber(gettok(pro, 7, string.byte("|")))
  319.     local pro8 = tonumber(gettok(pro, 8, string.byte("|")))
  320.     local pro9 = tonumber(gettok(pro, 9, string.byte("|")))
  321.     local pro10 = tonumber(gettok(pro, 10, string.byte("|")))
  322.     local pro11 = tonumber(gettok(pro, 11, string.byte("|")))
  323.     local pro12 = tonumber(gettok(pro, 12, string.byte("|")))
  324.     local geld = getElementData(lp, "Geld")
  325.     if sItem == "blumen" then
  326.       setElementData(lp, "Inventar", "0|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  327.     elseif sItem == "foto" then
  328.       setElementData(lp, "Inventar", "" .. pro1 .. "|0|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  329.     elseif sItem == "bcanister" then
  330.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|0|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  331.     elseif sItem == "rubbel" then
  332.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|0|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  333.     elseif sItem == "snack" then
  334.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|0|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  335.     elseif sItem == "fessen" then
  336.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|0|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  337.     elseif sItem == "bier" then
  338.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|0|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  339.     elseif sItem == "zigs" then
  340.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|0|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  341.     elseif sItem == "night" then
  342.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|0|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  343.     elseif sItem == "newspaper" then
  344.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|0|" .. pro11 .. "|" .. pro12 .. "")
  345.     elseif sItem == "samen" then
  346.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|0|" .. pro12 .. "")
  347.     elseif sItem == "drogen" then
  348.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|0")
  349.     end
  350.     setInventar()
  351.   end
  352. end
  353.  
  354. addEventHandler("onClientGUIClick", getRootElement(), trashObject)
  355. math.round = function(number, decimals, method)
  356.   if not decimals then
  357.     decimals = 0
  358.   end
  359.   local factor = 10 ^ decimals
  360.   if method == "ceil" or method == "floor" then
  361.     return math[method](number * factor) / factor
  362.   else
  363.     return tonumber("%." .. decimals .. "f":format(number))
  364.   end
  365. end
  366.  
  367. setStatistik = function()
  368.   -- upvalues: lp
  369.   guiSetText(click_label_name2, getPlayerName(lp))
  370.   local playingtime = tonumber(getElementData(lp, "Spielzeit"))
  371.   local playingtime1 = math.floor(playingtime / 60) .. ":" .. playingtime - math.floor(playingtime / 60) * 60
  372.   local playingtime2 = playingtime - math.floor(playingtime / 60) * 60
  373.   if playingtime2 > 9 then
  374.     clickPlayingtime = math.floor(playingtime / 60) .. ":" .. playingtime - math.floor(playingtime / 60) * 60
  375.   else
  376.     clickPlayingtime = math.floor(playingtime / 60) .. ":0" .. playingtime - math.floor(playingtime / 60) * 60
  377.   end
  378.   guiSetText(click_label_spielzeit2, clickPlayingtime)
  379.   local money = tonumber(getElementData(lp, "Geld"))
  380.   guiSetText(click_label_geld2, "" .. money .. "$")
  381.   local bmoney = tonumber(getElementData(lp, "Bankgeld"))
  382.   guiSetText(click_label_bankgeld2, "" .. bmoney .. "$")
  383.   local frak = tonumber(getElementData(lp, "Fraktion"))
  384.   if frak == 0 then
  385.     clickFraktion = "-"
  386.   elseif frak == 1 then
  387.     clickFraktion = "Polizei"
  388.   elseif frak == 2 then
  389.     clickFraktion = "Froggys"
  390.   elseif frak == 3 then
  391.     clickFraktion = "Army"
  392.   elseif frak == 4 then
  393.     clickFraktion = "FBI"
  394.   elseif frak == 5 then
  395.     clickFraktion = "Taxi"
  396.   elseif frak == 6 then
  397.     clickFraktion = "Newsreporter"
  398.   elseif frak == 7 then
  399.     clickFraktion = "Medic"
  400.   elseif frak == 8 then
  401.     clickFraktion = "Grove Street"
  402.   elseif frak == 9 then
  403.     clickFraktion = "Ballas"
  404.   elseif frak == 10 then
  405.     clickFraktion = "Mafia"
  406.   end
  407.   guiSetText(click_label_fraktion2, clickFraktion)
  408.   local rang = tonumber(getElementData(lp, "Rang"))
  409.   if frak == 0 then
  410.     clickRang = "-"
  411.   elseif frak == 1 then
  412.     if rang == 1 then
  413.       clickRang = "Officer"
  414.     elseif rang == 2 then
  415.       clickRang = "Serrgeant"
  416.     elseif rang == 3 then
  417.       clickRang = "Inspector"
  418.     elseif rang == 4 then
  419.       clickRang = "Co-Chief"
  420.     elseif rang == 5 then
  421.       clickRang = "Chief"
  422.     end
  423.   elseif frak == 2 then
  424.     if rang == 1 then
  425.       clickRang = "Kaulquappe"
  426.     elseif rang == 2 then
  427.       clickRang = "Babyfrosch"
  428.     elseif rang == 3 then
  429.       clickRang = "Frosch"
  430.     elseif rang == 4 then
  431.       clickRang = "Co-Froschkönig"
  432.     elseif rang == 5 then
  433.       clickRang = "Froschkönig"
  434.     end
  435.   elseif frak == 3 then
  436.     if rang == 1 then
  437.       clickRang = "Soldat"
  438.     elseif rang == 2 then
  439.       clickRang = "Lieutenant"
  440.     elseif rang == 3 then
  441.       clickRang = "Hauptmann"
  442.     elseif rang == 4 then
  443.       clickRang = "Colonel"
  444.     elseif rang == 5 then
  445.       clickRang = "General"
  446.     end
  447.   elseif frak == 4 then
  448.     if rang == 1 then
  449.       clickRang = "Agent"
  450.     elseif rang == 2 then
  451.       clickRang = "Special Agent"
  452.     elseif rang == 3 then
  453.       clickRang = "Senior Agent"
  454.     elseif rang == 4 then
  455.       clickRang = "Assistant Director"
  456.     elseif rang == 5 then
  457.       clickRang = "Director"
  458.     end
  459.   elseif frak == 5 then
  460.     if rang == 1 then
  461.       clickRang = "Freiarbeiter"
  462.     elseif rang == 2 then
  463.       clickRang = "Angestellter"
  464.     elseif rang == 3 then
  465.       clickRang = "Abteilungsleiter"
  466.     elseif rang == 4 then
  467.       clickRang = "Co-Direktor"
  468.     elseif rang == 5 then
  469.       clickRang = "Direktor"
  470.     end
  471.   elseif frak == 6 then
  472.     if rang == 1 then
  473.       clickRang = "Anzeiger"
  474.     elseif rang == 2 then
  475.       clickRang = "Reporter"
  476.     elseif rang == 3 then
  477.       clickRang = "Chefreporter"
  478.     elseif rang == 4 then
  479.       clickRang = "Redakteur"
  480.     elseif rang == 5 then
  481.       clickRang = "Chefredakteur"
  482.     end
  483.   elseif frak == 7 then
  484.     if rang == 1 then
  485.       clickRang = "Krankenhelfer"
  486.     elseif rang == 2 then
  487.       clickRang = "Sanitäter"
  488.     elseif rang == 3 then
  489.       clickRang = "Arzthelfer"
  490.     elseif rang == 4 then
  491.       clickRang = "Notarzt"
  492.     elseif rang == 5 then
  493.       clickRang = "Chefarzt"
  494.     end
  495.   elseif frak == 8 then
  496.     if rang == 1 then
  497.       clickRang = "Wannabe"
  498.     elseif rang == 2 then
  499.       clickRang = "Ghettofreak"
  500.     elseif rang == 3 then
  501.       clickRang = "Dealer"
  502.     elseif rang == 4 then
  503.       clickRang = "Big Smoke"
  504.     elseif rang == 5 then
  505.       clickRang = "CJ"
  506.     end
  507.   elseif frak == 9 then
  508.     if rang == 1 then
  509.       clickRang = "Anwärter"
  510.     elseif rang == 2 then
  511.       clickRang = "Wachhund"
  512.     elseif rang == 3 then
  513.       clickRang = "Dealer"
  514.     elseif rang == 4 then
  515.       clickRang = "Geldeintreiber"
  516.     elseif rang == 5 then
  517.       clickRang = "Kane"
  518.     end
  519.   elseif frak == 10 then
  520.     if rang == 1 then
  521.       clickRang = "Wachhund"
  522.     end
  523.   elseif rang == 2 then
  524.     clickRang = "Repräsentant"
  525.   elseif rang == 3 then
  526.     clickRang = "Erpresser"
  527.   elseif rang == 4 then
  528.     clickRang = "Underboss"
  529.   elseif rang == 5 then
  530.     clickRang = "Pate"
  531.   end
  532.   local job = (tonumber(getElementData(lp, "Job")))
  533.   local jobname = nil
  534.   if job == 0 then
  535.     jobname = "Arbeitslos"
  536.   elseif job == 1 then
  537.     jobname = "Busfahrer"
  538.   elseif job == 2 then
  539.     jobname = "Pilot"
  540.   elseif job == 3 then
  541.     jobname = "Gepäcktransporter"
  542.   elseif job == 4 then
  543.     jobname = "Müllmann"
  544.   elseif job == 5 then
  545.     jobname = "LKW-Fahrer"
  546.   elseif job == 6 then
  547.     jobname = "Mechaniker"
  548.   elseif job == 7 then
  549.     jobname = "Waffendealer"
  550.   elseif job == 8 then
  551.     jobname = "Anwalt"
  552.   elseif job == 9 then
  553.     jobname = "Hotdogverkäufer"
  554.   end
  555.   guiSetText(click_label_rang2, clickRang)
  556.   guiSetText(click_label_job2, jobname)
  557.   local gh = tonumber(getElementData(lp, "Telefongh"))
  558.   local gh = math.round(gh, 2)
  559.   if gh == 0 then
  560.     guiSetText(click_label_gh2, "0.00$")
  561.   else
  562.     guiSetText(click_label_gh2, "" .. gh .. "$")
  563.   end
  564.   guiSetText(click_label_bo2, tonumber(getElementData(lp, "Bonusobjekte")))
  565. end
  566.  
  567. setLicenses = function()
  568.   -- upvalues: lp
  569.   guiGridListClear(click_grid_lic)
  570.   local lic = getElementData(lp, "Licenses")
  571.   local lic1 = tonumber(gettok(lic, 1, string.byte("|")))
  572.   local lic2 = tonumber(gettok(lic, 2, string.byte("|")))
  573.   local lic3 = tonumber(gettok(lic, 3, string.byte("|")))
  574.   local lic4 = tonumber(gettok(lic, 4, string.byte("|")))
  575.   local lic5 = tonumber(gettok(lic, 5, string.byte("|")))
  576.   local lic6 = tonumber(gettok(lic, 6, string.byte("|")))
  577.   local lic7 = tonumber(gettok(lic, 7, string.byte("|")))
  578.   local lic8 = tonumber(gettok(lic, 8, string.byte("|")))
  579.   local lic9 = tonumber(gettok(lic, 9, string.byte("|")))
  580.   local row = guiGridListAddRow(click_grid_lic)
  581.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Führerschein", false, false)
  582.   if lic1 == 1 then
  583.     fix = "Ja"
  584.   else
  585.     fix = "Nein"
  586.   end
  587.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  588.   local row = guiGridListAddRow(click_grid_lic)
  589.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Motorradschein", false, false)
  590.   if lic2 == 1 then
  591.     fix = "Ja"
  592.   else
  593.     fix = "Nein"
  594.   end
  595.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  596.   local row = guiGridListAddRow(click_grid_lic)
  597.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "LKW-Schein", false, false)
  598.   if lic3 == 1 then
  599.     fix = "Ja"
  600.   else
  601.     fix = "Nein"
  602.   end
  603.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  604.   local row = guiGridListAddRow(click_grid_lic)
  605.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Flugschein", false, false)
  606.   if lic4 == 1 then
  607.     fix = "Ja"
  608.   else
  609.     fix = "Nein"
  610.   end
  611.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  612.   local row = guiGridListAddRow(click_grid_lic)
  613.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Helikopterschein", false, false)
  614.   if lic5 == 1 then
  615.     fix = "Ja"
  616.   else
  617.     fix = "Nein"
  618.   end
  619.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  620.   local row = guiGridListAddRow(click_grid_lic)
  621.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Bootschein", false, false)
  622.   if lic6 == 1 then
  623.     fix = "Ja"
  624.   else
  625.     fix = "Nein"
  626.   end
  627.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  628.   local row = guiGridListAddRow(click_grid_lic)
  629.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Waffenschein", false, false)
  630.   if lic7 == 1 then
  631.     fix = "Ja"
  632.   else
  633.     fix = "Nein"
  634.   end
  635.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  636.   local row = guiGridListAddRow(click_grid_lic)
  637.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Reisepass", false, false)
  638.   if lic8 == 1 then
  639.     fix = "Ja"
  640.   else
  641.     fix = "Nein"
  642.   end
  643.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  644.   local row = guiGridListAddRow(click_grid_lic)
  645.   guiGridListSetItemText(click_grid_lic, row, grid_lic_schein, "Personalausweis", false, false)
  646.   if lic9 == 1 then
  647.     fix = "Ja"
  648.   else
  649.     fix = "Nein"
  650.   end
  651.   guiGridListSetItemText(click_grid_lic, row, grid_lic_besitz, fix, false, false)
  652. end
  653.  
  654. setVehicles = function(source, i, name, status, zone)
  655.   -- upvalues: lp
  656.   if lp == getLocalPlayer() then
  657.     local row = guiGridListAddRow(click_grid_veh)
  658.     guiGridListSetItemText(click_grid_veh, row, grid_veh_slot, i, false, false)
  659.     guiGridListSetItemText(click_grid_veh, row, grid_veh_veh, name, true, false)
  660.     guiGridListSetItemText(click_grid_veh, row, grid_veh_zustand, status, false, false)
  661.     guiGridListSetItemText(click_grid_veh, row, grid_veh_ort, zone, false, false)
  662.   end
  663. end
  664.  
  665. addEvent("setVehicles", true)
  666. addEventHandler("setVehicles", getRootElement(), setVehicles)
  667. closeClickWindow1 = function(state)
  668.   -- upvalues: lp
  669.   if state == "left" and source == click_button_close1 then
  670.     guiSetVisible(click_window, false)
  671.     setElementData(lp, "windowvis", false)
  672.     showCursor(false)
  673.   end
  674. end
  675.  
  676. addEventHandler("onClientGUIClick", getRootElement(), closeClickWindow1)
  677. closeClickWindow2 = function(state)
  678.   -- upvalues: lp
  679.   if state == "left" and source == click_button_close2 then
  680.     guiSetVisible(click_window, false)
  681.     showCursor(false)
  682.     setElementData(lp, "windowvis", false)
  683.   end
  684. end
  685.  
  686. addEventHandler("onClientGUIClick", getRootElement(), closeClickWindow2)
  687. closeClickWindow3 = function(state)
  688.   -- upvalues: lp
  689.   if state == "left" and source == click_button_close3 then
  690.     guiSetVisible(click_window, false)
  691.     showCursor(false)
  692.     setElementData(lp, "windowvis", false)
  693.   end
  694. end
  695.  
  696. addEventHandler("onClientGUIClick", getRootElement(), closeClickWindow3)
  697. closeClickWindow4 = function(state)
  698.   -- upvalues: lp
  699.   if state == "left" and source == click_button_close4 then
  700.     guiSetVisible(click_window, false)
  701.     showCursor(false)
  702.     setElementData(lp, "windowvis", false)
  703.   end
  704. end
  705.  
  706. addEventHandler("onClientGUIClick", getRootElement(), closeClickWindow4)
  707. newspaper = {
  708. window = {},
  709. staticimage = {},
  710. label = {},
  711. button = {}}
  712. addEventHandler("onClientResourceStart", resourceRoot, function()
  713.   -- upvalues: x , y
  714.   newspaper.window[1] = guiCreateWindow(x / 2 - 282, y / 2 - 260, 564, 520, "", false)
  715.   guiWindowSetMovable(newspaper.window[1], false)
  716.   guiWindowSetSizable(newspaper.window[1], false)
  717.   newspaper.label[1] = guiCreateLabel(16, 189, 527, 90, "", false, newspaper.window[1])
  718.   guiLabelSetVerticalAlign(newspaper.label[1], "top")
  719.   guiLabelSetHorizontalAlign(newspaper.label[1], "center", true)
  720.   guiSetFont(newspaper.label[1], "clear-normal")
  721.   newspaper.label[2] = guiCreateLabel(16, 289, 527, 90, "", false, newspaper.window[1])
  722.   guiLabelSetVerticalAlign(newspaper.label[2], "top")
  723.   guiLabelSetHorizontalAlign(newspaper.label[2], "center", true)
  724.   guiSetFont(newspaper.label[2], "clear-normal")
  725.   newspaper.label[3] = guiCreateLabel(16, 389, 527, 90, "", false, newspaper.window[1])
  726.   guiLabelSetVerticalAlign(newspaper.label[3], "top")
  727.   guiLabelSetHorizontalAlign(newspaper.label[3], "center", true)
  728.   guiSetFont(newspaper.label[3], "clear-normal")
  729.   newspaper.staticimage[1] = guiCreateStaticImage(7, 20, 525, 180, "clicksys/news.png", false, newspaper.window[1])
  730.   guiSetVisible(newspaper.window[1], false)
  731.   newspaper.button[1] = guiCreateButton(528, 26, 22, 22, "X", false, newspaper.window[1])
  732.   guiSetFont(newspaper.button[1], "default-bold-small")
  733.   guiBringToFront(newspaper.button[1])
  734. end
  735. )
  736. openNewspaper = function()
  737.   -- upvalues: lp
  738.   if tonumber(getElementData(lp, "Fraktion")) ~= 6 then
  739.     local pro = getElementData(lp, "Inventar")
  740.     local pro1 = tonumber(gettok(pro, 1, string.byte("|")))
  741.     local pro2 = tonumber(gettok(pro, 2, string.byte("|")))
  742.     local pro3 = tonumber(gettok(pro, 3, string.byte("|")))
  743.     local pro4 = tonumber(gettok(pro, 4, string.byte("|")))
  744.     local pro5 = tonumber(gettok(pro, 5, string.byte("|")))
  745.     local pro6 = tonumber(gettok(pro, 6, string.byte("|")))
  746.     local pro7 = tonumber(gettok(pro, 7, string.byte("|")))
  747.     local pro8 = tonumber(gettok(pro, 8, string.byte("|")))
  748.     local pro9 = tonumber(gettok(pro, 9, string.byte("|")))
  749.     local pro10 = tonumber(gettok(pro, 10, string.byte("|")))
  750.     local pro11 = tonumber(gettok(pro, 11, string.byte("|")))
  751.     local pro12 = tonumber(gettok(pro, 12, string.byte("|")))
  752.     if pro10 >= 1 then
  753.       local pro10 = pro10 - 1
  754.       setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
  755.       triggerServerEvent("openNewspaperServerside", lp)
  756.     else
  757.       outputChatBox("Du hast keine Zeitung!", 255, 48, 48)
  758.     end
  759.   else
  760.     triggerServerEvent("openNewspaperServerside", lp)
  761.   end
  762. end
  763.  
  764. addCommandHandler("newspaper", openNewspaper)
  765. openNewspaperClientside = function(text)
  766.   -- upvalues: lp
  767.   guiSetVisible(newspaper.window[1], true)
  768.   setElementData(lp, "windowvis", true)
  769.   guiSetInputEnabled(true)
  770.   showCursor(true)
  771.   guiSetText(newspaper.label[1], "")
  772.   guiSetText(newspaper.label[2], "")
  773.   guiSetText(newspaper.label[3], "")
  774.   if text ~= nil then
  775.     local textTable = split(text, "|")
  776.     local i = 1
  777.     for k,v in ipairs(textTable) do
  778.       if i <= 3 then
  779.         guiSetText(newspaper.label[i], v)
  780.         i = i + 1
  781.       end
  782.     end
  783.   end
  784. end
  785.  
  786. addEvent("openNewspaperClientside", true)
  787. addEventHandler("openNewspaperClientside", getRootElement(), openNewspaperClientside)
  788. closeNewspaper = function(state)
  789.   -- upvalues: lp
  790.   if state == "left" and source == newspaper.button[1] then
  791.     guiSetVisible(newspaper.window[1], false)
  792.     setElementData(lp, "windowvis", false)
  793.     guiSetInputEnabled(false)
  794.     showCursor(false)
  795.   end
  796. end
  797.  
  798. addEventHandler("onClientGUIClick", getRootElement(), closeNewspaper)
  799. createDrogenPic = function()
  800.   guiSetVisible(drogenpic, true)
  801.   guiMoveToBack(drogenpic)
  802.   if isTimer(tookDrogenTimer1) or isTimer(tookDrogenTimer2) or isTimer(tookDrogenTimer3) or isTimer(tookDrogenTimer4) or isTimer(tookDrogenTimer5) then
  803.     return
  804.   end
  805.   guiSetAlpha(drogenpic, 0)
  806.   tookDrogenTimer1 = setTimer(function()
  807.     tookDrogenTimer2 = setTimer(function()
  808.       local alpha = guiGetAlpha(drogenpic)
  809.       guiSetAlpha(drogenpic, alpha + 0.005)
  810.     end, 50, 150)
  811.   end, 8000, 1)
  812.   tookDrogenTimer3 = setTimer(function()
  813.     tookDrogenTimer4 = setTimer(function()
  814.       local alpha = guiGetAlpha(drogenpic)
  815.       guiSetAlpha(drogenpic, alpha - 0.005)
  816.     end, 50, 150)
  817.   end, 70000, 1)
  818.   tookDrogenTimer5 = setTimer(function()
  819.     guiSetVisible(drogenpic, false)
  820.   end, 85500, 1)
  821. end
  822.  
  823. addEvent("createDrogenPic", true)
  824. addEventHandler("createDrogenPic", getRootElement(), createDrogenPic)
  825. onDrogenPicClick = function()
  826.   if source == drogenpic then
  827.     guiMoveToBack(drogenpic)
  828.   end
  829. end
  830.  
  831. addEventHandler("onClientGUIClick", getRootElement(), onDrogenPicClick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement