Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-11-26, 21:01


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

Witam mam problem ze skryptem. Ot?? w panelu genera?a brygadiera w PSP nie mog? ani zatrudnia? ani zwalnia? z ACL. ZA POMOC R* I :piwo:

Client

mojeW,mojeH 16801050
sW,sH guiGetScreenSize()
widthheight = (sW/mojeW), (sH/mojeH)

GUIEditorr = {
    button = {},
    window = {},
    label = {},
    combobox = {},
    gridlist = {},
    edit = {}
}
GUIEditorr.window[1] = guiCreateWindow(612*width306*height429*width344*height"Panel Genera?a"false)
guiWindowSetSizable(GUIEditorr.window[1], false)

GUIEditorr.combobox[1] = guiCreateComboBox(24*width65*height150*width158*height"--Wybierz--"falseGUIEditorr.window[1])
GUIEditorr.combobox[2] = guiCreateComboBox(214*width65*height193*width158*height"--Wybierz--"falseGUIEditorr.window[1])
guiComboBoxAddItem(GUIEditorr.combobox[2], "Genera? Brygadier")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Nadbrygadier")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Starszy Brygadier")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Brygadier")
guiComboBoxAddItem(GUIEditorr.combobox[2], "M?odszy Brygadier")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Starszy Kapitan")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Kapitan")
guiComboBoxAddItem(GUIEditorr.combobox[2], "M?odszy Kapitan")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Aspirant Sztabowy")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Starszy Aspirant")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Aspirant")
guiComboBoxAddItem(GUIEditorr.combobox[2], "M?odszy Aspirant")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Starszy Ogniomistrz")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Ogniomistrz")
guiComboBoxAddItem(GUIEditorr.combobox[2], "M?odszy Ogniomistrz")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Starszy Sekcyjny")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Sekcyjny")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Starszy Stra?ak")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Stra?ak")
guiComboBoxAddItem(GUIEditorr.combobox[2], "Brak")
GUIEditorr.label[1] = guiCreateLabel(26*width34*height93*width21*height"Login:"falseGUIEditorr.window[1])
guiSetFont(GUIEditorr.label[1], "default-bold-small")
guiLabelSetVerticalAlign(GUIEditorr.label[1], "center")
GUIEditorr.label[2] = guiCreateLabel(214*width34*height120*width21*height"Stopie? S?u?bowy:"falseGUIEditorr.window[1])
guiSetFont(GUIEditorr.label[2], "default-bold-small")
guiLabelSetVerticalAlign(GUIEditorr.label[2], "center")
GUIEditorr.button[1] = guiCreateButton(24*width228*height150*width38*height"Zatrudnij"falseGUIEditorr.window[1])
guiSetProperty(GUIEditorr.button[1], "NormalTextColour""FFAAAAAA")
GUIEditorr.button[2] = guiCreateButton(257*width228*height150*width38*height"Zwolnij"falseGUIEditorr.window[1])
guiSetProperty(GUIEditorr.button[2], "NormalTextColour""FFAAAAAA")
GUIEditorr.button[3] = guiCreateButton(142*width276*height150*width38*height"Dodaj Premie"falseGUIEditorr.window[1])
guiSetProperty(GUIEditorr.button[3], "NormalTextColour""FFAAAAAA")
GUIEditorr.button[4] = guiCreateButton(9*width295*height44*width39*height"X"falseGUIEditorr.window[1])
guiSetProperty(GUIEditorr.button[4], "NormalTextColour""FFAAAAAA")
GUIEditorr.button[8] = guiCreateButton(69*width295*height64*width39*height"Leg."falseGUIEditorr.window[1])
guiSetProperty(GUIEditorr.button[8], "NormalTextColour""FFAAAAAA")
GUIEditorr.button[5] = guiCreateButton(141*width175*height150*width38*height"Akceptuj Zmiany"falseGUIEditorr.window[1])
guiSetProperty(GUIEditorr.button[5], "NormalTextColour""FFAAAAAA")

GUIEditorr.window[2] = guiCreateWindow(631*width310*height379*width404*height"Panel Zatrudniania"false)
guiWindowSetSizable(GUIEditorr.window[2], false)

GUIEditorr.gridlist[1] = guiCreateGridList(29*width47*height243*width305*heightfalseGUIEditorr.window[2])
guiGridListAddColumn(GUIEditorr.gridlist[1], "Gracz"0.9)
GUIEditorr.button[6] = guiCreateButton(219*width363*height150*width31*height"Zatrudnij"falseGUIEditorr.window[2])
guiSetProperty(GUIEditorr.button[6], "NormalTextColour""FFAAAAAA")
GUIEditorr.button[7] = guiCreateButton(323*width25*height46*width41*height"X"falseGUIEditorr.window[2])
guiSetProperty(GUIEditorr.button[7], "NormalTextColour""FFAAAAAA")

GUIEditorr.window[3] = guiCreateWindow(631*width310*height379*width190*height"Panel Legitymacji"false)
guiWindowSetSizable(GUIEditorr.window[3], false)

GUIEditorr.label[3] = guiCreateLabel(24*width50*height50*width36*height"Nr:"falseGUIEditorr.window[3])
guiSetFont(GUIEditorr.label[3], "default-bold-small")
guiLabelSetVerticalAlign(GUIEditorr.label[3], "center")
GUIEditorr.label[4] = guiCreateLabel(24*width90*height50*width36*height"Data:"falseGUIEditorr.window[3])
guiSetFont(GUIEditorr.label[4], "default-bold-small")
guiLabelSetVerticalAlign(GUIEditorr.label[4], "center")
GUIEditorr.edit[1] = guiCreateEdit(57*width50*height220*width36*height""falseGUIEditorr.window[3])
GUIEditorr.edit[2] = guiCreateEdit(57*width90*height220*width36*height""falseGUIEditorr.window[3])
GUIEditorr.button[9] = guiCreateButton(219*width160*height150*width31*height"Akceptuj"falseGUIEditorr.window[3])
guiSetProperty(GUIEditorr.button[9], "NormalTextColour""FFAAAAAA")
GUIEditorr.button[10] = guiCreateButton(323*width25*height46*width41*height"X"falseGUIEditorr.window[3])
guiSetProperty(GUIEditorr.button[10], "NormalTextColour""FFAAAAAA")

guiSetVisible(GUIEditorr.window[3], false)
guiSetVisible(GUIEditorr.window[2], false)
guiSetVisible(GUIEditorr.window[1], false)

addEvent"uruch1"true )
addEventHandler"uruch1"root,
function(data)
    guiSetVisible(GUIEditorr.window[1], true)
    showCursor(true)
    guiComboBoxClearGUIEditorr.combobox[1] )
    for i,v in ipairs(data) do
        guiComboBoxAddItemGUIEditorr.combobox[1], )
    end
end
)


    function zatrudnij1()
        guiSetVisible(GUIEditorr.window[1], false)
        guiSetVisible(GUIEditorr.window[2], true)
        guiGridListClearGUIEditorr.gridlist[1] )
        for i,v in ipairs(getElementsByType("player")) do
            local row guiGridListAddRowGUIEditorr.gridlist[1] )
            guiGridListSetItemTextGUIEditorr.gridlist[1], row1getPlayerName(v), falsefalse )
        end
    end
addEventHandler("onClientGUIClick"GUIEditorr.button[1],zatrudnij1,false)

 
function Zamknij11()
        guiSetVisible(GUIEditorr.window[1], false)
        showCursor(false)        
end
addEventHandler("onClientGUIClick",GUIEditorr.button[4], Zamknij11,false)


function Zamknij12()
        guiSetVisible(GUIEditorr.window[2], false)
        showCursor(false)        
end
addEventHandler("onClientGUIClick",GUIEditorr.button[7], Zamknij12false)

function Zamknij13()
        guiSetVisible(GUIEditorr.window[3], false)
        showCursor(false)        
end
addEventHandler("onClientGUIClick",GUIEditorr.button[10], Zamknij13false)


function zatrudnijPr1()
        local row guiGridListGetSelectedItemGUIEditorr.gridlist[1] )
        if row ~= -1 then
            local name guiGridListGetItemTextGUIEditorr.gridlist[1], row)
            if getPlayerFromNamename then
                guiSetVisibleGUIEditorr.window[2], false )
                showCursor(false)    
                triggerServerEvent"zatrudnijPr1"getLocalPlayer(), name)
            else
                outputChatBox"* Gracz nie istnieje."25500true )    
            end
        else
            outputChatBox"* Wybierz gracza, ktorego chcesz zatrudnic."25500true )    
        end
end
addEventHandler("onClientGUIClick",GUIEditorr.button[6], zatrudnijPr1false)

function zwolnijPr1()
        local name guiGetTextGUIEditorr.combobox[1] )
        if name ~= "--Wybierz--" then
            guiSetVisible(GUIEditorr.window[1], false)
            showCursor(false)    
            triggerServerEvent"zwolnijPr1"getLocalPlayer(), name )
        else
            outputChatBox"* Wybierz pracownika."2550)
        end    
end
addEventHandler("onClientGUIClick",GUIEditorr.button[2], zwolnijPr1false)

function akceptuj1()
        local name guiGetTextGUIEditorr.combobox[1] )
        local name1 guiGetTextGUIEditorr.combobox[2] )
        if name ~= "--Wybierz--" and name1 ~= "--Wybierz--" then
            triggerServerEvent"AkceptujPr1"getLocalPlayer(), name name1 )
        else
            outputChatBox"* Wybierz pracownika i Stopnie?."2550)
        end    
end
addEventHandler("onClientGUIClick",GUIEditorr.button[5], akceptuj1false)

function akceptuj11()
        local name guiGetTextGUIEditorr.combobox[1] )
        if name ~= "--Wybierz--" then
            guiSetVisible(GUIEditorr.window[1], false)
            guiSetVisible(GUIEditorr.window[3], true)
            setElementData(localPlayer,"Pra"name)
        else
            outputChatBox"* Wybierz pracownika."2550)
        end    
end
addEventHandler("onClientGUIClick",GUIEditorr.button[8], akceptuj11false)


function akceptuj12()
    local nr guiGetTextGUIEditorr.edit[1] )
    local data guiGetTextGUIEditorr.edit[2] )
    local name getElementData(localPlayer,"Pra")
    triggerServerEvent"AkceptujPra"getLocalPlayer(), namenrdata )
end
addEventHandler("onClientGUIClick",GUIEditorr.button[9], akceptuj12false)





SERVER

function uzupelnij1(player)
    local accName getAccountName getPlayerAccount player ) )      
    if accName == "adizygzak" then  
    local acl aclGetGroup"zarzadPSP" )
    local data = {}
    for i,v in ipairs(aclGroupListObjects(acl)) do
        if string.subv1) == "user." then
            local len string.len)
            local name3 string.subv6len )
            table.insertdataname3 )
        end
    end    
    triggerClientEventplayer"uruch1"rootdata )
    end
end
addCommandHandler("general"uzupelnij1)

function zatrudnij1name )
    local ppl getPlayerFromNamename )
    local ac getPlayerAccountppl )
    local acname getAccountNameac )
    local acl12 aclGetGroup"PSP" )
    if acl12 then
        aclGroupAddObjectacl12"user." .. acname )
        aclSave()
        aclReload()    
        outputChatBox"#FF0036[#919191PSP#FF0036]#919191Gracz #FF0036" .. getPlayerName(ppl) .. " #919191zostal zatrudniony pod nazwa #FF0036" .. acname .. "#919191."source255255255true )
        outputChatBox"#FF0036[#919191PSP#FF0036]#919191Zostales zatrudniony do Pa?stwowej Stra?y Po?arnej!"ppl255255255true )
    end
end

addEvent"zatrudnijPr1"true )
addEventHandler"zatrudnijPr1",rootzatrudnij1 )

function za1namenrdata )
    local names getAccount(name)
    setAccountData(names,"nrPol"nr)
    setAccountData(names,"dataPol"data)
    outputChatBox("#FF0036[#919191PSP#FF0036]#919191Zmieni?e? Graczowi #FF0036"..name.." #919191Nr Legitymacji na: #FF0036"..nr.." #919191oraz date wa?no?ci legitymacji do: #FF0036"..data.."#919191.",source255,255,255,true)
end

addEvent"AkceptujPra1"true )
addEventHandler"AkceptujPra1",rootza1 )

function zwolnij1name )
    local acl12 aclGetGroup"PSP" )
    if acl12 then
        aclGroupRemoveObjectacl12"user." .. name )
        aclSave()
        aclReload()    
        outputChatBox"#FF0036[#919191PSP#FF0036]#919191Gracz #FF0036" .. name .. " #919191zostal zwolniony."source255255255true )
    end
end

addEvent"zwolnijPr1"true )
addEventHandler"zwolnijPr1"getRootElement(), zwolnij1 )

function akceptuj1nameranga )
    local acc getAccount(name)
    if name then
    setAccountData(acc"StopienPol"ranga)
    outputChatBox"#FF0036[#919191PSP#FF0036]#919191Zmieni?e? stopie? #FF0036"..name.."#919191 na#FF0036 "..ranga.."#919191."source255255255true )
    else
    outputChatBox"#FF0036[#919191PSP#FF0036]#919191Gracza #FF0036" .. name .. "#919191 niema na serwerze."source255255255true )
    end
end

addEvent"AkceptujPr1"true )
addEventHandler"AkceptujPr1"getRootElement(), akceptuj1 )


DB3: https://imgur.com/a/auMNaMw

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-26, 21:17


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3210 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

dodaj skrypt do acl admin

Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
adisonboss
Wysłany: 2018-11-26, 21:23


adisonboss







Wiek: 23
Na forum: 3332 dni
Posty: 237

Piwa: 6

Respekt: 50

Dziena koksie dzia?a do zamkni?cia

Postaw piwo autorowi tego posta
 

 
Tagi: ani :: nie :: dodaje :: ani :: nie :: zwalnia :: acl
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku