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

Wysłany: 2023-01-02, 21:42


Norbert1234

Nie umiem w LUA






Wiek: 22
Na forum: 3988 dni
Posty: 319
Nick w MP: Gusterowskyy

Piwa: 242

Respekt: 60


function getPointFromDistanceRotation(x,y,dist,angle)
    local a=math.rad(90-angle);
    local dx=math.cos(a) * dist;
    local dy=math.sin(a) * dist;
    return x+dxy+dy;
end

addCommandHandler("ustawklatke", function(plr)
    if getElementData(plr"user:duty")  then
        local x,y,z=getElementPosition(plr)
        local dim=getElementDimension(plr)
        local int=getElementInterior(plr)

        local kratki=createObject(971x,y,z-0.92700180)
        setElementData(kratki,"owner",getPlayerName(plr))
        setElementDimension(kratki,dim)
        setElementInterior(kratki,int)

        local kratki=createObject(971x,y,z+62700180)
        setElementData(kratki,"owner",getPlayerName(plr))
        setElementDimension(kratki,dim)
        setElementInterior(kratki,int)

        local kratki=createObject(971x,y+3.5,z+2.5000)
        setElementData(kratki,"owner",getPlayerName(plr))
        setElementDimension(kratki,dim)
        setElementInterior(kratki,int)

        local kratki=createObject(971x-4.5,y,z+2.500270)
        setElementData(kratki,"owner",getPlayerName(plr))
        setElementDimension(kratki,dim)
        setElementInterior(kratki,int)

        local kratki=createObject(971x,y-3.5,z+2.500180)
        setElementData(kratki,"owner",getPlayerName(plr))
        setElementDimension(kratki,dim)
        setElementInterior(kratki,int)

        local kratki=createObject(971x+4,y,z+2.500270)
        setElementData(kratki,"owner",getPlayerName(plr))
        setElementDimension(kratki,dim)
        setElementInterior(kratki,int)

        outputChatBox("* Stworzy?es(a?) klatk?."plr)
    end
end)

addCommandHandler("usunklatke", function(plr)
    if getElementData(plr"user:duty"then
        for i,v in ipairs(getElementsByType("object")) do
            if getElementData(v,"owner") == getPlayerName(plrthen
                destroyElement(v)
            end
        end
    end
end)




function zabezpieczenie(plr)

     if getElementData(plr"user:duty"then
        for i,v in ipairs(getElementsByType("object")) do
            if getElementData(v,"owner") == getPlayerName(plrthen
                destroyElement(v)
            end
        end
    end
end




addEventHandler("onPlayerQuit"rootzabezpieczenie)


addCommandHandler("usunklatke"zabezpieczenie)



po wyj?ciu nie usuwa.

ta linijka ma b??d

addEventHandler("onPlayerQuit", root, zabezpieczenie)
got string "quit" getplayername

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
borsuk
Wysłany: 2023-01-02, 23:03


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Argument od zdarzenia "onPlayerQuit" to "quitType" okre?laj?cy pow?d opuszczenia serwera. Graczem, kt?ry opu?ci? serwer jest ?r?d?o zdarzenia, czyli source.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 2 piw(a):
Norbert1234, borsuk
Wysłany: 2023-01-03, 22:13


Norbert1234

Nie umiem w LUA






Wiek: 22
Na forum: 3988 dni
Posty: 319
Nick w MP: Gusterowskyy

Piwa: 242

Respekt: 60

@LOCK

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
borsuk
Tagi: klatka
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