Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Decompiled using luadec 2.1 UNICODE by sztupy (http://winmo.sztupy.hu) and viruscamp
- -- Command line was: C:\Users\Noneatme\Documents\luadec\playerclick_c.lua
- local lp = getLocalPlayer()
- local x, y = guiGetScreenSize()
- playerwindow = {
- button = {},
- window = {}}
- addEventHandler("onClientResourceStart", resourceRoot, function()
- -- upvalues: x , y
- playerwindow.window[1] = guiCreateWindow(x / 2 - 423, y / 12 - 52, 846, 104, "", false)
- guiWindowSetSizable(playerwindow.window[1], false)
- guiWindowSetMovable(playerwindow.window[1], false)
- playerwindow.button[1] = guiCreateButton(10, 28, 157, 64, "Statistik", false, playerwindow.window[1])
- guiSetFont(playerwindow.button[1], "clear-normal")
- guiSetProperty(playerwindow.button[1], "NormalTextColour", "FFAAAAAA")
- playerwindow.button[2] = guiCreateButton(177, 28, 157, 64, "Items und Geld", false, playerwindow.window[1])
- guiSetFont(playerwindow.button[2], "clear-normal")
- guiSetProperty(playerwindow.button[2], "NormalTextColour", "FFAAAAAA")
- playerwindow.button[3] = guiCreateButton(344, 28, 157, 64, "Staatsfraktionen", false, playerwindow.window[1])
- guiSetFont(playerwindow.button[3], "clear-normal")
- guiSetProperty(playerwindow.button[3], "NormalTextColour", "FFAAAAAA")
- playerwindow.button[4] = guiCreateButton(511, 28, 157, 64, "Lizenzen", false, playerwindow.window[1])
- guiSetFont(playerwindow.button[4], "clear-normal")
- guiSetProperty(playerwindow.button[4], "NormalTextColour", "FFAAAAAA")
- guiSetVisible(playerwindow.window[1], false)
- playerwindow.button[5] = guiCreateButton(678, 28, 157, 64, "Schließen", false, playerwindow.window[1])
- guiSetFont(playerwindow.button[5], "clear-normal")
- guiSetProperty(playerwindow.button[5], "NormalTextColour", "FFAAAAAA")
- guiSetVisible(playerwindow.window[1], false)
- end
- )
- statistikwindow = {
- button = {},
- window = {},
- label = {}}
- addEventHandler("onClientResourceStart", resourceRoot, function()
- -- upvalues: x , y
- statistikwindow.window[1] = guiCreateWindow(x / 2 - 196.5, y / 3 - 150.5, 393, 301, "", false)
- guiWindowSetSizable(statistikwindow.window[1], false)
- guiWindowSetMovable(statistikwindow.window[1], false)
- statistikwindow.label[1] = guiCreateLabel(24, 41, 124, 21, "Name:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[1], "clear-normal")
- statistikwindow.label[2] = guiCreateLabel(24, 134, 124, 21, "Fraktion:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[2], "clear-normal")
- statistikwindow.label[3] = guiCreateLabel(24, 103, 124, 21, "Adminlevel:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[3], "clear-normal")
- statistikwindow.label[4] = guiCreateLabel(24, 72, 124, 21, "Spielzeit:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[4], "clear-normal")
- statistikwindow.label[5] = guiCreateLabel(24, 165, 124, 21, "Fraktionsrang:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[5], "clear-normal")
- statistikwindow.label[6] = guiCreateLabel(24, 196, 124, 21, "Job:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[6], "clear-normal")
- statistikwindow.label[7] = guiCreateLabel(24, 227, 124, 21, "Telefonnummer:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[7], "clear-normal")
- statistikwindow.label[8] = guiCreateLabel(24, 258, 124, 21, "Premium:", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[8], "clear-normal")
- statistikwindow.label[9] = guiCreateLabel(167, 41, 124, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[9], "clear-normal")
- statistikwindow.label[10] = guiCreateLabel(167, 196, 150, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[10], "clear-normal")
- statistikwindow.label[11] = guiCreateLabel(167, 165, 124, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[11], "clear-normal")
- statistikwindow.label[12] = guiCreateLabel(167, 134, 124, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[12], "clear-normal")
- statistikwindow.label[13] = guiCreateLabel(167, 103, 124, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[13], "clear-normal")
- statistikwindow.label[14] = guiCreateLabel(167, 72, 124, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[14], "clear-normal")
- statistikwindow.label[15] = guiCreateLabel(167, 258, 124, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[15], "clear-normal")
- statistikwindow.label[16] = guiCreateLabel(167, 227, 124, 21, "", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.label[16], "clear-normal")
- statistikwindow.button[1] = guiCreateButton(348, 27, 34, 34, "X", false, statistikwindow.window[1])
- guiSetFont(statistikwindow.button[1], "clear-normal")
- guiSetProperty(statistikwindow.button[1], "NormalTextColour", "FFAAAAAA")
- guiSetVisible(statistikwindow.window[1], false)
- end
- )
- itemwindow = {
- edit = {},
- button = {},
- window = {},
- label = {},
- gridlist = {},
- row = {}}
- addEventHandler("onClientResourceStart", resourceRoot, function()
- -- upvalues: x , y
- itemwindow.window[1] = guiCreateWindow(x / 2 - 261.5, y / 3 - 141, 523, 282, "", false)
- guiWindowSetSizable(itemwindow.window[1], false)
- guiWindowSetMovable(itemwindow.window[1], false)
- itemwindow.gridlist[1] = guiCreateGridList(10, 65, 329, 207, false, itemwindow.window[1])
- itemwindow.row[1] = guiGridListAddColumn(itemwindow.gridlist[1], "Item", 0.6)
- itemwindow.row[2] = guiGridListAddColumn(itemwindow.gridlist[1], "Anzahl", 0.3)
- itemwindow.button[1] = guiCreateButton(480, 27, 34, 34, "X", false, itemwindow.window[1])
- guiSetFont(itemwindow.button[1], "clear-normal")
- guiSetProperty(itemwindow.button[1], "NormalTextColour", "FFAAAAAA")
- itemwindow.button[2] = guiCreateButton(353, 242, 154, 30, "Items schenken", false, itemwindow.window[1])
- guiSetFont(itemwindow.button[2], "clear-normal")
- guiSetProperty(itemwindow.button[2], "NormalTextColour", "FFAAAAAA")
- itemwindow.edit[1] = guiCreateEdit(352, 204, 155, 28, "", false, itemwindow.window[1])
- itemwindow.label[1] = guiCreateLabel(353, 185, 101, 18, "Anzahl:", false, itemwindow.window[1])
- guiSetFont(itemwindow.label[1], "clear-normal")
- itemwindow.label[2] = guiCreateLabel(353, 65, 101, 18, "Betrag:", false, itemwindow.window[1])
- guiSetFont(itemwindow.label[2], "clear-normal")
- itemwindow.edit[2] = guiCreateEdit(353, 83, 155, 28, "", false, itemwindow.window[1])
- itemwindow.button[3] = guiCreateButton(353, 121, 154, 30, "Geld schenken", false, itemwindow.window[1])
- guiSetFont(itemwindow.button[3], "clear-normal")
- guiSetProperty(itemwindow.button[3], "NormalTextColour", "FFAAAAAA")
- guiSetVisible(itemwindow.window[1], false)
- end
- )
- staatwindow = {
- edit = {},
- button = {},
- window = {},
- label = {},
- radiobutton = {}}
- addEventHandler("onClientResourceStart", resourceRoot, function()
- -- upvalues: x , y
- staatwindow.window[1] = guiCreateWindow(x / 2 - 216, y / 2.8 - 178, 432, 356, "", false)
- guiWindowSetSizable(staatwindow.window[1], false)
- guiWindowSetMovable(staatwindow.window[1], false)
- staatwindow.button[1] = guiCreateButton(390, 27, 34, 34, "X", false, staatwindow.window[1])
- guiSetFont(staatwindow.button[1], "clear-normal")
- guiSetProperty(staatwindow.button[1], "NormalTextColour", "FFAAAAAA")
- staatwindow.radiobutton[1] = guiCreateRadioButton(24, 63, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[2] = guiCreateRadioButton(24, 88, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[3] = guiCreateRadioButton(24, 113, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[4] = guiCreateRadioButton(24, 138, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[5] = guiCreateRadioButton(24, 163, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[6] = guiCreateRadioButton(24, 188, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[7] = guiCreateRadioButton(24, 213, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[8] = guiCreateRadioButton(24, 238, 17, 15, "", false, staatwindow.window[1])
- staatwindow.radiobutton[9] = guiCreateRadioButton(24, 263, 17, 15, "", false, staatwindow.window[1])
- staatwindow.label[1] = guiCreateLabel(51, 63, 110, 16, "Führerschein", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[1], "default-bold-small")
- staatwindow.label[2] = guiCreateLabel(51, 162, 110, 16, "Helikopterschein", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[2], "default-bold-small")
- staatwindow.label[3] = guiCreateLabel(51, 137, 110, 16, "Flugschein", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[3], "default-bold-small")
- staatwindow.label[4] = guiCreateLabel(51, 113, 110, 16, "LKW-Schein", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[4], "default-bold-small")
- staatwindow.label[5] = guiCreateLabel(51, 88, 110, 16, "Motorradschein", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[5], "default-bold-small")
- staatwindow.label[6] = guiCreateLabel(51, 212, 110, 16, "Waffenschein", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[6], "default-bold-small")
- staatwindow.label[7] = guiCreateLabel(51, 188, 110, 16, "Bootschein", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[7], "default-bold-small")
- staatwindow.label[8] = guiCreateLabel(51, 238, 110, 16, "Reisepass", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[8], "default-bold-small")
- staatwindow.label[9] = guiCreateLabel(51, 262, 110, 16, "Personalausweis", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[9], "default-bold-small")
- staatwindow.label[10] = guiCreateLabel(27, 290, 48, 18, "Grund:", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[10], "clear-normal")
- staatwindow.edit[1] = guiCreateEdit(75, 288, 103, 20, "", false, staatwindow.window[1])
- staatwindow.button[2] = guiCreateButton(27, 318, 151, 28, "Lizenz abnehmen", false, staatwindow.window[1])
- guiSetProperty(staatwindow.button[2], "NormalTextColour", "FFAAAAAA")
- staatwindow.label[11] = guiCreateLabel(233, 61, 48, 18, "Preis:", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[11], "clear-normal")
- staatwindow.edit[2] = guiCreateEdit(281, 59, 103, 20, "", false, staatwindow.window[1])
- staatwindow.label[12] = guiCreateLabel(233, 86, 48, 18, "Grund:", false, staatwindow.window[1])
- guiSetFont(staatwindow.label[12], "clear-normal")
- staatwindow.edit[3] = guiCreateEdit(281, 84, 103, 20, "", false, staatwindow.window[1])
- staatwindow.button[3] = guiCreateButton(233, 125, 151, 28, "Strafzettel ausstellen", false, staatwindow.window[1])
- guiSetProperty(staatwindow.button[3], "NormalTextColour", "FFAAAAAA")
- staatwindow.button[4] = guiCreateButton(233, 170, 151, 28, "ins Fahrzeug porten", false, staatwindow.window[1])
- guiSetProperty(staatwindow.button[4], "NormalTextColour", "FFAAAAAA")
- staatwindow.button[5] = guiCreateButton(233, 225, 151, 28, "Waffen abnehmen", false, staatwindow.window[1])
- guiSetProperty(staatwindow.button[5], "NormalTextColour", "FFAAAAAA")
- staatwindow.button[6] = guiCreateButton(233, 270, 151, 28, "Drogen abnehmen", false, staatwindow.window[1])
- guiSetProperty(staatwindow.button[6], "NormalTextColour", "FFAAAAAA")
- staatwindow.button[7] = guiCreateButton(233, 315, 151, 28, "Spieler fesseln", false, staatwindow.window[1])
- guiSetProperty(staatwindow.button[7], "NormalTextColour", "FFAAAAAA")
- guiSetVisible(staatwindow.window[1], false)
- end
- )
- licwindow = {
- gridlist = {},
- window = {},
- button = {},
- row = {}}
- addEventHandler("onClientResourceStart", resourceRoot, function()
- -- upvalues: x , y
- licwindow.window[1] = guiCreateWindow(x / 2 - 212.5, y / 3 - 126, 425, 252, "", false)
- guiWindowSetSizable(licwindow.window[1], false)
- guiWindowSetMovable(licwindow.window[1], false)
- licwindow.gridlist[1] = guiCreateGridList(9, 60, 406, 182, false, licwindow.window[1])
- licwindow.row[1] = guiGridListAddColumn(licwindow.gridlist[1], "Lizenz", 0.6)
- licwindow.row[2] = guiGridListAddColumn(licwindow.gridlist[1], "in Besitz", 0.3)
- licwindow.button[1] = guiCreateButton(383, 26, 32, 29, "X", false, licwindow.window[1])
- guiSetFont(licwindow.button[1], "default-bold-small")
- guiSetProperty(licwindow.button[1], "NormalTextColour", "FFAAAAAA")
- guiSetVisible(licwindow.window[1], false)
- end
- )
- openPlayerWindow = function(clickedPlayer)
- -- upvalues: lp
- if getElementData(lp, "windowvis") == false then
- guiSetVisible(playerwindow.window[1], true)
- guiSetInputEnabled(true)
- showCursor(true)
- setElementData(lp, "windowvis", true)
- guiSetEnabled(playerwindow.button[3], false)
- guiSetEnabled(playerwindow.button[4], false)
- if tonumber(getElementData(lp, "Fraktion")) == 1 or tonumber(getElementData(lp, "Fraktion")) == 3 or tonumber(getElementData(lp, "Fraktion")) == 4 then
- guiSetEnabled(playerwindow.button[3], true)
- guiSetEnabled(playerwindow.button[4], true)
- end
- guiSetText(itemwindow.edit[1], "")
- guiSetText(itemwindow.edit[2], "")
- guiSetText(staatwindow.edit[1], "")
- guiSetText(staatwindow.edit[2], "")
- guiSetText(staatwindow.edit[3], "")
- for i = 1, 9 do
- guiRadioButtonSetSelected(staatwindow.radiobutton[i], false)
- end
- if getElementData(clickedPlayer, "tied") == false then
- guiSetText(staatwindow.button[7], "Spieler fesseln")
- else
- guiSetText(staatwindow.button[7], "Spieler entfesseln")
- end
- local frak = (tonumber(getElementData(clickedPlayer, "Fraktion")))
- local clickFraktion = nil
- if frak == 0 then
- clickFraktion = "Zivilist"
- elseif frak == 1 then
- clickFraktion = "Polizei"
- elseif frak == 2 then
- clickFraktion = "Froggys"
- elseif frak == 3 then
- clickFraktion = "Army"
- elseif frak == 4 then
- clickFraktion = "FBI"
- elseif frak == 5 then
- clickFraktion = "Taxi"
- elseif frak == 6 then
- clickFraktion = "Newsreporter"
- elseif frak == 7 then
- clickFraktion = "Medic"
- elseif frak == 8 then
- clickFraktion = "Grove Street"
- elseif frak == 9 then
- clickFraktion = "Ballas"
- elseif frak == 10 then
- clickFraktion = "Mafia"
- end
- local rang = (tonumber(getElementData(clickedPlayer, "Rang")))
- local clickRang = nil
- if frak == 0 then
- clickRang = "-"
- elseif frak == 1 then
- if rang == 1 then
- clickRang = "Officer"
- elseif rang == 2 then
- clickRang = "Serrgeant"
- elseif rang == 3 then
- clickRang = "Inspector"
- elseif rang == 4 then
- clickRang = "Co-Chief"
- elseif rang == 5 then
- clickRang = "Chief"
- end
- elseif frak == 2 then
- if rang == 1 then
- clickRang = "Kaulquappe"
- elseif rang == 2 then
- clickRang = "Babyfrosch"
- elseif rang == 3 then
- clickRang = "Frosch"
- elseif rang == 4 then
- clickRang = "Co-Froschkönig"
- elseif rang == 5 then
- clickRang = "Froschkönig"
- end
- elseif frak == 3 then
- if rang == 1 then
- clickRang = "Soldat"
- elseif rang == 2 then
- clickRang = "Lieutenant"
- elseif rang == 3 then
- clickRang = "Hauptmann"
- elseif rang == 4 then
- clickRang = "Colonel"
- elseif rang == 5 then
- clickRang = "General"
- end
- elseif frak == 4 then
- if rang == 1 then
- clickRang = "Agent"
- elseif rang == 2 then
- clickRang = "Special Agent"
- elseif rang == 3 then
- clickRang = "Senior Agent"
- elseif rang == 4 then
- clickRang = "Assistant Director"
- elseif rang == 5 then
- clickRang = "Director"
- end
- elseif frak == 5 then
- if rang == 1 then
- clickRang = "Freiarbeiter"
- elseif rang == 2 then
- clickRang = "Angestellter"
- elseif rang == 3 then
- clickRang = "Abteilungsleiter"
- elseif rang == 4 then
- clickRang = "Co-Direktor"
- elseif rang == 5 then
- clickRang = "Direktor"
- end
- elseif frak == 6 then
- if rang == 1 then
- clickRang = "Anzeiger"
- elseif rang == 2 then
- clickRang = "Reporter"
- elseif rang == 3 then
- clickRang = "Chefreporter"
- elseif rang == 4 then
- clickRang = "Redakteur"
- elseif rang == 5 then
- clickRang = "Chefredakteur"
- end
- elseif frak == 7 then
- if rang == 1 then
- clickRang = "Krankenhelfer"
- elseif rang == 2 then
- clickRang = "Sanitäter"
- elseif rang == 3 then
- clickRang = "Arzthelfer"
- elseif rang == 4 then
- clickRang = "Notarzt"
- elseif rang == 5 then
- clickRang = "Chefarzt"
- end
- elseif frak == 8 then
- if rang == 1 then
- clickRang = "Wannabe"
- elseif rang == 2 then
- clickRang = "Ghettofreak"
- elseif rang == 3 then
- clickRang = "Dealer"
- elseif rang == 4 then
- clickRang = "Big Smoke"
- elseif rang == 5 then
- clickRang = "CJ"
- end
- elseif frak == 9 then
- if rang == 1 then
- clickRang = "Anwärter"
- elseif rang == 2 then
- clickRang = "Wachhund"
- elseif rang == 3 then
- clickRang = "Dealer"
- elseif rang == 4 then
- clickRang = "Geldeintreiber"
- elseif rang == 5 then
- clickRang = "Kane"
- end
- elseif frak == 10 then
- if rang == 1 then
- clickRang = "Wachhund"
- end
- elseif rang == 2 then
- clickRang = "Repräsentant"
- elseif rang == 3 then
- clickRang = "Erpresser"
- elseif rang == 4 then
- clickRang = "Underboss"
- elseif rang == 5 then
- clickRang = "Pate"
- end
- local playingtime = tonumber(getElementData(clickedPlayer, "Spielzeit"))
- local playingtime1 = math.floor(playingtime / 60) .. ":" .. playingtime - math.floor(playingtime / 60) * 60
- local playingtime2 = playingtime - math.floor(playingtime / 60) * 60
- local clickPlayingtime = nil
- if playingtime2 > 9 then
- clickPlayingtime = math.floor(playingtime / 60) .. ":" .. playingtime - math.floor(playingtime / 60) * 60
- else
- clickPlayingtime = math.floor(playingtime / 60) .. ":0" .. playingtime - math.floor(playingtime / 60) * 60
- end
- local lvl = (tonumber(getElementData(clickedPlayer, "Adminlevel")))
- local adminrang = nil
- if lvl == 0 then
- adminrang = "Spieler"
- elseif lvl == 1 then
- adminrang = "Ticketbeauftragter"
- elseif lvl == 2 then
- adminrang = "Supporter"
- elseif lvl == 3 then
- adminrang = "Moderator"
- elseif lvl == 4 then
- adminrang = "Administrator"
- end
- local pre = (tonumber(getElementData(clickedPlayer, "Premium")))
- local isPre = nil
- if pre == 0 then
- isPre = "Nein"
- elseif pre >= 1 then
- isPre = "Ja"
- end
- local job = (tonumber(getElementData(clickedPlayer, "Job")))
- local jobname = nil
- if job == 0 then
- jobname = "Arbeitslos"
- elseif job == 1 then
- jobname = "Busfahrer"
- elseif job == 2 then
- jobname = "Pilot"
- elseif job == 3 then
- jobname = "Gepäcktransporter"
- elseif job == 4 then
- jobname = "Müllmann"
- elseif job == 5 then
- jobname = "LKW-Fahrer"
- elseif job == 6 then
- jobname = "Mechaniker"
- elseif job == 7 then
- jobname = "Waffendealer"
- elseif job == 8 then
- jobname = "Anwalt"
- elseif job == 9 then
- jobname = "Hotdogverkäufer"
- end
- guiSetText(statistikwindow.label[9], getPlayerName(clickedPlayer))
- guiSetText(statistikwindow.label[10], jobname)
- guiSetText(statistikwindow.label[11], clickRang)
- guiSetText(statistikwindow.label[12], clickFraktion)
- guiSetText(statistikwindow.label[13], adminrang)
- guiSetText(statistikwindow.label[14], clickPlayingtime)
- guiSetText(statistikwindow.label[15], isPre)
- guiSetText(statistikwindow.label[16], tonumber(getElementData(clickedPlayer, "Telefonnr")))
- end
- end
- addEvent("openPlayerWindow", true)
- addEventHandler("openPlayerWindow", getRootElement(), openPlayerWindow)
- closePlayerWindow = function(state)
- -- upvalues: lp
- if state == "left" and source == playerwindow.button[5] then
- guiSetVisible(playerwindow.window[1], false)
- if guiGetVisible(statistikwindow.window[1]) == true then
- guiSetVisible(statistikwindow.window[1], false)
- end
- if guiGetVisible(itemwindow.window[1]) == true then
- guiSetVisible(itemwindow.window[1], false)
- end
- if guiGetVisible(staatwindow.window[1]) == true then
- guiSetVisible(staatwindow.window[1], false)
- end
- if guiGetVisible(licwindow.window[1]) == true then
- guiSetVisible(licwindow.window[1], false)
- end
- guiSetInputEnabled(false)
- showCursor(false)
- setElementData(lp, "windowvis", false)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), closePlayerWindow)
- statistikPlayerWindow = function(state)
- if state == "left" and source == playerwindow.button[1] then
- if guiGetVisible(statistikwindow.window[1]) == true then
- guiSetVisible(statistikwindow.window[1], false)
- end
- else
- if guiGetVisible(itemwindow.window[1]) == true then
- guiSetVisible(itemwindow.window[1], false)
- end
- if guiGetVisible(staatwindow.window[1]) == true then
- guiSetVisible(staatwindow.window[1], false)
- end
- if guiGetVisible(licwindow.window[1]) == true then
- guiSetVisible(licwindow.window[1], false)
- end
- guiSetVisible(statistikwindow.window[1], true)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), statistikPlayerWindow)
- closeStatistikPlayerWindow = function(state)
- if state == "left" and source == statistikwindow.button[1] then
- guiSetVisible(statistikwindow.window[1], false)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), closeStatistikPlayerWindow)
- itemPlayerWindow = function(state)
- if state == "left" and source == playerwindow.button[2] then
- if guiGetVisible(itemwindow.window[1]) == true then
- guiSetVisible(itemwindow.window[1], false)
- end
- else
- if guiGetVisible(statistikwindow.window[1]) == true then
- guiSetVisible(statistikwindow.window[1], false)
- end
- if guiGetVisible(staatwindow.window[1]) == true then
- guiSetVisible(staatwindow.window[1], false)
- end
- if guiGetVisible(licwindow.window[1]) == true then
- guiSetVisible(licwindow.window[1], false)
- end
- guiSetVisible(itemwindow.window[1], true)
- itemWindowInventar()
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), itemPlayerWindow)
- closeItemPlayerWindow = function(state)
- if state == "left" and source == itemwindow.button[1] then
- guiSetVisible(itemwindow.window[1], false)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), closeItemPlayerWindow)
- itemWindowInventar = function()
- -- upvalues: lp
- guiGridListClear(itemwindow.gridlist[1])
- local pro = getElementData(lp, "Inventar")
- local pro1 = tonumber(gettok(pro, 1, string.byte("|")))
- local pro2 = tonumber(gettok(pro, 2, string.byte("|")))
- local pro3 = tonumber(gettok(pro, 3, string.byte("|")))
- local pro4 = tonumber(gettok(pro, 4, string.byte("|")))
- local pro5 = tonumber(gettok(pro, 5, string.byte("|")))
- local pro6 = tonumber(gettok(pro, 6, string.byte("|")))
- local pro7 = tonumber(gettok(pro, 7, string.byte("|")))
- local pro8 = tonumber(gettok(pro, 8, string.byte("|")))
- local pro9 = tonumber(gettok(pro, 9, string.byte("|")))
- local pro10 = tonumber(gettok(pro, 10, string.byte("|")))
- local pro11 = tonumber(gettok(pro, 11, string.byte("|")))
- local pro12 = tonumber(gettok(pro, 12, string.byte("|")))
- if pro1 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Blumen", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro1, false, false)
- end
- if pro2 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Fotoapparat", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro2, false, false)
- end
- if pro3 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Benzinkanister", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro3, false, false)
- end
- if pro4 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Rubbellos", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro4, false, false)
- end
- if pro5 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Snack", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro5, false, false)
- end
- if pro6 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Fertigessen", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro6, false, false)
- end
- if pro7 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Bier", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro7, false, false)
- end
- if pro8 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Zigaretten", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro8, false, false)
- end
- if pro9 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Nachtsichtgerät", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro9, false, false)
- end
- if pro10 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Newspaper", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro10, false, false)
- end
- if pro11 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Hanfsamen", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro11, false, false)
- end
- if pro12 >= 1 then
- local row = guiGridListAddRow(itemwindow.gridlist[1])
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[1], "Drogen", false, false)
- guiGridListSetItemText(itemwindow.gridlist[1], row, itemwindow.row[2], pro12, false, false)
- end
- end
- itemWindowClick = function()
- if itemwindow.window[1] then
- local rowindex, columnindex = guiGridListGetSelectedItem(itemwindow.gridlist[1])
- local selectedItemPlayer = guiGridListGetItemText(itemwindow.gridlist[1], rowindex, itemwindow.row[1])
- if selectedItemPlayer == "Blumen" then
- sItemPlayer = "blumen"
- end
- elseif selectedItemPlayer == "Fotoapparat" then
- sItemPlayer = "foto"
- elseif selectedItemPlayer == "Benzinkanister" then
- sItemPlayer = "bcanister"
- elseif selectedItemPlayer == "Rubbellos" then
- sItemPlayer = "rubbel"
- elseif selectedItemPlayer == "Snack" then
- sItemPlayer = "snack"
- elseif selectedItemPlayer == "Fertigessen" then
- sItemPlayer = "fessen"
- elseif selectedItemPlayer == "Bier" then
- sItemPlayer = "bier"
- elseif selectedItemPlayer == "Zigaretten" then
- sItemPlayer = "zigs"
- elseif selectedItemPlayer == "Nachtsichtgerät" then
- sItemPlayer = "night"
- elseif selectedItemPlayer == "Newspaper" then
- sItemPlayer = "newspaper"
- elseif selectedItemPlayer == "Hanfsamen" then
- sItemPlayer = "samen"
- elseif selectedItemPlayer == "Drogen" then
- sItemPlayer = "drogen"
- else
- sItemPlayer = "none"
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), itemWindowClick)
- itemWindowGiveItem = function(state)
- -- upvalues: lp
- if state == "left" and source == itemwindow.button[2] then
- local pro = getElementData(lp, "Inventar")
- local pro1 = tonumber(gettok(pro, 1, string.byte("|")))
- local pro2 = tonumber(gettok(pro, 2, string.byte("|")))
- local pro3 = tonumber(gettok(pro, 3, string.byte("|")))
- local pro4 = tonumber(gettok(pro, 4, string.byte("|")))
- local pro5 = tonumber(gettok(pro, 5, string.byte("|")))
- local pro6 = tonumber(gettok(pro, 6, string.byte("|")))
- local pro7 = tonumber(gettok(pro, 7, string.byte("|")))
- local pro8 = tonumber(gettok(pro, 8, string.byte("|")))
- local pro9 = tonumber(gettok(pro, 9, string.byte("|")))
- local pro10 = tonumber(gettok(pro, 10, string.byte("|")))
- local pro11 = tonumber(gettok(pro, 11, string.byte("|")))
- local pro12 = tonumber(gettok(pro, 12, string.byte("|")))
- local value = tonumber(guiGetText(itemwindow.edit[1]))
- if value ~= nil then
- if value > 0 then
- if isElement(getPlayerFromName(guiGetText(statistikwindow.label[9]))) then
- local clickedPlayer = getPlayerFromName(guiGetText(statistikwindow.label[9]))
- if sItemPlayer == "blumen" then
- if value <= pro1 then
- local item = 1
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro1 = pro1 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "foto" then
- if value <= pro2 then
- local item = 2
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro2 = pro2 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "bcanister" then
- if value <= pro3 then
- local item = 3
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro3 = pro3 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "rubbel" then
- if value <= pro4 then
- local item = 4
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro4 = pro4 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "snack" then
- if value <= pro5 then
- local item = 5
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro5 = pro5 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "fessen" then
- if value <= pro6 then
- local item = 6
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro6 = pro6 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "bier" then
- if value <= pro7 then
- local item = 7
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro7 = pro7 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "zigs" then
- if value <= pro8 then
- local item = 8
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro8 = pro8 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "night" then
- if value <= pro9 then
- local item = 9
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro9 = pro9 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "newspaper" then
- if value <= pro10 then
- local item = 10
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro10 = pro10 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "samen" then
- if value <= pro11 then
- local item = 11
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro11 = pro11 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- elseif sItemPlayer == "drogen" then
- if value <= pro12 then
- local item = 12
- triggerServerEvent("itemWindowGiveItem", lp, clickedPlayer, item, value)
- local pro12 = pro12 - value
- setElementData(lp, "Inventar", "" .. pro1 .. "|" .. pro2 .. "|" .. pro3 .. "|" .. pro4 .. "|" .. pro5 .. "|" .. pro6 .. "|" .. pro7 .. "|" .. pro8 .. "|" .. pro9 .. "|" .. pro10 .. "|" .. pro11 .. "|" .. pro12 .. "")
- else
- outputChatBox("Du hast nicht genug Items!", 255, 48, 48)
- end
- else
- outputChatBox("Bitte wähle eine Item aus!", 255, 48, 48)
- end
- else
- outputChatBox("Der Spieler existiert nicht!", 255, 48, 48)
- end
- else
- outputChatBox("Bitte gib eine gültige Anzahl an Items ein!", 255, 48, 48)
- end
- else
- outputChatBox("Bitte gib eine gültige Anzahl an Items ein!", 255, 48, 48)
- end
- guiSetText(itemwindow.edit[1], "")
- itemWindowInventar()
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), itemWindowGiveItem)
- itemWindowGiveMoney = function(state)
- -- upvalues: lp
- if state == "left" and source == itemwindow.button[3] then
- local money = tonumber(getElementData(lp, "Geld"))
- local value = tonumber(guiGetText(itemwindow.edit[2]))
- if value ~= nil then
- if value > 0 then
- if value <= money then
- if isElement(getPlayerFromName(guiGetText(statistikwindow.label[9]))) then
- local clickedPlayer = getPlayerFromName(guiGetText(statistikwindow.label[9]))
- triggerServerEvent("itemWindowGiveMoney", lp, clickedPlayer, value)
- else
- outputChatBox("Der Spieler existiert nicht!", 255, 48, 48)
- end
- else
- outputChatBox("Du hast nicht genug Geld!", 255, 48, 48)
- end
- else
- outputChatBox("Bitte gib einen gültigen Betrag ein!", 255, 48, 48)
- end
- else
- outputChatBox("Bitte gib einen gültigen Betrag ein!", 255, 48, 48)
- end
- guiSetText(itemwindow.edit[2], "")
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), itemWindowGiveMoney)
- staatPlayerWindow = function(state)
- if state == "left" and source == playerwindow.button[3] then
- if guiGetVisible(staatwindow.window[1]) == true then
- guiSetVisible(staatwindow.window[1], false)
- end
- else
- if guiGetVisible(statistikwindow.window[1]) == true then
- guiSetVisible(statistikwindow.window[1], false)
- end
- if guiGetVisible(itemwindow.window[1]) == true then
- guiSetVisible(itemwindow.window[1], false)
- end
- if guiGetVisible(licwindow.window[1]) == true then
- guiSetVisible(licwindow.window[1], false)
- end
- guiSetVisible(staatwindow.window[1], true)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), staatPlayerWindow)
- closeStaatPlayerWindow = function(state)
- if state == "left" and source == staatwindow.button[1] then
- guiSetVisible(staatwindow.window[1], false)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), closeStaatPlayerWindow)
- scheinStaatPlayerWindow = function(state)
- if state == "left" and source == staatwindow.button[2] then
- if #guiGetText(staatwindow.edit[1]) > 0 then
- local sradio = nil
- if guiRadioButtonGetSelected(staatwindow.radiobutton[1]) == true then
- sradio = 1
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[2]) == true then
- sradio = 2
- end
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[3]) == true then
- sradio = 3
- end
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[4]) == true then
- sradio = 4
- end
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[5]) == true then
- sradio = 5
- end
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[6]) == true then
- sradio = 6
- end
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[7]) == true then
- sradio = 7
- end
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[8]) == true then
- sradio = 8
- end
- else
- if guiRadioButtonGetSelected(staatwindow.radiobutton[9]) == true then
- sradio = 9
- end
- else
- outputChatBox("Bitte wähle einen Schein aus!", 255, 48, 48)
- return
- end
- triggerServerEvent("tschein", getLocalPlayer(), getLocalPlayer(), "", guiGetText(statistikwindow.label[9]), sradio, guiGetText(staatwindow.edit[1]))
- else
- outputChatBox("Bitte gib einen Grund ein!", 255, 48, 48)
- end
- guiSetText(staatwindow.edit[1], "")
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), scheinStaatPlayerWindow)
- ticketStaatPlayerWindow = function(state)
- if state == "left" and source == staatwindow.button[3] then
- if #guiGetText(staatwindow.edit[3]) > 0 then
- if #guiGetText(staatwindow.edit[2]) > 0 then
- local preis = math.floor(tonumber(guiGetText(staatwindow.edit[2])))
- if preis > 0 then
- triggerServerEvent("ticket", getLocalPlayer(), getLocalPlayer(), "", guiGetText(statistikwindow.label[9]), preis)
- else
- outputChatBox("Bitte gib einen gültigen Betrag ein!", 255, 48, 48)
- end
- else
- outputChatBox("Bitte gib einen gültigen Betrag ein!", 255, 48, 48)
- end
- else
- outputChatBox("Bitte gib einen Grund ein!", 255, 48, 48)
- end
- guiSetText(staatwindow.edit[2], "")
- guiSetText(staatwindow.edit[3], "")
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), ticketStaatPlayerWindow)
- warpStaatPlayerWindow = function(state)
- if state == "left" and source == staatwindow.button[4] then
- triggerServerEvent("warpIntoCar", getLocalPlayer(), getLocalPlayer(), "", guiGetText(statistikwindow.label[9]))
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), warpStaatPlayerWindow)
- weaponsStaatPlayerWindow = function(state)
- if state == "left" and source == staatwindow.button[5] then
- triggerServerEvent("takeweapons", getLocalPlayer(), getLocalPlayer(), "", guiGetText(statistikwindow.label[9]))
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), weaponsStaatPlayerWindow)
- drogenStaatPlayerWindow = function(state)
- if state == "left" and source == staatwindow.button[6] then
- triggerServerEvent("takeillegal", getLocalPlayer(), getLocalPlayer(), "", guiGetText(statistikwindow.label[9]))
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), drogenStaatPlayerWindow)
- fesselnStaatPlayerWindow = function(state)
- if state == "left" and source == staatwindow.button[7] then
- triggerServerEvent("tie", getLocalPlayer(), getLocalPlayer(), "", guiGetText(statistikwindow.label[9]))
- if guiGetText(staatwindow.button[7]) == "Spieler entfesseln" then
- guiSetText(staatwindow.button[7], "Spieler fesseln")
- end
- else
- guiSetText(staatwindow.button[7], "Spieler entfesseln")
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), fesselnStaatPlayerWindow)
- licPlayerWindow = function(state)
- if state == "left" and source == playerwindow.button[4] then
- if guiGetVisible(licwindow.window[1]) == true then
- guiSetVisible(licwindow.window[1], false)
- end
- else
- if guiGetVisible(statistikwindow.window[1]) == true then
- guiSetVisible(statistikwindow.window[1], false)
- end
- if guiGetVisible(itemwindow.window[1]) == true then
- guiSetVisible(itemwindow.window[1], false)
- end
- if guiGetVisible(staatwindow.window[1]) == true then
- guiSetVisible(staatwindow.window[1], false)
- end
- guiSetVisible(licwindow.window[1], true)
- setPlayerLicenses()
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), licPlayerWindow)
- closeLicPlayerWindow = function(state)
- if state == "left" and source == licwindow.button[1] then
- guiSetVisible(licwindow.window[1], false)
- end
- end
- addEventHandler("onClientGUIClick", getRootElement(), closeLicPlayerWindow)
- setPlayerLicenses = function()
- guiGridListClear(licwindow.gridlist[1])
- local lic = getElementData(getPlayerFromName(guiGetText(statistikwindow.label[9])), "Licenses")
- local lic1 = tonumber(gettok(lic, 1, string.byte("|")))
- local lic2 = tonumber(gettok(lic, 2, string.byte("|")))
- local lic3 = tonumber(gettok(lic, 3, string.byte("|")))
- local lic4 = tonumber(gettok(lic, 4, string.byte("|")))
- local lic5 = tonumber(gettok(lic, 5, string.byte("|")))
- local lic6 = tonumber(gettok(lic, 6, string.byte("|")))
- local lic7 = tonumber(gettok(lic, 7, string.byte("|")))
- local lic8 = tonumber(gettok(lic, 8, string.byte("|")))
- local lic9 = tonumber(gettok(lic, 9, string.byte("|")))
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Führerschein", false, false)
- if lic1 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Motorradschein", false, false)
- if lic2 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "LKW-Schein", false, false)
- if lic3 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Flugschein", false, false)
- if lic4 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Helikopterschein", false, false)
- if lic5 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Bootschein", false, false)
- if lic6 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Waffenschein", false, false)
- if lic7 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Reisepass", false, false)
- if lic8 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- local row = guiGridListAddRow(licwindow.gridlist[1])
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_schein, "Personalausweis", false, false)
- if lic9 == 1 then
- fix = "Ja"
- else
- fix = "Nein"
- end
- guiGridListSetItemText(licwindow.gridlist[1], row, grid_lic_besitz, fix, false, false)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement