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

Wysłany: 2016-07-30, 20:22


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

Rookspack, ?adnych b??d?w? ... wchodzisz w dobry marker?. W kodzie wszystko jest ok :/

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:25


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

marcin778, W dobry marker. Ja ju? te x,y,z znam na pami?? XD. Z ciekawo?ci czy zadzia?a da?em rozmiar markeru i nic. Przetestuj u siebie byle gdzie. Zobacz czy u Ciebie b?dzie dzia?a? jak tak to podaj mi ten kod.

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:26


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Rookspack, zobacz ten kod:
resourceRoot getResourceRootElement(getThisResource()) 

lok2 = {
{-1836.6999511719,111.59999847412,14.10000038147},
{948.70001220703,1720,7.9000000953674},
}

uzupe?nij = {
--Uzupe?nij marekry gdzie ma uzupe?nia?.
}

function markery ()
for k,v in ipairs(lok2) do
local marker createMarker(v[1], v[2],v[3], "cylinder"1.52552550170)
setElementData(marker"Praca:Smieciarki:Start"true)
end
end
addEventHandler("onResourceStart"resourceRootmarkery)

function uzupelnic ()
    for iv in ipairs(uzupelnic) do
        local marker createMarker(v[1], v[2],v[3], "cylinder"1.52552550170)
        setElementData(marker"Praca:Smieciarki:Value"true)
    end
end
addEventHandler("onResourceStart"resourceRootmarkery)

local zaplata -- ilo?? wynagrodzenia za ka?dy kilogram ?mieci

function start_Praca (hitElement)
    if getElementData(source"Praca:Smieciarki:Start")    then else return end
    if getElementType(hitElement) == "player" then  else return end
        local auto getPedOccupiedVehicle(hitElement)
        if not auto then
    local pojazd createVehicle(408, -1859.9000244141124.9000015258815.899999618530)
    warpPedIntoVehicle(hitElementpojazd)
    setElementData(pojazd"zapelnienie"0)
    setElementData(pojazd"pojazd_opis""Praca ?mierciarki")
    setElementData(pojazd"pojazd_opis""Zape?nienie 0%")
    elseif auto then
        local smieci getElementData(auto"zapelnienie")
            if smieci == 100 then
            givePlayerMoney(hitElement100*zaplata)
            outputChatBox("Roz?adowa?e? ?mieciarke. Dostajesz "..100*zaplata.."$"hitElement)
            end
        end
end
addEventHandler("onMarkerHit"getRootElement(), start_Praca)

function uzupelnic_Marker (hitElement)
    if getElementData(source"Praca:Smieciarki:Start"then else return end
    if getElementType(hitElement) == "player" then  else return end
    local pojazd getPedOccupiedVehicle(hitElement)
    if pojazd then else return end
    setElementData(pojazd"zapelnienie"getElementData(pojazd"zapelnienie") + )
        setElementFrozen(pojazdtrue)
        setTimer ( function()
            setElementFrozen(pojazdfalse)
        end5000)
end
addEventHandler("onMarkerHit"getRootElement(), uzupelnic_Marker)


Uzupe?nij markery gdzie ma uzupe?nia? ?mieciark?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:27


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

lok2 = {
{-1836.6999511719,111.59999847412,14.10000038147},
{948.70001220703,1720,7.9000000953674},
}

function markery ()
for k,v in ipairs(lok2) do
local marker createMarker(v[1], v[2],v[3], "cylinder"1.52552550170)
setElementData(marker"Praca:Smieciarki:Start"true)
end
end
addEventHandler("onResourceStart"resourceRootmarkery)

local marker_Start createMarker(xyz"cylinder"1.52552550170)

function MarkerHit (hitElement)
    if getElementData(source"Praca:Smieciarki:Start")    then else return end
    if getElementType(hitElement) == "player" then  else return end
    local pojazd createVehicle(408, -1859.9000244141124.9000015258815.899999618530)
    warpPedIntoVehicle(hitElementpojazd)
    setElementData(pojazd"zapelnienie"0)
    setElementData(pojazd"pojazd_opis""Praca ?mierciarki")
local ile getElementData(pojazd"zapelnienie") or 0
    setElementData(pojazd"pojazd_opis""Zape?nienie: "..ile.."%",true)
end
addEventHandler("onMarkerHit"getRootElement(), MarkerHit)

local markerz createMarker(x,y,z,"cylinder",1,255,255,255) -- marker dajacy 100 %


function sto(hitElement)
 if getElementData(source"Praca:Smieciarki:Start")    then else return end
    if getElementType(hitElement) == "player" then  else return end
local pojazd2 getPedOccupiedVehicle(hitElement)
if getElementData(pojazd2"zapelnienie") <= 100 then
setElementData(pojazd2"zapelnienie"100)
outputChatBox("dodano",hitElement)
end
end
addEventHandler("onMarkerHit",markerzsto)


[ Dodano: 2016-07-30, 20:29 ]
Kod luki123luki123, musi ci dzia?a?. :)

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:31


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Je?eli m?j kod nie podzia?a to sam go sprawdz?, a my?l? ?e ?adnego b??du nie ma.

[ Dodano: 2016-07-30, 20:32 ]
Chyba zaraz napisz? skrypt taki na gtao.pl od zera.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:33


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

luki123luki123, No w?a?nie DB3: '=' excepted near '


uzupe?nij = {
{-184011614.10}
}

?? ?

[ Dodano: 2016-07-30, 20:34 ]
marcin778, Co do twojego kodu takie DB3:



Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:34


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Rookspack, czekaj daj 5 minut

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:36


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

Bo?e m?j my siedzimy nad tym 6h ;d.

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:39


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

dzia?a 100%
resourceRoot getResourceRootElement(getThisResource()) 

lok2 = {
{-1836.6999511719,111.59999847412,14.10000038147},
{948.70001220703,1720,7.9000000953674}
}

uzupelnij = {
    {-184011614.10}
}

function markery ()
for k,v in ipairs(lok2) do
local marker createMarker(v[1], v[2],v[3], "cylinder"1.52552550170)
setElementData(marker"Praca:Smieciarki:Start"true)
createBlipAttachedTo(marker5)
end
end
addEventHandler("onResourceStart"resourceRootmarkery)

function uzupelnic ()
    for iv in ipairs(uzupelnij) do
        local marker createMarker(v[1], v[2],v[3], "cylinder"1.52552550170)
        createBlipAttachedTo(marker3)
        setElementData(marker"Praca:Smieciarki:Value"true)
    end
end
addEventHandler("onResourceStart"resourceRootuzupelnic)

local zaplata -- ilo?? wynagrodzenia za ka?dy kilogram ?mieci

function start_Praca (hitElement)
    if getElementData(source"Praca:Smieciarki:Start")    then else return end
    if getElementType(hitElement) == "player" then  else return end
        local auto getPedOccupiedVehicle(hitElement)
        if not auto then
    local pojazd createVehicle(408, -1859.9000244141124.9000015258815.899999618530)
    warpPedIntoVehicle(hitElementpojazd)
    setElementData(pojazd"zapelnienie"0)
    setElementData(pojazd"pojazd_opis""Praca ?mierciarki")
    setElementData(pojazd"pojazd_opis""Zape?nienie 0%")
    elseif auto then
        local smieci getElementData(auto"zapelnienie")
            if smieci == 100 then
            givePlayerMoney(hitElement100*zaplata)
            outputChatBox("Roz?adowa?e? ?mieciarke. Dostajesz "..100*zaplata.."$"hitElement)
            end
        end
end
addEventHandler("onMarkerHit"getRootElement(), start_Praca)

function uzupelnic_Marker (hitElement)
    if getElementData(source"Praca:Smieciarki:Start"then else return end
    if getElementType(hitElement) == "player" then  else return end
    local pojazd getPedOccupiedVehicle(hitElement)
    if pojazd then else return end
    setElementData(pojazd"zapelnienie"getElementData(pojazd"zapelnienie") + )
        setElementFrozen(pojazdtrue)
        setTimer ( function()
            setElementFrozen(pojazdfalse)
        end5000)
end
addEventHandler("onMarkerHit"getRootElement(), uzupelnic_Marker)


[ Dodano: 2016-07-30, 20:40 ]
PS: kto siedzi ten siedzi :D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:42


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

luki123luki123, Mi nie daje zape?nienia.

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:45


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

daje sprawdzi?em w tym markerze w LV daje zape?nienie bo on jest do uzupe?nienia a tamte tylko do roz?adunku oraz do dawania pojazdu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:48


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

luki123luki123, Dziwne, jestem w LV freeza mam i nie zape?nia mi si?.

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:51


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Rookspack, tylko napis ci si? nie zmienia czekaj.
resourceRoot getResourceRootElement(getThisResource()) 

lok2 = {
{-1836.6999511719,111.59999847412,14.10000038147},
{948.70001220703,1720,7.9000000953674}
}

uzupelnij = {
    {-184011614.10}
}

function markery ()
for k,v in ipairs(lok2) do
local marker createMarker(v[1], v[2],v[3], "cylinder"1.52552550170)
setElementData(marker"Praca:Smieciarki:Start"true)
createBlipAttachedTo(marker5)
end
end
addEventHandler("onResourceStart"resourceRootmarkery)

function uzupelnic ()
    for iv in ipairs(uzupelnij) do
        local marker createMarker(v[1], v[2],v[3], "cylinder"1.52552550170)
        createBlipAttachedTo(marker3)
        setElementData(marker"Praca:Smieciarki:Value"true)
    end
end
addEventHandler("onResourceStart"resourceRootuzupelnic)

local zaplata -- ilo?? wynagrodzenia za ka?dy kilogram ?mieci

function start_Praca (hitElement)
    if getElementData(source"Praca:Smieciarki:Start")    then else return end
    if getElementType(hitElement) == "player" then  else return end
        local auto getPedOccupiedVehicle(hitElement)
        if not auto then
    local pojazd createVehicle(408, -1859.9000244141124.9000015258815.899999618530)
    warpPedIntoVehicle(hitElementpojazd)
    setElementData(pojazd"zapelnienie"0)
    setElementData(pojazd"pojazd_opis""Praca ?mierciarki")
    setElementData(pojazd"pojazd_opis""Zape?nienie 0%")
    elseif auto then
        local smieci getElementData(auto"zapelnienie")
            if smieci == 100 then
            givePlayerMoney(hitElement100*zaplata)
            outputChatBox("Roz?adowa?e? ?mieciarke. Dostajesz "..100*zaplata.."$"hitElement)
            end
        end
end
addEventHandler("onMarkerHit"getRootElement(), start_Praca)

function uzupelnic_Marker (hitElement)
    if getElementData(source"Praca:Smieciarki:Start"then else return end
    if getElementType(hitElement) == "player" then  else return end
    local pojazd getPedOccupiedVehicle(hitElement)
    if pojazd then else return end
    setElementData(pojazd"zapelnienie"getElementData(pojazd"zapelnienie") + )
        setElementFrozen(pojazdtrue)
        setTimer ( function()
            setElementFrozen(pojazdfalse)
        end5000)
        setElementData(pojazd"pojazd_opis""Praca ?mierciarki")
    setElementData(pojazd"pojazd_opis""Zape?nienie "..getElementData(pojazd"zapelnienie").."%")
end
addEventHandler("onMarkerHit"getRootElement(), uzupelnic_Marker)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-30, 20:54


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

luki123luki123, Tera dzia?a. Dzi?ki wielkie! 6h to robili?my XD. :piwo: :piwo: :piwo: :piwo:

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Tagi: jak :: zrobić :: zapełnienie :: np. :: śmieciarki?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak zrobić zapełnienie np. śmieciarki? 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