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

Wysłany: 2016-07-19, 18:03


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

addCommandHandler("ZdjeciaH1",
    function (player)
        local acc getPlayerAccount(player)
        outputChatBox("Posiadasz zrobione #fff000"..getAccountData(acc,"zdjeciaH1").."#ffffff, aby rozpocz?? test H2 musisz mie? ich #fff000 100#ffffff!",player,255,255,255,true)
    end
)


DB3:

Postaw piwo autorowi tego posta
 

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


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen, pod wybran? AccountData nie ma warto?ci jak ja zrozumia?em.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-19, 21:03


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Poprawi?em lecz dalej ten sam DB3

[ Dodano: 2016-07-19, 21:11 ]
Przy okazji pojawi? si? kolejny problem

-- Dam ca?y kod pracy :)

local rozpocznijheli_marker createMarker(1280.22,1555.24,09.82,"cylinder",5.0,0,255,0,255)
createBlipAttachedTo(rozpocznijheli_marker,52)
local praca_heli = { }
punkty = {
 {1474.92211914061956.7215576172114.90427398682},
 {1925.36230468751647.202514648488.313179016113},
 {1908.89843751380.68945312557.73804473877},
 {2098.488281251082.077636718871.320770263672},
 {2432.15258789061116.4294433594105.09845733643},
 {2656.62158203131326.644287109496.147575378418},
 {2572.01904296881714.644165039173.054527282715},
 {2156.24633789061960.964721679783.467964172363},
 {1720.86987304692025.507324218871.787414550781},
 {1269.08874511721807.246459960967.807060241699},
 {894.745605468751536.832153320363.504974365234},
 {533.856689453131383.779785156381.52018737793},
 {304.931854248051380.308471679790.855979919434},
 {-52.765541076661195.8686523438101.04379272461},
}
 
function rozpocznijheli(playerdim)
        local konto getPlayerAccount(player)
        if not getAccountData(konto,"H1L"then
            outputChatBox("Nie posiadasz licencji lotniczej H1",player)
        end
        if not dim then return end
        praca_heli[player] = {}
        praca_heli[player].heli createVehicle(469,1322.12,1570.00,10.85,0,360,270)
        setElementData(praca_heli[player].heli,"pojazd_wyjdz3",true)
        setElementData(praca_heli[player].heli,"pojazd_paliwo",math.random(50,100))
        setElementData(praca_heli[player].heli,"pojazd_opis","Praca dorywcza\nH1 - Robienie zdj??")
        setElementData(praca_heli[player].heli,"pojazd_przebieg",math.random(70000,80000))
        warpPedIntoVehicle(player,praca_heli[player].heli)
        celresp(player)

end
addEventHandler("onMarkerHit",rozpocznijheli_markerrozpocznijheli)
 
function celresp (player)
                if getElementType(player) ~= "player" then return false end
        local pkt punkty[math.random(1#punkty)]
        praca_heli[player].cel createMarker(pkt[1], pkt[2], pkt[3], "ring",2.0255,0,0,255player)
        praca_heli[player].blip createBlipAttachedTo(praca_heli[player].cel41,2,255,0,0,255,0,99999.0,player)
        local function wjechal (p)
                        if getElementType(p) ~= "player" then return false end
                local money math.random(25,30)
                local konto getPlayerAccount(player)
                destroyElement(praca_heli[p].cel)
                destroyElement(praca_heli[p].blip)
                triggerClientEvent(player,"sound",root)
                outputChatBox("Otrzymujesz "..money.." ₤, za zrobienie zdj?cia.",player)
                givePlayerMoney(pmoney)
                local zdjh1 getAccountData(konto,"zdjeciaH1")
 linijka 54:        zdjh1 zdjh1 1
                setAccountData(konto,"zdjeciaH1",zdjh1)
                celresp(p)
        end
        addEventHandler("onMarkerHit",praca_heli[player].celwjechal)
end
 
 
 
function usun_pojazd (playerseat)
        if seat == 0 then
                if source == praca_heli[player].heli and getElementData(source"pojazd_wyjdz3"then
                        outputChatBox("Skonczyles prace!"player)
                        destroyElement (praca_heli[player].heli)
                        destroyElement (praca_heli[player].blip)
                        destroyElement (praca_heli[player].cel)
                        praca_heli[player] = nil
                end
        end
end
addEventHandler ("onVehicleStartExit"getRootElement(), usun_pojazd)
 
function koniec (quitType)
        destroyElement (praca_heli[source].heli)
        destroyElement (praca_heli[source].blip)
        destroyElement (praca_heli[source].cel)
        praca_sweeper[source] = nil
end
addEventHandler("onPlayerQuit",getRootElement(),koniec)

addCommandHandler("ZdjeciaH1",
    function (player)
        local acc getPlayerAccount(player)
        outputChatBox("Posiadasz zrobione #fff000"..getAccountData(acc,"zdjeciaH1").."#ffffff, aby rozpocz?? test H2 musisz mie? ich #fff000 100#ffffff!",player,255,255,255,true)
    end
)
        



DB3: -- ten error linijka 1 ;d

[ Dodano: 2016-07-20, 10:44 ]
Mo?e kto? pom?c?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-21, 13:32


NeX.

Calm Story






Wiek: 26
Na forum: 3643 dni
Posty: 56
Nick w MP: NeX

Piwa: 36

Respekt: 140
Respekt: 140


local rozpocznijheli_marker createMarker(1280.22,1555.24,09.82,"cylinder",5.0,0,255,0,255)
createBlipAttachedTo(rozpocznijheli_marker,52)
local praca_heli = { }
punkty = {
 {1474.92211914061956.7215576172114.90427398682},
 {1925.36230468751647.202514648488.313179016113},
 {1908.89843751380.68945312557.73804473877},
 {2098.488281251082.077636718871.320770263672},
 {2432.15258789061116.4294433594105.09845733643},
 {2656.62158203131326.644287109496.147575378418},
 {2572.01904296881714.644165039173.054527282715},
 {2156.24633789061960.964721679783.467964172363},
 {1720.86987304692025.507324218871.787414550781},
 {1269.08874511721807.246459960967.807060241699},
 {894.745605468751536.832153320363.504974365234},
 {533.856689453131383.779785156381.52018737793},
 {304.931854248051380.308471679790.855979919434},
 {-52.765541076661195.8686523438101.04379272461},
}
 
function rozpocznijheli(playerdim)
        local konto getPlayerAccount(player)
        if not getAccountData(konto,"H1L"then
            outputChatBox("Nie posiadasz licencji lotniczej H1",player)
        end
        if not dim then return end
        praca_heli[player] = {}
        praca_heli[player].heli createVehicle(469,1322.12,1570.00,10.85,0,360,270)
        setElementData(praca_heli[player].heli,"pojazd_wyjdz3",true)
        setElementData(praca_heli[player].heli,"pojazd_paliwo",math.random(50,100))
        setElementData(praca_heli[player].heli,"pojazd_opis","Praca dorywcza\nH1 - Robienie zdj??")
        setElementData(praca_heli[player].heli,"pojazd_przebieg",math.random(70000,80000))
        warpPedIntoVehicle(player,praca_heli[player].heli)
        celresp(player)

end
addEventHandler("onMarkerHit",rozpocznijheli_markerrozpocznijheli)
 
function celresp (player)
                if getElementType(player) ~= "player" then return false end
        local pkt punkty[math.random(1#punkty)]
        praca_heli[player].cel createMarker(pkt[1], pkt[2], pkt[3], "ring",2.0255,0,0,255player)
        praca_heli[player].blip createBlipAttachedTo(praca_heli[player].cel41,2,255,0,0,255,0,99999.0,player)
        local function wjechal (p)
                        if getElementType(p) ~= "player" then return false end
                local money math.random(25,30)
                local konto getPlayerAccount(player)
                destroyElement(praca_heli[p].cel)
                destroyElement(praca_heli[p].blip)
                triggerClientEvent(player,"sound",root)
                outputChatBox("Otrzymujesz "..money.." ₤, za zrobienie zdj?cia.",player)
                givePlayerMoney(pmoney)
                local zdjh1 getAccountData(konto,"zdjeciaH1")
                zdjh1 = (zdjh1 or 0) + 1
                setAccountData(konto,"zdjeciaH1",zdjh1)
                celresp(p)
        end
        addEventHandler("onMarkerHit",praca_heli[player].celwjechal)
end
 
 
 
function usun_pojazd (playerseat)
        if seat == 0 then
                if source == praca_heli[player].heli and getElementData(source"pojazd_wyjdz3"then
                        outputChatBox("Skonczyles prace!"player)
                        destroyElement (praca_heli[player].heli)
                        destroyElement (praca_heli[player].blip)
                        destroyElement (praca_heli[player].cel)
                        praca_heli[player] = nil
                end
        end
end
addEventHandler ("onVehicleStartExit"getRootElement(), usun_pojazd)
 
function koniec (quitType)
        destroyElement (praca_heli[source].heli)
        destroyElement (praca_heli[source].blip)
        destroyElement (praca_heli[source].cel)
        praca_sweeper[source] = nil
end
addEventHandler("onPlayerQuit",getRootElement(),koniec)

addCommandHandler("ZdjeciaH1",
    function (player)
        local acc getPlayerAccount(player)
        outputChatBox("Posiadasz zrobione #fff000"..(getAccountData(acc,"zdjeciaH1") or 0).."#ffffff, aby rozpocz?? test H2 musisz mie? ich #fff000 100#ffffff!",player,255,255,255,true)
    end
)


Prosz?, powinno dzia?a?.

Podpis
Wykonuję zasoby programistyczne w języku lua. Osoby zainteresowane proszone są o kontakt.
[email protected]
Postaw piwo autorowi tego posta
 

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


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Thx ! Do zamkni?cia!

Postaw piwo autorowi tego posta
 

 
Tagi: komenda
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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