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

Wysłany: 2017-03-08, 19:52


karat1







Wiek: 25
Na forum: 3900 dni
Posty: 95
Nick w MP: Karatos

Piwa: 4

Respekt: 50

Ostrzeżeń: 60%
Witajcie ot?? mam skrypt kt?ry nie jest pod acl czy wiecie jak go zrobic /lua

local screenW, screenH = guiGetScreenSize(  )

-- safditems

GUIEditor = {
    button = {},
    window = {}
}
GUIEditor.window[1] = guiCreateWindow(0.39, 0.01, 0.22, 0.14, "Przedmioty w poje?dzie", true)
guiWindowSetSizable(GUIEditor.window[1], false)

GUIEditor.button[1] = guiCreateButton(0.07, 0.16, 0.85, 0.24, "Torba R1", true, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(0.07, 0.41, 0.85, 0.24, "Nosze", true, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(0.07, 0.65, 0.85, 0.24, "Deska Ortopedyczna", true, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
guiSetVisible(GUIEditor.window[1],false)

function isPlayerInFraction(plr,fractionname,checkduty)
    if getElementData(plr,"temp:fraction") and getElementData(plr,"temp:fraction")==fractionname then
        if not checkduty then
        return true
    else
        if getElementData(plr,"temp:fractionduty") then
            return true
        end
    end
    end
    return false
end

function canTakeItems()
    for key, value in ipairs(getElementsByType( "colshape", resourceRoot ) ) do
        if getElementData(value,"col:lsmcitems") then
            if isElementWithinColShape( localPlayer,     value ) then
                if not isPedInVehicle( localPlayer ) then
                    if isPlayerInFraction(localPlayer,"Panstwowa Straz Pozarna",true) then
                    return true
                end
            end
            end
        end
    end
    return false
end

addEventHandler("onClientRender",root,function ()
if canTakeItems() then
    if (not guiGetVisible(GUIEditor.window[1])) and (not getElementData(localPlayer,"lsmc:taking")) then
        showCursor(true,false)
        guiSetVisible(GUIEditor.window[1],true)
    end
else
    if guiGetVisible(GUIEditor.window[1]) or getElementData(localPlayer,"lsmc:taking") then
showCursor(false)
        guiSetVisible(GUIEditor.window[1],false)

    end
end
    end)


addEventHandler("onClientGUIClick",resourceRoot,function ()
    if source ~= GUIEditor.window[1] then
        triggerServerEvent("onTryTakeLSMCItem",root,guiGetText(source))
    end
    end)


Komentarz HazeMaFaze dodany 2017-03-08, 19:57Dodano tagi lua
Ostatnio zmieniony przez _Haze 2017-03-08, 19:57, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-08, 19:59


_Haze

Peace Yo!






Wiek: 25
Na forum: 4325 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

Musisz po stronie serwera nadawa? element date rangi i po stronie clienta sprawdza? t? element date

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-09, 06:50


karat1







Wiek: 25
Na forum: 3900 dni
Posty: 95
Nick w MP: Karatos

Piwa: 4

Respekt: 50

Ostrzeżeń: 60%
Nie rozumiem mo?na troche ja?niej

Postaw piwo autorowi tego posta
 

 
Tagi: jak :: zrobic :: pod :: 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 » Jak to zrobic pod acl 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