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

Wysłany: 2019-11-19, 01:06


Kulegg







Wiek: 46
Na forum: 3125 dni
Posty: 283

Piwa: 20

Respekt: 50

Cze??,
Pr?buj? si? dalej uczy? lua, ale oczywi?cie jeszcze nie pojmuje jakie funkcje bra? i gdzie, no chyba ?e kojarze jakie? rzeczy, daltego narazie postanowi?em tworzy? jakie? ma?e skrypty z pomoc? linijek z innych skrypt?w, ale zrobi? tak aby to dzia?a?o i ?adnie wygl?da?o.

Borykam si? z problemem, ?e gdy rozpoczniemy prac?, daje nam randomowy marker, i po wej?ciu w ten marker powinna by? animacja "?cinania czego?" oraz po zako?czeniu animacji dostawania kasy, lecz po wej?ciu w marker nic si? nie dzieje, dlaczego?


--[[
   SkryptPraca zbieracza Marihuany.
   Autor SkryptuRynberto
   Nie masz prawa u?ycia kodu skryptu bez mojej zgody.
   Skrypt utworzony 09.11.2019
]]

createBlip(1102.35, -1189.5118.3246,2,0,0,0,0,0,275) -- Blip Pracy

local markerPraca createMarker(1102.35, -1189.5117.32"cylinder"2.013313313350) -- Marker rozpocz?cia pracy

local punktyMarycha = {
    {1106.44, -1218.1918.24},
    {1100.63, -1217.3418.24},
    {1095.28, -1216.7918.24},
}

function MarkerHit hitPlayermatchingDimension ) 
 setElementData(localPlayer"praca:hodowca"true)
 showCursor(true)
 setElementFrozen localPlayertrue)
 vehicle getPedOccupiedVehicle hitPlayer ) -- Je?li gracz b?dzie chciawej?? w marker i pracowaw aucieto nie b?dzie m?gtego zrobi?
    if hitPlayer ~= localPlayer then return end
        if source == markerPraca then
            HandleTheRendering() -- pokazuje obrazek
        end
end
addEventHandler("onClientMarkerHit"markerPracaMarkerHit)


function isMouseIn xywidthheight ) -- FunkcjaKlikuMysz?
    if ( not isCursorShowing( ) ) then
        return false
    end
    local sxsy guiGetScreenSize ( )
    local cxcy getCursorPosition ( )
    local cxcy = ( cx sx ), ( cy sy )
    
    return ( ( cx >= and cx <= width ) and ( cy >= and cy <= height ) )
end

function tworzenieMarkera() -- Funkcja randomowych punkt?wMarychy
    rnd math.random(1#punktyMarycha)
    markerRandomowy createMarker(punktyMarycha[rnd][1], punktyMarycha[rnd][2], punktyMarycha[rnd][3], 'cylinder'1.5)
    blipRandomowy createBlipAttachedTo(markerRandomowy41)
end


bindKey("mouse1""down", function() -- Bind pod menu obrazka
    if not getElementData(localPlayer"praca:hodowca") == true then return end
        if isMouseIn(73450716539then -- Przycisk Anuluj
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze anuluj
        setElementData(localPlayer"praca:hodowca"false)
        showCursor(false)
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
    end
    if isMouseIn(73444716539then -- Przycisk Rozpocznij
    if isPedInVehicle(localPlayerthen return end
    if getElementData(localPlayer"praca"then outputChatBox("Aktualnie ju? pracujesz!"25500) return end
        outputChatBox("Rozpoczynasz prac? Hodowcy."100100250)
        setElementData(localPlayer"praca""hodowca") -- Ustawia elementDate pracy
    toggleControl("sprint"false ) -- Wy??czenie sprintu podczas pracy
    toggleControl("jump"false ) -- Wy??czenie skakania podczas pracy
    toggleControl("crouch"false ) -- Wy??czenie skradania sipodczas pracy
        local skrzynia createObject(335000)
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze Rozpocznij
        setElementData(localPlayer"praca:hodowca"false) -- Usuniecie ElementDaty pracy
        showCursor(false)
        tworzenieMarkera()
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
        addEventHandler("onClientMarkerHit"markerRandomowy)

    end
end)

addEventHandler("onClientMarkerHit"markerRandomowy, function(elmd)    
            if not md or getElementType(el) ~= "player" then return end
            if el ~= localPlayer then return end

            if getPedOccupiedVehicle(elthen
            --triggerClientEvent(localPlayer"CreateBox"getRootElement(), "error""Nie mo?esz pracowa? b?d?c w poje?dzie...")
            triggerServerEvent ("car"localPlayer)
                return
            end

            destroyElement(blipRandomowy)
            setElementFrozen(eltrue)
            triggerServerEvent ("start2"localPlayer)
            triggerServerEvent ("animka"localPlayer)
            setTimer(function()
                setElementFrozen(elfalse)
                destroyElement(cel)
                destroyElement(skrzynia)
                --triggerServerEvent ("zb"localPlayer)
                triggerServerEvent ("zanimka"localPlayer)
                setElementData(localPlayer"praca:hodowca"false)
                local zarobek math.random(8000,10000)
                    outputChatBox("?ci??e? do woreczka maryche otrzymujesz "..zarobek.." PLN!"255255255)
                triggerServerEvent("givePlayerMoney"localPlayerzarobek)
                toggleControl("sprint"true )
                toggleControl("jump"true )
                toggleControl("crouch"true )
            end50001)
        end)


local screenWidth,screenHeight guiGetScreenSize() 


function obrazek ( )
    -- ScreenWidthScreenHeightPixel XPixel Y
    dxDrawImage screenWidth/650screenHeight/+ -3801300800'Obrazki/Hodowca.png' )
end

function stopobrazek ( )
    removeEventHandler("onClientRender"rootobrazek)
end

function HandleTheRendering ( )
    addEventHandler("onClientRender"rootobrazekend

fileDelete("Hodowca_c.lua")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 09:26


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Na samym pocz?tku pliku dodaj
Kod:

local markerRandomowy


W tym evencie od randomowego markera raz u?ywasz el a raz localPlayer. ?e wzgl?d?w estetycznych m?g?by? to poprawi?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 09:38


Kulegg







Wiek: 46
Na forum: 3125 dni
Posty: 283

Piwa: 20

Respekt: 50

Nadal po wej?ciu w marker losowego punktu nic si? nie dzieje, b??d w DB3:




--[[
   SkryptPraca zbieracza Marihuany.
   Autor SkryptuRynberto
   Nie masz prawa u?ycia kodu skryptu bez mojej zgody.
   Skrypt utworzony 09.11.2019
]]

local markerRandomowy

createBlip(1102.35, -1189.5118.3246,2,0,0,0,0,0,275) -- Blip Pracy

local markerPraca createMarker(1102.35, -1189.5117.32"cylinder"2.013313313350) -- Marker rozpocz?cia pracy

local punktyMarycha = {
    {1106.44, -1218.1918.24},
    {1100.63, -1217.3418.24},
    {1095.28, -1216.7918.24},
}

function MarkerHit hitPlayermatchingDimension ) 
 setElementData(localPlayer"praca:hodowca"true)
 showCursor(true)
 setElementFrozen localPlayertrue)
 vehicle getPedOccupiedVehicle hitPlayer ) -- Je?li gracz b?dzie chciawej?? w marker i pracowaw aucieto nie b?dzie m?gtego zrobi?
    if hitPlayer ~= localPlayer then return end
        if source == markerPraca then
            HandleTheRendering() -- pokazuje obrazek
        end
end
addEventHandler("onClientMarkerHit"markerPracaMarkerHit)


function isMouseIn xywidthheight ) -- FunkcjaKlikuMysz?
    if ( not isCursorShowing( ) ) then
        return false
    end
    local sxsy guiGetScreenSize ( )
    local cxcy getCursorPosition ( )
    local cxcy = ( cx sx ), ( cy sy )
    
    return ( ( cx >= and cx <= width ) and ( cy >= and cy <= height ) )
end

function tworzenieMarkera() -- Funkcja randomowych punkt?wMarychy
    rnd math.random(1#punktyMarycha)
    markerRandomowy createMarker(punktyMarycha[rnd][1], punktyMarycha[rnd][2], punktyMarycha[rnd][3], 'cylinder'1.5)
    blipRandomowy createBlipAttachedTo(markerRandomowy41)
end


bindKey("mouse1""down", function() -- Bind pod menu obrazka
    if not getElementData(localPlayer"praca:hodowca") == true then return end
        if isMouseIn(73450716539then -- Przycisk Anuluj
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze anuluj
        setElementData(localPlayer"praca:hodowca"false)
        showCursor(false)
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
    end
    if isMouseIn(73444716539then -- Przycisk Rozpocznij
    if isPedInVehicle(localPlayerthen return end
    if getElementData(localPlayer"praca"then outputChatBox("Aktualnie ju? pracujesz!"25500) return end
        outputChatBox("Rozpoczynasz prac? Hodowcy."100100250)
        setElementData(localPlayer"praca""hodowca") -- Ustawia elementDate pracy
    toggleControl("sprint"false ) -- Wy??czenie sprintu podczas pracy
    toggleControl("jump"false ) -- Wy??czenie skakania podczas pracy
    toggleControl("crouch"false ) -- Wy??czenie skradania sipodczas pracy
        local skrzynia createObject(335000)
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze Rozpocznij
        setElementData(localPlayer"praca:hodowca"false) -- Usuniecie ElementDaty pracy
        showCursor(false)
        tworzenieMarkera()
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
        addEventHandler("onClientMarkerHit"markerRandomowy)

    end
end)

addEventHandler("onClientMarkerHit"markerRandomowy, function(elmd)    
            if not md or getElementType(el) ~= "player" then return end
            if el ~= localPlayer then return end

            if getPedOccupiedVehicle(elthen
            --triggerClientEvent(localPlayer"CreateBox"getRootElement(), "error""Nie mo?esz pracowa? b?d?c w poje?dzie...")
            triggerServerEvent ("car"localPlayer)
                return
            end

            destroyElement(blipRandomowy)
            setElementFrozen(eltrue)
            triggerServerEvent ("start2"localPlayer)
            triggerServerEvent ("animka"localPlayer)
            setTimer(function()
                setElementFrozen(elfalse)
                destroyElement(cel)
                destroyElement(skrzynia)
                --triggerServerEvent ("zb"localPlayer)
                triggerServerEvent ("zanimka"localPlayer)
                setElementData(localPlayer"praca:hodowca"false)
                local zarobek math.random(8000,10000)
                    outputChatBox("?ci??e? do woreczka maryche otrzymujesz "..zarobek.." PLN!"255255255)
                triggerServerEvent("givePlayerMoney"localPlayerzarobek)
                toggleControl("sprint"true )
                toggleControl("jump"true )
                toggleControl("crouch"true )
            end50001)
        end)


local screenWidth,screenHeight guiGetScreenSize()  -- Ro?dzielczo??


function obrazek ( )
    -- ScreenWidthScreenHeightPixel XPixel Y
    dxDrawImage screenWidth/650screenHeight/+ -3801300800'Obrazki/Hodowca.png' ) -- Dodaje obrazek
end

function stopobrazek ( )
    removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
end

function HandleTheRendering ( )
    addEventHandler("onClientRender"rootobrazek)  -- Dzi?ki temu jest wy?wietlany obrazek
end

fileDelete("Hodowca_c.lua")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 09:50


Mikołajj







Wiek: 22
Na forum: 2885 dni
Posty: 303
Nick w MP: Mikołaj

Piwa: 132

Respekt: 91

Zobacz tak:

function MarkerHit hitPlayermatchingDimension ) 
    if el ~= localPlayer or not md then return end
    setElementData(localPlayer"praca:hodowca"true)
    showCursor(true)
    setElementFrozen localPlayertrue)
    vehicle getPedOccupiedVehicle hitPlayer ) -- Je?li gracz b?dzie chciawej?? w marker i pracowaw aucieto nie b?dzie m?gtego zrobi?
       if hitPlayer ~= localPlayer then return end
           if source == markerPraca then
               HandleTheRendering() -- pokazuje obrazek
           end
   end
   addEventHandler("onClientMarkerHit"markerPracaMarkerHit)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 10:02


Kulegg







Wiek: 46
Na forum: 3125 dni
Posty: 283

Piwa: 20

Respekt: 50

Teraz wgl si? nie wy?wietla nic nawet jak wejd? w marker rozpocz?cia pracy :-?
Przywr?ci?em do kodu wy?ej

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 14:05


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Usun to co dodales co ten go?ciu tutaj wys?a?. Doda? jedna linijke bez jakiegokolwiek my?lenia.
To: "??if?el?~=?localPlayer?or?not?md?then?return?end"

Ca?y ten event przenie? do funkcji tworzenieMarkera() i usun to co prosi?em ?eby? doda? (local na pocz?tku).

ST4GE, jakby? troch? my?la? to zauwazylbys brak zmiennej el. To samo jest ju? w kodzie ale ni?ej. Rozumiem jakby? to przeni?s? ale dodales drugi raz prawie to samo XD

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 16:37


Kulegg







Wiek: 46
Na forum: 3125 dni
Posty: 283

Piwa: 20

Respekt: 50

Zrobi?em, teraz nie pokazuje si? nic bo s? jakie? b??dy(marker rozpocz?cia pracy i wszystko znik?o)


--[[
   SkryptPraca zbieracza Marihuany.
   Autor SkryptuRynberto
   Nie masz prawa u?ycia kodu skryptu bez mojej zgody.
   Skrypt utworzony 09.11.2019
]]

local markerRandomowy

createBlip(1102.35, -1189.5118.3246,2,0,0,0,0,0,275) -- Blip Pracy

local markerPraca createMarker(1102.35, -1189.5117.32"cylinder"2.013313313350) -- Marker rozpocz?cia pracy

local punktyMarycha = {
    {1106.44, -1218.1918.24},
    {1100.63, -1217.3418.24},
    {1095.28, -1216.7918.24},
}

function MarkerHit hitPlayermatchingDimension ) 
 setElementData(localPlayer"praca:hodowca"true)
 showCursor(true)
 setElementFrozen localPlayertrue)
 vehicle getPedOccupiedVehicle hitPlayer ) -- Je?li gracz b?dzie chciawej?? w marker i pracowaw aucieto nie b?dzie m?gtego zrobi?
    if hitPlayer ~= localPlayer then return end
        if source == markerPraca then
            HandleTheRendering() -- pokazuje obrazek
        end
end
addEventHandler("onClientMarkerHit"markerPracaMarkerHit)


function isMouseIn xywidthheight ) -- FunkcjaKlikuMysz?
    if ( not isCursorShowing( ) ) then
        return false
    end
    local sxsy guiGetScreenSize ( )
    local cxcy getCursorPosition ( )
    local cxcy = ( cx sx ), ( cy sy )
    
    return ( ( cx >= and cx <= width ) and ( cy >= and cy <= height ) )
end

function tworzenieMarkera() -- Funkcja randomowych punkt?wMarychy
    rnd math.random(1#punktyMarycha)
    markerRandomowy createMarker(punktyMarycha[rnd][1], punktyMarycha[rnd][2], punktyMarycha[rnd][3], 'cylinder'1.5)
    blipRandomowy createBlipAttachedTo(markerRandomowy41)
    addEventHandler("onClientMarkerHit"markerRandomowy, function(elmd)    
            if not md or getElementType(el) ~= "player" then return end
            if el ~= localPlayer then return end

            if getPedOccupiedVehicle(elthen
            --triggerClientEvent(localPlayer"CreateBox"getRootElement(), "error""Nie mo?esz pracowa? b?d?c w poje?dzie...")
            triggerServerEvent ("car"localPlayer)
                return
            end

            destroyElement(blipRandomowy)
            setElementFrozen(eltrue)
            triggerServerEvent ("start2"localPlayer)
            triggerServerEvent ("animka"localPlayer)
            setTimer(function()
                setElementFrozen(elfalse)
                destroyElement(cel)
                destroyElement(skrzynia)
                --triggerServerEvent ("zb"localPlayer)
                triggerServerEvent ("zanimka"localPlayer)
                setElementData(localPlayer"praca:hodowca"false)
                local zarobek math.random(8000,10000)
                    outputChatBox("?ci??e? do woreczka maryche otrzymujesz "..zarobek.." PLN!"255255255)
                triggerServerEvent("givePlayerMoney"localPlayerzarobek)
                toggleControl("sprint"true )
                toggleControl("jump"true )
                toggleControl("crouch"true )
            end50001)
end


bindKey("mouse1""down", function() -- Bind pod menu obrazka
    if not getElementData(localPlayer"praca:hodowca") == true then return end
        if isMouseIn(73450716539then -- Przycisk Anuluj
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze anuluj
        setElementData(localPlayer"praca:hodowca"false)
        showCursor(false)
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
    end
    if isMouseIn(73444716539then -- Przycisk Rozpocznij
    if isPedInVehicle(localPlayerthen return end
    if getElementData(localPlayer"praca"then outputChatBox("Aktualnie ju? pracujesz!"25500) return end
        outputChatBox("Rozpoczynasz prac? Hodowcy."100100250)
        setElementData(localPlayer"praca""hodowca") -- Ustawia elementDate pracy
    toggleControl("sprint"false ) -- Wy??czenie sprintu podczas pracy
    toggleControl("jump"false ) -- Wy??czenie skakania podczas pracy
    toggleControl("crouch"false ) -- Wy??czenie skradania sipodczas pracy
        local skrzynia createObject(335000)
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze Rozpocznij
        setElementData(localPlayer"praca:hodowca"false) -- Usuniecie ElementDaty pracy
        showCursor(false)
        tworzenieMarkera()
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
        addEventHandler("onClientMarkerHit"markerRandomowy)

    end
end)


local screenWidth,screenHeight guiGetScreenSize()  -- Ro?dzielczo??


function obrazek ( )
    -- ScreenWidthScreenHeightPixel XPixel Y
    dxDrawImage screenWidth/650screenHeight/+ -3801300800'Obrazki/Hodowca.png' ) -- Dodaje obrazek
end

function stopobrazek ( )
    removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
end

function HandleTheRendering ( )
    addEventHandler("onClientRender"rootobrazek)  -- Dzi?ki temu jest wy?wietlany obrazek
end

fileDelete("Hodowca_c.lua")




Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 16:46


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Nie zamykasz eventu, kt?ry przenios?es. Znowu w bindKey jest o jednego enda za duzo.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 17:14


Kulegg







Wiek: 46
Na forum: 3125 dni
Posty: 283

Piwa: 20

Respekt: 50

Usun??em endy spod eventhandleru kt?ry przenios??m, potem usuwa?em po kolei endy w bindkeyu tak jak pisa?e? aby zobaczy? czy b?dzie dzia?a?, ale usuwa?em po kolei i w zadnym po usunieciu nie dzia?a?o.




--[[
   SkryptPraca zbieracza Marihuany.
   Autor SkryptuRynberto
   Nie masz prawa u?ycia kodu skryptu bez mojej zgody.
   Skrypt utworzony 09.11.2019
]]

local markerRandomowy

createBlip(1102.35, -1189.5118.3246,2,0,0,0,0,0,275) -- Blip Pracy

local markerPraca createMarker(1102.35, -1189.5117.32"cylinder"2.013313313350) -- Marker rozpocz?cia pracy

local punktyMarycha = {
    {1106.44, -1218.1918.24},
    {1100.63, -1217.3418.24},
    {1095.28, -1216.7918.24},
}

function MarkerHit hitPlayermatchingDimension ) 
 setElementData(localPlayer"praca:hodowca"true)
 showCursor(true)
 setElementFrozen localPlayertrue)
 vehicle getPedOccupiedVehicle hitPlayer ) -- Je?li gracz b?dzie chciawej?? w marker i pracowaw aucieto nie b?dzie m?gtego zrobi?
    if hitPlayer ~= localPlayer then return end
        if source == markerPraca then
            HandleTheRendering() -- pokazuje obrazek
        end
end
addEventHandler("onClientMarkerHit"markerPracaMarkerHit)


function isMouseIn xywidthheight ) -- FunkcjaKlikuMysz?
    if ( not isCursorShowing( ) ) then
        return false
    end
    local sxsy guiGetScreenSize ( )
    local cxcy getCursorPosition ( )
    local cxcy = ( cx sx ), ( cy sy )
    
    return ( ( cx >= and cx <= width ) and ( cy >= and cy <= height ) )
end

function tworzenieMarkera() -- Funkcja randomowych punkt?wMarychy
    rnd math.random(1#punktyMarycha)
    markerRandomowy createMarker(punktyMarycha[rnd][1], punktyMarycha[rnd][2], punktyMarycha[rnd][3], 'cylinder'1.5)
    blipRandomowy createBlipAttachedTo(markerRandomowy41)
    addEventHandler("onClientMarkerHit"markerRandomowy, function(elmd)    
            if not md or getElementType(el) ~= "player" then return end
            if el ~= localPlayer then return end

            if getPedOccupiedVehicle(elthen
            --triggerClientEvent(localPlayer"CreateBox"getRootElement(), "error""Nie mo?esz pracowa? b?d?c w poje?dzie...")
            triggerServerEvent ("car"localPlayer)
                return
            end

            destroyElement(blipRandomowy)
            setElementFrozen(eltrue)
            triggerServerEvent ("start2"localPlayer)
            triggerServerEvent ("animka"localPlayer)
            setTimer(function()
                setElementFrozen(elfalse)
                destroyElement(cel)
                destroyElement(skrzynia)
                --triggerServerEvent ("zb"localPlayer)
                triggerServerEvent ("zanimka"localPlayer)
                setElementData(localPlayer"praca:hodowca"false)
                local zarobek math.random(8000,10000)
                    outputChatBox("?ci??e? do woreczka maryche otrzymujesz "..zarobek.." PLN!"255255255)
                triggerServerEvent("givePlayerMoney"localPlayerzarobek)
                toggleControl("sprint"true )
                toggleControl("jump"true )
                toggleControl("crouch"true )
            end50001)


bindKey("mouse1""down", function() -- Bind pod menu obrazka
    if not getElementData(localPlayer"praca:hodowca") == true then return end
        if isMouseIn(73450716539then -- Przycisk Anuluj
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze anuluj
        setElementData(localPlayer"praca:hodowca"false)
        showCursor(false)
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
    end
    if isMouseIn(73444716539then -- Przycisk Rozpocznij
    if isPedInVehicle(localPlayerthen return end
    if getElementData(localPlayer"praca"then outputChatBox("Aktualnie ju? pracujesz!"25500) return end
        outputChatBox("Rozpoczynasz prac? Hodowcy."100100250)
        setElementData(localPlayer"praca""hodowca") -- Ustawia elementDate pracy
    toggleControl("sprint"false ) -- Wy??czenie sprintu podczas pracy
    toggleControl("jump"false ) -- Wy??czenie skakania podczas pracy
    toggleControl("crouch"false ) -- Wy??czenie skradania sipodczas pracy
        local skrzynia createObject(335000)
        setElementFrozen localPlayerfalse) -- Odmro?enie gracza je?li wybierze Rozpocznij
        setElementData(localPlayer"praca:hodowca"false) -- Usuniecie ElementDaty pracy
        showCursor(false)
        tworzenieMarkera()
        removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
        addEventHandler("onClientMarkerHit"markerRandomowy)

    end
end)


local screenWidth,screenHeight guiGetScreenSize()  -- Ro?dzielczo??


function obrazek ( )
    -- ScreenWidthScreenHeightPixel XPixel Y
    dxDrawImage screenWidth/650screenHeight/+ -3801300800'Obrazki/Hodowca.png' ) -- Dodaje obrazek
end

function stopobrazek ( )
    removeEventHandler("onClientRender"rootobrazek) -- Usuwa obrazek
end

function HandleTheRendering ( )
    addEventHandler("onClientRender"rootobrazek)  -- Dzi?ki temu jest wy?wietlany obrazek
end

fileDelete("Hodowca_c.lua")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-19, 18:30


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Kozak, musisz doda? te endy bo ich brakowa?o.
Teraz nie tylko event si? nie zamyka ale ca?a funkcja, w kt?rej jest.
Je?li zamykasz event, w kt?rym od razu masz funkcj? u?ywasz nawiasu przy endzie.
Je?li jest to oddzielna funkcja to samo end, bez nawias?w.

Postaw piwo autorowi tego posta
 

 
Tagi: wejściu :: marker :: nic :: się :: nie :: dzieje
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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