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

Wysłany: 2018-10-01, 19:54


czlowiekjaja







Wiek: 20
Na forum: 2850 dni
Posty: 76
Nick w MP: czlowiekjaja

Piwa: 324

Respekt: 50

Mam taki kod:


--tworzenie colsphere
local colshape createColSphere(-138.174851079.5855719.152915)

addEventHandler("onClientGUIClick"resourceRoot, function()
    local pojazdy=getElementsWithinColShape(colshape,"vehicle")
    if source == RH1.btncloseactive then
        guiSetVisible(RH1.winfalse)
    elseif source == RH1.btnclosetxtactive then
        guiSetVisible(RH1.winfalse)
    elseif source == RH1.btnmntactive then
        setElementData(pojazdy"RH1MOUNTED"true)
    elseif source == RH1.btnmnttxtactive then
        setElementData(pojazdy"RH1MOUNTED"true)
    elseif source == RH1.btndemntactive then
        setElementData(pojazdy"RH1MOUNTED"false)
    elseif source == RH1.btndemnttxtactive then
        setElementData(pojazdy"RH1MOUNTED"false)
    end
end)
i jak nada? t? element date dla pojazdu w tym colsphere?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-01, 21:18


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

Returns a table containing all the elements inside the colshape, of the specified type. Returns an empty table if there are no elements inside. Returns false if the colshape is invalid.


Ta funkcja zwraca Ci tabel?, wi?c w p?tle zr?b i nadajesz p??niej na auto normalnie z p?tli

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-02, 21:28


Eitho







Wiek: 24
Na forum: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5


--tworzenie colsphere
local colshape createColSphere(-138.174851079.5855719.152915)

addEventHandler("onClientGUIClick"resourceRoot, function()
    local tab=getElementsWithinColShape(colshape,"vehicle") -- tabela
    if source == RH1.btncloseactive then
        guiSetVisible(RH1.winfalse)
    elseif source == RH1.btnclosetxtactive then
        guiSetVisible(RH1.winfalse)
    elseif source == RH1.btnmntactive then
        for _pojazdy in pairs(tab) do
            setElementData(pojazdy"RH1MOUNTED"true)
        end
    elseif source == RH1.btnmnttxtactive then
        for _pojazdy in pairs(tab) do
            setElementData(pojazdy"RH1MOUNTED"true)
        end
    elseif source == RH1.btndemntactive then
        for _pojazdy in pairs(tab) do
            setElementData(pojazdy"RH1MOUNTED"false)
        end
    elseif source == RH1.btndemnttxtactive then
        for _pojazdy in pairs(tab) do
            setElementData(pojazdy"RH1MOUNTED"false)
        end
    end
end)



Mo?na te? tak, ale pierwszy spos?b jest bardziej optymalny





Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Tagi: ustawienie :: element :: daty :: dla :: pojazdu :: colsphere
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