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: 24
Na forum: 3758 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 screenWscreenH guiGetScreenSize(  )

-- safditems

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

GUIEditor.button[1] = guiCreateButton(0.070.160.850.24"Torba R1"trueGUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour""FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(0.070.410.850.24"Nosze"trueGUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour""FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(0.070.650.850.24"Deska Ortopedyczna"trueGUIEditor.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 keyvalue in ipairs(getElementsByType"colshape"resourceRoot ) ) do
        if getElementData(value,"col:lsmcitems"then
            if isElementWithinColShapelocalPlayer,     value then
                if not isPedInVehiclelocalPlayer then
                    if isPlayerInFraction(localPlayer,"Panstwowa Straz Pozarna",truethen
                    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[1then
        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: 24
Na forum: 4184 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: 24
Na forum: 3758 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 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