Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local screenWidth, screenHeight = guiGetScreenSize()
- local scaleX = screenWidth/1920
- local scaleY = screenHeight/1080
- local screenWidth, screenHeight = guiGetScreenSize()
- local scaleX = screenWidth/1920
- local scaleY = screenHeight/1080
- Logowanie_PL = {
- button = {},
- staticimage = {},
- edit = {}
- }
- Logowanie_EN = {
- button = {},
- staticimage = {},
- edit = {}
- }
- Wybor_Jezyka = {
- button = {},
- staticimage = {}
- }
- Zarzadzanie_PL = {
- button = {},
- staticimage = {},
- edit = {}
- }
- Zarzadzanie_EN = {
- button = {},
- staticimage = {},
- edit = {}
- }
- Tworzenie_PL = {
- button = {},
- staticimage = {},
- combobox = {},
- edit = {}
- }
- Tworzenie_EN = {
- button = {},
- staticimage = {},
- combobox = {},
- edit = {}
- }
- Wybor_Spawnu_EN = {
- gridlist = {},
- staticimage = {},
- button = {}
- }
- Wybor_Spawnu_PL = {
- gridlist = {},
- staticimage = {},
- button = {}
- }
- Wybor_Pracy_PL = {
- gridlist = {},
- staticimage = {},
- button = {}
- }
- Wybor_Pracy_EN = {
- gridlist = {},
- staticimage = {},
- button = {}
- }
- Wybor_Pracy_EN.staticimage[1] = guiCreateStaticImage(0.64, 0.33, 0.33, 0.37, "images/druzyna_en.png", true)
- Wybor_Pracy_EN.button[1] = guiCreateButton(0.39, 0.81, 0.21, 0.10, "wybierz", true, Wybor_Pracy_EN.staticimage[1])
- guiSetAlpha(Wybor_Pracy_EN.button[1], 0.00)
- Wybor_Pracy_EN.gridlist[1] = guiCreateGridList(38*scaleX, 40*scaleY, 561*scaleX, 266*scaleY, false, Wybor_Pracy_EN.staticimage[1])
- guiGridListAddColumn(Wybor_Pracy_EN.gridlist[1], "Online team::", 0.9)
- for i = 1, 6 do
- guiGridListAddRow(Wybor_Pracy_EN.gridlist[1])
- end
- guiGridListSetItemText(Wybor_Pracy_EN.gridlist[1], 0, 1, "Truckers", false, false)
- guiGridListSetItemText(Wybor_Pracy_EN.gridlist[1], 1, 1, "Police", false, false)
- guiGridListSetItemText(Wybor_Pracy_EN.gridlist[1], 2, 1, "Taxi", false, false)
- guiGridListSetItemText(Wybor_Pracy_EN.gridlist[1], 3, 1, "Medic", false, false)
- guiGridListSetItemText(Wybor_Pracy_EN.gridlist[1], 4, 1, "Final Build", false, false)
- guiGridListSetItemText(Wybor_Pracy_EN.gridlist[1], 5, 1, "BP Ultimate", false, false)
- guiGridListSetItemText(Wybor_Pracy_EN.gridlist[1], 6, 1, "Fresh Logistic", false, false)
- Wybor_Pracy_PL.staticimage[1] = guiCreateStaticImage(0.64, 0.33, 0.33, 0.37, "images/druzyna_pl.png", true)
- Wybor_Pracy_PL.button[1] = guiCreateButton(0.39, 0.81, 0.21, 0.10, "wybierz", true, Wybor_Pracy_PL.staticimage[1])
- guiSetAlpha(Wybor_Pracy_PL.button[1], 0.00)
- Wybor_Pracy_PL.gridlist[1] = guiCreateGridList(38*scaleX, 40*scaleY, 561*scaleX, 266*scaleY, false, Wybor_Pracy_PL.staticimage[1])
- guiGridListAddColumn(Wybor_Pracy_PL.gridlist[1], "Dostępne druzyny:", 0.9)
- for i = 1, 6 do
- guiGridListAddRow(Wybor_Pracy_PL.gridlist[1])
- end
- guiGridListSetItemText(Wybor_Pracy_PL.gridlist[1], 0, 1, "Truckerzy", false, false)
- guiGridListSetItemText(Wybor_Pracy_PL.gridlist[1], 1, 1, "Policja", false, false)
- guiGridListSetItemText(Wybor_Pracy_PL.gridlist[1], 2, 1, "Taxi", false, false)
- guiGridListSetItemText(Wybor_Pracy_PL.gridlist[1], 3, 1, "Pogotowie", false, false)
- guiGridListSetItemText(Wybor_Pracy_PL.gridlist[1], 4, 1, "Final Build", false, false)
- guiGridListSetItemText(Wybor_Pracy_PL.gridlist[1], 5, 1, "BP Ultimate", false, false)
- guiGridListSetItemText(Wybor_Pracy_PL.gridlist[1], 6, 1, "Fresh Logistic", false, false)
- Wybor_Spawnu_PL.staticimage[1] = guiCreateStaticImage(0.64, 0.33, 0.33, 0.37, "images/spawn_pl.png", true)
- Wybor_Spawnu_PL.button[1] = guiCreateButton(0.39, 0.81, 0.21, 0.10, "wybierz", true, Wybor_Spawnu_PL.staticimage[1])
- guiSetAlpha(Wybor_Spawnu_PL.button[1], 0.00)
- Wybor_Spawnu_PL.gridlist[1] = guiCreateGridList(38*scaleX, 40*scaleY, 561*scaleX, 266*scaleY, false, Wybor_Spawnu_PL.staticimage[1])
- guiGridListAddColumn(Wybor_Spawnu_PL.gridlist[1], "Dostępne mejsca spawnu:", 0.9)
- for i = 1, 3 do
- guiGridListAddRow(Wybor_Spawnu_PL.gridlist[1])
- end
- guiGridListSetItemText(Wybor_Spawnu_PL.gridlist[1], 0, 1, "San Fierro", false, false)
- guiGridListSetItemText(Wybor_Spawnu_PL.gridlist[1], 1, 1, "Los Santos", false, false)
- guiGridListSetItemText(Wybor_Spawnu_PL.gridlist[1], 2, 1, "Las Venturas", false, false)
- Wybor_Spawnu_EN.staticimage[1] = guiCreateStaticImage(0.64, 0.33, 0.33, 0.37, "images/spawn_en.png", true)
- Wybor_Spawnu_EN.button[1] = guiCreateButton(0.39, 0.81, 0.21, 0.10, "wybierz", true, Wybor_Spawnu_EN.staticimage[1])
- guiSetAlpha(Wybor_Spawnu_EN.button[1], 0.00)
- Wybor_Spawnu_EN.gridlist[1] = guiCreateGridList(38*scaleX, 40*scaleY, 561*scaleX, 266*scaleY, false, Wybor_Spawnu_EN.staticimage[1])
- guiGridListAddColumn(Wybor_Spawnu_EN.gridlist[1], "Online spawn points:", 0.9)
- for i = 1, 3 do
- guiGridListAddRow(Wybor_Spawnu_EN.gridlist[1])
- end
- guiGridListSetItemText(Wybor_Spawnu_EN.gridlist[1], 0, 1, "San Fierro", false, false)
- guiGridListSetItemText(Wybor_Spawnu_EN.gridlist[1], 1, 1, "Los Santos", false, false)
- guiGridListSetItemText(Wybor_Spawnu_EN.gridlist[1], 2, 1, "Las Venturas", false, false)
- Tworzenie_PL.staticimage[1] = guiCreateStaticImage(0.41, 0.63, 0.33, 0.38, "images/tworzenie_pl.png", true)
- Tworzenie_PL.edit[1] = guiCreateEdit(0.08, 0.24, 0.23, 0.10, "imie", true, Tworzenie_PL.staticimage[1])
- Tworzenie_PL.edit[2] = guiCreateEdit(0.08, 0.57, 0.23, 0.10, "Naziwsko", true, Tworzenie_PL.staticimage[1])
- Tworzenie_PL.edit[3] = guiCreateEdit(0.66, 0.58, 0.23, 0.10, "Wiek", true, Tworzenie_PL.staticimage[1])
- Tworzenie_PL.combobox[1] = guiCreateComboBox(0.66, 0.24, 0.25, 0.18, "", true, Tworzenie_PL.staticimage[1])
- guiComboBoxAddItem(Tworzenie_PL.combobox[1], "Meżczyzna")
- guiComboBoxAddItem(Tworzenie_PL.combobox[1], "Kobieta")
- Tworzenie_PL.button[1] = guiCreateButton(0.08, 0.87, 0.20, 0.11, "Tworz", true, Tworzenie_PL.staticimage[1])
- guiSetAlpha(Tworzenie_PL.button[1], 0.00)
- Tworzenie_PL.button[2] = guiCreateButton(0.66, 0.85, 0.20, 0.11, "Anuluj", true, Tworzenie_PL.staticimage[1])
- guiSetAlpha(Tworzenie_PL.button[2], 0.00)
- Tworzenie_EN.staticimage[1] = guiCreateStaticImage(0.41, 0.63, 0.33, 0.38, "images/tworzenie_en.png", true)
- Tworzenie_EN.edit[1] = guiCreateEdit(0.08, 0.24, 0.23, 0.10, "imie", true, Tworzenie_EN.staticimage[1])
- Tworzenie_EN.edit[2] = guiCreateEdit(0.08, 0.57, 0.23, 0.10, "Naziwsko", true, Tworzenie_EN.staticimage[1])
- Tworzenie_EN.edit[3] = guiCreateEdit(0.66, 0.58, 0.23, 0.10, "Wiek", true, Tworzenie_EN.staticimage[1])
- Tworzenie_EN.combobox[1] = guiCreateComboBox(0.66, 0.24, 0.25, 0.18, "", true, Tworzenie_EN.staticimage[1])
- guiComboBoxAddItem(Tworzenie_EN.combobox[1], "Meżczyzna")
- guiComboBoxAddItem(Tworzenie_EN.combobox[1], "Kobieta")
- Tworzenie_EN.button[1] = guiCreateButton(0.08, 0.87, 0.20, 0.11, "Tworz", true, Tworzenie_EN.staticimage[1])
- guiSetAlpha(Tworzenie_EN.button[1], 0.00)
- Tworzenie_EN.button[2] = guiCreateButton(0.66, 0.85, 0.20, 0.11, "Anuluj", true, Tworzenie_EN.staticimage[1])
- guiSetAlpha(Tworzenie_EN.button[2], 0.00)
- Zarzadzanie_PL.staticimage[1] = guiCreateStaticImage(0.65, 0.30, 0.35, 0.33, "images/Zarzadzanie_pl.png", true)
- Zarzadzanie_PL.button[1] = guiCreateButton(0.68, 0.22, 0.25, 0.09, "tworz", true, Zarzadzanie_PL.staticimage[1])
- guiSetAlpha(Zarzadzanie_PL.button[1], 0.00)
- Zarzadzanie_PL.button[2] = guiCreateButton(0.67, 0.40, 0.25, 0.09, "dalejtworz", true, Zarzadzanie_PL.staticimage[1])
- guiSetAlpha(Zarzadzanie_PL.button[2], 0.00)
- Zarzadzanie_PL.button[3] = guiCreateButton(0.68, 0.58, 0.25, 0.09, "dalejtworz", true, Zarzadzanie_PL.staticimage[1])
- guiSetAlpha(Zarzadzanie_PL.button[3], 0.00)
- Zarzadzanie_PL.button[4] = guiCreateButton(0.66, 0.75, 0.25, 0.09, "dalejtworz", true, Zarzadzanie_PL.staticimage[1])
- guiSetAlpha(Zarzadzanie_PL.button[4], 0.00)
- Zarzadzanie_PL.edit[1] = guiCreateEdit(0.03, 0.23, 0.27, 0.08, "", true, Zarzadzanie_PL.staticimage[1])
- Zarzadzanie_PL.edit[2] = guiCreateEdit(0.03, 0.43, 0.27, 0.08, "", true, Zarzadzanie_PL.staticimage[1])
- Zarzadzanie_PL.edit[3] = guiCreateEdit(0.03, 0.64, 0.27, 0.08, "", true, Zarzadzanie_PL.staticimage[1])
- Zarzadzanie_PL.edit[4] = guiCreateEdit(0.03, 0.81, 0.27, 0.08, "", true, Zarzadzanie_PL.staticimage[1])
- Zarzadzanie_EN.staticimage[1] = guiCreateStaticImage(0.65, 0.30, 0.35, 0.33, "images/Zarzadzanie_en.png", true)
- Zarzadzanie_EN.button[1] = guiCreateButton(0.68, 0.22, 0.25, 0.09, "tworz", true, Zarzadzanie_EN.staticimage[1])
- guiSetAlpha(Zarzadzanie_EN.button[1], 0.00)
- Zarzadzanie_EN.button[2] = guiCreateButton(0.67, 0.40, 0.25, 0.09, "dalejtworz", true, Zarzadzanie_EN.staticimage[1])
- guiSetAlpha(Zarzadzanie_EN.button[2], 0.00)
- Zarzadzanie_EN.button[3] = guiCreateButton(0.68, 0.58, 0.25, 0.09, "dalejtworz", true, Zarzadzanie_EN.staticimage[1])
- guiSetAlpha(Zarzadzanie_EN.button[3], 0.00)
- Zarzadzanie_EN.button[4] = guiCreateButton(0.66, 0.75, 0.25, 0.09, "dalejtworz", true, Zarzadzanie_EN.staticimage[1])
- guiSetAlpha(Zarzadzanie_EN.button[4], 0.00)
- Zarzadzanie_EN.edit[1] = guiCreateEdit(0.03, 0.23, 0.27, 0.08, "", true, Zarzadzanie_EN.staticimage[1])
- Zarzadzanie_EN.edit[2] = guiCreateEdit(0.03, 0.43, 0.27, 0.08, "", true, Zarzadzanie_EN.staticimage[1])
- Zarzadzanie_EN.edit[3] = guiCreateEdit(0.03, 0.64, 0.27, 0.08, "", true, Zarzadzanie_EN.staticimage[1])
- Zarzadzanie_EN.edit[4] = guiCreateEdit(0.03, 0.81, 0.27, 0.08, "", true, Zarzadzanie_EN.staticimage[1])
- Logowanie_PL.staticimage[1] = guiCreateStaticImage(0.59, 0.29, 0.41, 0.38, "images/logowanie_pl.png", true)
- Logowanie_PL.button[1] = guiCreateButton(0.27, 0.83, 0.22, 0.08, "Loguj", true, Logowanie_PL.staticimage[1])
- guiSetAlpha(Logowanie_PL.button[1], 0.00)
- Logowanie_PL.button[2] = guiCreateButton(0.56, 0.83, 0.22, 0.08, "Ree", true, Logowanie_PL.staticimage[1])
- guiSetAlpha(Logowanie_PL.button[2], 0.00)
- Logowanie_PL.edit[1] = guiCreateEdit(0.34, 0.32, 0.38, 0.06, "Login", true, Logowanie_PL.staticimage[1])
- Logowanie_PL.edit[2] = guiCreateEdit(0.34, 0.48, 0.38, 0.06, "Haslo", true, Logowanie_PL.staticimage[1])
- guiEditSetMasked(Logowanie_PL.edit[2], true)
- Logowanie_EN.staticimage[1] = guiCreateStaticImage(0.59, 0.29, 0.41, 0.38, "images/logowanie_en.png", true)
- Logowanie_EN.button[1] = guiCreateButton(0.27, 0.83, 0.22, 0.08, "Loguj", true, Logowanie_EN.staticimage[1])
- guiSetAlpha(Logowanie_EN.button[1], 0.00)
- Logowanie_EN.button[2] = guiCreateButton(0.56, 0.83, 0.22, 0.08, "Ree", true, Logowanie_EN.staticimage[1])
- guiSetAlpha(Logowanie_EN.button[2], 0.00)
- Logowanie_EN.edit[1] = guiCreateEdit(0.34, 0.32, 0.38, 0.06, "Username", true, Logowanie_EN.staticimage[1])
- Logowanie_EN.edit[2] = guiCreateEdit(0.34, 0.48, 0.38, 0.06, "Password", true, Logowanie_EN.staticimage[1])
- guiEditSetMasked(Logowanie_EN.edit[2], true)
- Wybor_Jezyka.staticimage[1] = guiCreateStaticImage(0.56, 0.31, 0.44, 0.36, "images/wybor_jezyka.png", true)
- Wybor_Jezyka.button[1] = guiCreateButton(0.07, 0.36, 0.36, 0.34, "pl", true, Wybor_Jezyka.staticimage[1])
- guiSetAlpha(Wybor_Jezyka.button[1], 0.00)
- Wybor_Jezyka.button[2] = guiCreateButton(0.56, 0.36, 0.39, 0.34, "EN", true, Wybor_Jezyka.staticimage[1])
- guiSetAlpha(Wybor_Jezyka.button[2], 0.00)
- guiSetVisible(Wybor_Jezyka.staticimage[1], false)
- guiSetVisible(Zarzadzanie_PL.staticimage[1], false)
- guiSetVisible(Zarzadzanie_EN.staticimage[1], false)
- guiSetVisible(Tworzenie_PL.staticimage[1], false)
- guiSetVisible(Tworzenie_EN.staticimage[1], false)
- guiSetVisible(Logowanie_EN.staticimage[1], false)
- guiSetVisible(Logowanie_PL.staticimage[1], false)
- guiSetVisible(Wybor_Pracy_EN.staticimage[1], false)
- guiSetVisible(Wybor_Pracy_PL.staticimage[1], false)
- guiSetVisible(Wybor_Spawnu_PL.staticimage[1], false)
- guiSetVisible(Wybor_Spawnu_EN.staticimage[1], false)
- addEventHandler("onClientGUIClick",Wybor_Jezyka.button[1],function()
- setElementData(getLocalPlayer(),"Polska",true)
- guiSetVisible(Logowanie_PL.staticimage[1], true)
- setElementData(getLocalPlayer(),"Paulo",true)
- guiSetVisible(Wybor_Jezyka.staticimage[1], false)
- exports.notifications:showBox("info", "Wybrałeś język Polski, skrypty będą działąć w tym języku.")
- end,false)
- addEventHandler("onClientGUIClick",Wybor_Jezyka.button[2],function()
- setElementData(getLocalPlayer(),"English",true)
- guiSetVisible(Logowanie_EN.staticimage[1], true)
- setElementData(getLocalPlayer(),"Paulo",true)
- guiSetVisible(Wybor_Jezyka.staticimage[1], false)
- exports.notifications:showBox("info", "You have selected the English language, scripts should work in that language.")
- end,false)
- addEventHandler("onClientGUIClick",Logowanie_PL.button[1],function()
- local username = guiGetText(Logowanie_PL.edit[1])
- local password = guiGetText(Logowanie_PL.edit[2])
- if username and password then
- triggerServerEvent("Dobre_Logowanie", getRootElement(), localPlayer, username, password)
- else
- exports.notifications:showBox("error", "Zapomniałeś podać login lub hasło.")
- end
- end,false )
- addEventHandler("onClientGUIClick",Logowanie_EN.button[1],function()
- local username = guiGetText(Logowanie_EN.edit[3])
- local password = guiGetText(Logowanie_EN.edit[4])
- if username and password then
- triggerServerEvent("Submit_Login", getRootElement(), localPlayer, username, password)
- else
- exports.notifications:showBox("error", "You must type username and password.")
- end
- end,false )
- addEventHandler("onClientGUIClick",Logowanie_PL.button[2],function()
- local username = guiGetText(Logowanie_PL.edit[1])
- local password = guiGetText(Logowanie_PL.edit[2])
- if username and password then
- if (string.len(username)>=4) then
- if (string.len(password)>=4) then
- triggerServerEvent("Dobra_Rejestracja", getRootElement(), localPlayer, username, password)
- else
- exports.notifications:showBox("error", "Hasło musi być dłuższy niż 4 znaki.")
- end
- else
- exports.notifications:showBox("error", "Login musi być dłuższy niż 4 znaki.")
- end
- else
- exports.notifications:showBox("error", "Wpisz login i hasło.")
- end
- end ,false)
- addEventHandler("onClientGUIClick",Logowanie_EN.button[1],function()
- local username = guiGetText(Logowanie_EN.edit[3])
- local password = guiGetText(Logowanie_EN.edit[4])
- if username and password then
- if (string.len(username)>=4) then
- if (string.len(password)>=4) then
- triggerServerEvent("Submit_Register", getRootElement(), localPlayer, username, password)
- else
- outputChatBox( "The password must contain at least four characters.")
- end
- else
- exports.notifications:showBox("error", "Username must be at least 4 characters.")
- end
- else
- exports.notifications:showBox("error", "Enter your login and password!")
- end
- end ,false)
- addEventHandler("onClientGUIClick",Zarzadzanie_PL.button[1],function()
- guiSetVisible(Tworzenie_PL.staticimage[1], true)
- guiSetVisible(Zarzadzanie_PL.staticimage[1], false)
- exports.notifications:showBox("info", "Aby stworzyć postać, wypełnij wszystkie pola.")
- end,false)
- addEventHandler("onClientGUIClick",Zarzadzanie_PL.button[3],function()
- triggerServerEvent("Wczytaj_Postac_PL", getRootElement(), localPlayer)
- end,false)
- addEventHandler("onClientGUIClick",Zarzadzanie_EN.button[1],function()
- guiSetVisible(Tworzenie_EN.staticimage[1], true)
- guiSetVisible(Zarzadzanie_EN.staticimage[1], false)
- exports.notifications:showBox("info", "To create a form, fill in all the fields.")
- end,false)
- addEventHandler("onClientGUIClick",Zarzadzanie_EN.button[3],function()
- triggerServerEvent("Wczytaj_Postac_EN", getRootElement(), localPlayer)
- end,false)
- addEventHandler ("onClientGUIClick", Wybor_Pracy_PL.button[1],function(button, state, thePlayer)
- local praca = guiGridListGetItemText (Wybor_Pracy_PL.gridlist[1], guiGridListGetSelectedItem(Wybor_Pracy_PL.gridlist[1]))
- if (praca == "Truckerzy") then
- guiSetVisible(Wybor_Pracy_PL.staticimage[1], false)
- guiSetVisible(Wybor_Spawnu_PL.staticimage[1], true)
- elseif (praca == "Policja") then
- triggerServerEvent("Policja_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Pogotowie") then
- triggerServerEvent("Pogo_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Taxi") then
- triggerServerEvent("Taxi_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Pomoc Drogowa") then
- triggerServerEvent("Pomoc_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "BP Ultimate") then
- triggerServerEvent("BP_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Final Build") then
- triggerServerEvent("Final_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Fresh Logistic") then
- triggerServerEvent("Fresh_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- else
- exports.notifications:showBox("error", "Nie wybrałeś żadnej pracy. Jeśli nie jesteś nigdzie zatrudniony wybierz pole 'Truckerzy'.")
- end
- end,false)
- addEventHandler ("onClientGUIClick", Wybor_Pracy_EN.button[1],function(button, state, thePlayer)
- local praca = guiGridListGetItemText (Wybor_Pracy_EN.gridlist[1], guiGridListGetSelectedItem(Wybor_Pracy_EN.gridlist[1]))
- if (praca == "Truckers") then
- guiSetVisible(Wybor_Pracy_EN.staticimage[1], false)
- guiSetVisible(Wybor_Spawnu_EN.staticimage[1], true)
- elseif (praca == "Police") then
- triggerServerEvent("Policja_EN", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Medic") then
- triggerServerEvent("Pogo_EN", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Taxi") then
- triggerServerEvent("Taxi_EN", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Mechanic") then
- triggerServerEvent("Pomoc_EN", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "BP Ultimate") then
- triggerServerEvent("BP_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Final Build") then
- triggerServerEvent("Final_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- elseif (praca == "Fresh Logistic") then
- triggerServerEvent("Fresh_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- else
- exports.notifications:showBox("error", "You have not selected any work. If you are not employed anywhere, select the field 'Truckerzy'.")
- end
- end,false)
- addEventHandler ("onClientGUIClick",Wybor_Spawnu_PL.button[1],function(button, state, thePlayer)
- local ms = guiGridListGetItemText (Wybor_Spawnu_PL.gridlist[1], guiGridListGetSelectedItem(Wybor_Spawnu_PL.gridlist[1]))
- if (ms == "San Fierro") then
- SchowajGUI()
- triggerServerEvent("SF_PL", getRootElement(), getLocalPlayer())
- showPlayerHudComponent ("all", true)
- elseif (ms == "Las Venturas") then
- triggerServerEvent("LV_PL", getRootElement(), getLocalPlayer())
- SchowajGUI()
- showPlayerHudComponent ("all", true)
- elseif (ms == "Los Santos") then
- SchowajGUI()
- triggerServerEvent("LS_PL", getRootElement(), getLocalPlayer())
- showPlayerHudComponent ("all", true)
- else
- exports.notifications:showBox("error","Nie wybrałeś miejsca spawnu.")
- exports.notifications:showBox("error", "Not selected spawn points.")
- end
- end,false)
- addEventHandler ("onClientGUIClick",Wybor_Spawnu_EN.button[1],function(button, state, thePlayer)
- local ms = guiGridListGetItemText (Wybor_Spawnu_EN.gridlist[1], guiGridListGetSelectedItem(Wybor_Spawnu_EN.gridlist[1]))
- if (ms == "San Fierro") then
- SchowajGUI()
- triggerServerEvent("SF_EN", getRootElement(), getLocalPlayer())
- showPlayerHudComponent ("all", true)
- elseif (ms == "Las Venturas") then
- triggerServerEvent("LV_EN", getRootElement(), getLocalPlayer())
- SchowajGUI()
- showPlayerHudComponent ("all", true)
- elseif (ms == "Los Santos") then
- SchowajGUI()
- triggerServerEvent("LS_EN", getRootElement(), getLocalPlayer())
- showPlayerHudComponent ("all", true)
- else
- exports.notifications:showBox("error", "Not selected spawn points.")
- end
- end,false)
- addEventHandler ("onClientGUIClick",Tworzenie_PL.button[1], function()
- local imie = guiGetText(Tworzenie_PL.edit[1])
- local nazwisko = guiGetText(Tworzenie_PL.edit[2])
- local plec = guiGetText(Tworzenie_PL.combobox[1])
- local wiek = guiGetText(Tworzenie_PL.edit[3])
- if imie and nazwisko and plec and wiek then
- if (string.len(imie)>=4) then
- if (string.len(nazwisko)>=4) then
- if (string.len(wiek)>=1) then
- guiSetVisible (Tworzenie_PL.staticimage[1], false)
- guiSetVisible (Zarzadzanie_PL.staticimage[1], true)
- triggerServerEvent("Tworze_Postac_PL", getLocalPlayer(), imie,nazwisko,plec,wiek)
- guiSetText(Zarzadzanie_PL.edit[1],imie)
- guiSetText(Zarzadzanie_PL.edit[2],nazwisko)
- guiSetText(Zarzadzanie_PL.edit[3],plec)
- guiSetText(Zarzadzanie_PL.edit[4],wiek)
- else
- exports.notifications:showBox("error", "Nie wisano imienia postaci.")
- end
- else
- exports.notifications:showBox("error", "Nazwisko musi zawierac 4 znaki")
- end
- else
- exports.notifications:showBox("error", "Wiek moze zawierać tylko 1-100.")
- end
- end
- end,false)
- addEventHandler ("onClientGUIClick",Tworzenie_EN.button[1], function()
- local imie = guiGetText(Tworzenie_EN.edit[1])
- local nazwisko = guiGetText(Tworzenie_EN.edit[2])
- local plec = guiGetText(Tworzenie_EN.combobox[1])
- local wiek = guiGetText(Tworzenie_EN.edit[3])
- if imie and nazwisko and plec and wiek then
- if (string.len(imie)>=4) then
- if (string.len(nazwisko)>=4) then
- if (string.len(wiek)>=1) then
- guiSetVisible (Tworzenie_EN.staticimage[1], false)
- guiSetVisible (Zarzadzanie_EN.staticimage[1], true)
- triggerServerEvent("Tworze_Postac_EN", getLocalPlayer(), imie,nazwisko,plec,wiek)
- guiSetText(Zarzadzanie_EN.edit[1],imie)
- guiSetText(Zarzadzanie_EN.edit[2],nazwisko)
- guiSetText(Zarzadzanie_EN.edit[3],plec)
- guiSetText(Zarzadzanie_EN.edit[4],wiek)
- else
- exports.notifications:showBox("error", "You must write all files")
- end
- else
- exports.notifications:showBox("error", "Surename must have 4 characters")
- end
- else
- exports.notifications:showBox("error", "Old must have 1-100")
- end
- end
- end,false)
- addEventHandler ("onClientGUIClick",Tworzenie_PL.button[2], function()
- guiSetVisible (Tworzenie_PL.staticimage[1], false)
- guiSetVisible (Zarzadzanie_PL.staticimage[1], false)
- end)
- addEventHandler ("onClientGUIClick",Tworzenie_EN.button[2], function()
- guiSetVisible (Tworzenie_EN.staticimage[1], false)
- guiSetVisible (Zarzadzanie_EN.staticimage[1], false)
- end)
- addEventHandler("onClientGUIClick",Zarzadzanie_PL.button[2],function()
- guiSetVisible (Zarzadzanie_PL.staticimage[1], false)
- guiSetVisible (Wybor_Pracy_PL.staticimage[1], true)
- end)
- addEventHandler ("onClientGUIClick",Zarzadzanie_EN.button[2], function()
- guiSetVisible (Zarzadzanie_EN.staticimage[1], false)
- guiSetVisible (Wybor_Pracy_EN.staticimage[1], true)
- end)
- function WchodzeNaSerwer(type)
- if type == true then
- showPlayerHudComponent("all", false)
- showChat(false)
- showCursor(true)
- fadeCamera(true)
- guiSetVisible(Wybor_Jezyka.staticimage[1], true)
- --setCameraMatrix(1416,-887,120,-90,1700,-350)
- setCameraMatrix(1491.48572, -1402.52332, 23.61719, 1491.42236, -1407.00012, 23.61719)
- end
- end
- function hideLoginWindow()
- guiSetVisible (Logowanie_EN.staticimage[1], false)
- guiSetVisible (Logowanie_PL.staticimage[1], false)
- if getElementData(getLocalPlayer(),"English") then
- guiSetVisible (Zarzadzanie_EN.staticimage[1], true)
- guiSetVisible (Zarzadzanie.staticimage[1], true)
- Skiny()
- elseif getElementData(getLocalPlayer(),"Polska") then
- guiSetVisible (Zarzadzanie_PL.staticimage[1], true)
- Skiny()
- end
- end
- addEvent("hideLoginWindow", true)
- addEventHandler("hideLoginWindow", getResourceRootElement(getThisResource()), hideLoginWindow)
- addEvent("Zapamietaj",true)
- addEventHandler("Zapamietaj",getRootElement(),function(playerscore)
- setElementData(getLocalPlayer(),"Ostatni_Skin",playerscore)
- end)
- function Skiny()
- if getElementData(getLocalPlayer(), "Ostatni_Skin") then
- local skin = getElementData(getLocalPlayer(),"Ostatni_Skin")
- muestra = createPed(skin, 1492.42236, -1407.00012, 23.61719)
- else
- ped = createPed(15, 1492.42236, -1407.00012, 23.61719)
- end
- end
- addEvent("Dane_Konta",true)
- addEventHandler("Dane_Konta",getRootElement(),function(imie,naziwsko,plec,wiek)
- if getElementData(getLocalPlayer(),"Polska") then
- guiSetText(Zarzadzanie_PL.edit[1],imie)
- guiSetText(Zarzadzanie_PL.edit[2],naziwsko)
- guiSetText(Zarzadzanie_PL.edit[3],plec)
- guiSetText(Zarzadzanie_PL.edit[4],wiek)
- elseif getElementData(getLocalPlayer(),"English") then
- guiSetText(Zarzadzanie_EN.edit[1],imie)
- guiSetText(Zarzadzanie_EN.edit[2],naziwsko)
- guiSetText(Zarzadzanie_EN.edit[3],plec)
- guiSetText(Zarzadzanie_EN.edit[4],wiek)
- end
- end)
- function SchowajGUI()
- guiSetVisible(Wybor_Jezyka.staticimage[1], false)
- guiSetVisible(Zarzadzanie_PL.staticimage[1], false)
- guiSetVisible(Zarzadzanie_EN.staticimage[1], false)
- guiSetVisible(Tworzenie_PL.staticimage[1], false)
- guiSetVisible(Logowanie_EN.staticimage[1], false)
- guiSetVisible(Logowanie_PL.staticimage[1], false)
- guiSetVisible(Wybor_Pracy_PL.staticimage[1], false)
- guiSetVisible(Wybor_Pracy_EN.staticimage[1], false)
- guiSetVisible(Wybor_Spawnu_PL.staticimage[1], false)
- guiSetVisible(Wybor_Spawnu_EN.staticimage[1], false)
- showCursor(false)
- showChat(true)
- stopSound(muzyka)
- end
- function startcam()
- -- setCameraMatrix(2710.7729492188,1233.9653320313,22.7174453735352711, 1234, 23, 2707, 1140, -8)
- local x1, y1, z1 = 2710.7729492188,1233.9653320313,22.7174453735352711
- local x2, y2, z2 = 1234, 23, 2707
- setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
- end
- ----Kamerka
- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), startcam)
- addEventHandler("onClientReader",getRootElement(), startcam)
- Logo1 = guiCreateStaticImage(0.01, 0.05, 0.72, 0.08, "/images/logo1.png", true)
- Logo2 = guiCreateStaticImage(0.28, 0.86, 0.72, 0.10, "/images/logo2.png", true)
- guiSetVisible(Logo2, false)
- guiSetVisible(Logo1, false)
- local sm = {}
- sm.moov = 0
- sm.object1, sm.object2 = nil, nil
- local function removeCamHandler ()
- if(sm.moov == 1) then
- sm.moov = 0
- end
- end
- local function camRender ()
- if isElement(sm.object1) and isElement(sm.object2) then
- local x1, y1, z1 = getElementPosition ( sm.object1 )
- local x2, y2, z2 = getElementPosition ( sm.object2 )
- setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
- end
- end
- function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
- if(sm.moov == 1) then return false end
- sm.object1 = createObject ( 1337, x1, y1, z1 )
- sm.object2 = createObject ( 1337, x1t, y1t, z1t )
- setElementAlpha ( sm.object1, 0 )
- setElementAlpha ( sm.object2, 0 )
- setObjectScale(sm.object1, 0.01)
- setObjectScale(sm.object2, 0.01)
- moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0 )
- moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0 )
- addEventHandler ( "onClientPreRender", getRootElement(), camRender )
- sm.moov = 1
- setTimer ( removeCamHandler, time, 1 )
- setTimer ( destroyElement, time, 1, sm.object1 )
- setTimer ( destroyElement, time, 1, sm.object2 )
- return true
- end
- function startcam()
- showPlayerHudComponent("all", false)
- showChat(false)
- showCursor(true)
- fadeCamera(true)
- local kam = smoothMoveCamera(2710.7729492188,1233.9653320313,222.7174453735352711, -1701.6151123047, 21.74271774292, 76.711669921875, -1625.2635498047, 437.74124145508, 17.581869125366, -1692.2729492188, -545.36743164063, 34.764526367188,50000 )
- setFarClipDistance(3000)
- muzyka2 = playSound("Muzyka2.mp3",true)
- setSoundVolume(muzyka2,0.4)
- setTimer ( NapiszLogo,7000,1,true)
- setTimer ( NapiszLogo2,14000,1,true)
- setTimer ( NapiszLogo,56000,1,false)
- setTimer ( NapiszLogo2,56000,1,false)
- setTimer ( WchodzeNaSerwer,65000,1,true)
- end
- function NapiszLogo(type)
- if type == true then
- guiSetVisible(Logo1, true)
- elseif type == false then
- guiSetVisible(Logo1, false)
- stopSound(muzyka2)
- muzyka = playSound("Muzyka.mp3",true)
- setSoundVolume(muzyka,0.1)
- guiSetVisible(Logo2, false)
- fadeCamera ( false, 3.0, 0, 0, 0 )
- end
- end
- function NapiszLogo2(type)
- if type == true then
- guiSetVisible(Logo2, true)
- elseif type == false then
- guiSetVisible(Logo2, false)
- end
- end
- ----Kamerka
- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), startcam)
- addEventHandler("onClientReader",getRootElement(), startcam)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement