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, 23:44


Fl!k







Wiek: 26
Na forum: 3733 dni
Posty: 162

Piwa: 18

Respekt: 50

Witam , potrzebuje pomocy! Chcia?bym zrobi? syrene gdy otworzy sie jedna ze skrzy? :/ znalaz?em podobny skrypt pr?buje cos zrobic ale niezbyt wychodzi ;d
ZA POMOC DAJE PIWKO :piwo:

ZNALEZIONE SERVER:
    triggerClientEvent("serenaON", root, boxCol[i])
    setTimer(updateBox, 2520000, 1) -- 45 минут

CLIENT:
addEvent("serenaON", true)
addEventHandler("serenaON", root, function(obj)
    if obj then
        local x,y,z = getElementPosition( obj )
        sirena = playSound3D("sirena.mp3", x, y, z, true)
        setSoundMaxDistance(sirena, 10000)
        attachElements(sirena, obj)
        setTimer(stopSoundSirena, 30000, 1, sirena)
    end
end)

function stopSoundSirena (sirena)
    if isElement( sirena ) then
        destroyElement(sirena)
    end
end


KOD DO KT?REGO CHCE WKLEI?:
local ZoneBoxesSitess = {
    {292.81, 1814.71, 1.01-0.6},
};

function createZoneBoxesSite()
    local plr = getElementsByType('player')
    if isElement(cargoColl) then
        destroyElement(getElementData(cargoColl,"parent"));
        destroyElement(cargoColl);
    end
    local nr = math.random(1, 6);
    local x,y,z = ZoneBoxesSitess[nr][1], ZoneBoxesSitess[nr][2], ZoneBoxesSitess[nr][3];
    for _,v in ipairs(getElementsByType("player")) do
        if (getElementData(v, 'pcz:language') == 'PL') then
            outputChatBox(" ",v,255,255,255,true)
            outputChatBox ("tu cos bedzie",v,255,255,255,true)
            outputChatBox ("tu cos bedzie",v,255,255,255,true)
            outputChatBox(" ",v,255,255,255,true)
        end
    end

    cargobobb2 = createObject(1854, x, y, z)
    setElementFrozen(cargobobb2, true);
    end

        cargoColl = createColSphere(x, y, z+0.2, 1.3);
        setElementData(cargoColl, "parent", cargobobb2);
        setElementData(cargoColl, "helicrash", true);
        setElementData(cargoColl, "MAX_Slots", 0);

        setElementData(cargoColl, "zapalniczka", math.random(0, 3) + math.random(1, 3))

end
end

function create()
    local plr = getElementsByType('player')
    if #plr >= playersNeed then
        createZoneBoxesSite()
    end
end

createZoneBoxesSite()
setTimer(create, math.random(2400000, 3600000), 0)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
borsuk
Wysłany: 2023-01-05, 12:16


Norbert1234

Nie umiem w LUA






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

Piwa: 244

Respekt: 60

nie lepiej
playSound


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
borsuk
Tagi: paczki
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Paczki Odpowiedz do tematu

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