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: 4471 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: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

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: 4471 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.9221191406, 1956.7215576172, 114.90427398682},
 {1925.3623046875, 1647.2025146484, 88.313179016113},
 {1908.8984375, 1380.689453125, 57.73804473877},
 {2098.48828125, 1082.0776367188, 71.320770263672},
 {2432.1525878906, 1116.4294433594, 105.09845733643},
 {2656.6215820313, 1326.6442871094, 96.147575378418},
 {2572.0190429688, 1714.6441650391, 73.054527282715},
 {2156.2463378906, 1960.9647216797, 83.467964172363},
 {1720.8698730469, 2025.5073242188, 71.787414550781},
 {1269.0887451172, 1807.2464599609, 67.807060241699},
 {894.74560546875, 1536.8321533203, 63.504974365234},
 {533.85668945313, 1383.7797851563, 81.52018737793},
 {304.93185424805, 1380.3084716797, 90.855979919434},
 {-52.76554107666, 1195.8686523438, 101.04379272461},
}
 
function rozpocznijheli(player, dim)
        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_marker, rozpocznijheli)
 
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.0, 255,0,0,255, player)
        praca_heli[player].blip = createBlipAttachedTo(praca_heli[player].cel, 41,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(p, money)
                local zdjh1 = getAccountData(konto,"zdjeciaH1")
 linijka 54:        zdjh1 = zdjh1 + 1
                setAccountData(konto,"zdjeciaH1",zdjh1)
                celresp(p)
        end
        addEventHandler("onMarkerHit",praca_heli[player].cel, wjechal)
end
 
 
 
function usun_pojazd (player, seat)
        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: 3784 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.9221191406, 1956.7215576172, 114.90427398682},
 {1925.3623046875, 1647.2025146484, 88.313179016113},
 {1908.8984375, 1380.689453125, 57.73804473877},
 {2098.48828125, 1082.0776367188, 71.320770263672},
 {2432.1525878906, 1116.4294433594, 105.09845733643},
 {2656.6215820313, 1326.6442871094, 96.147575378418},
 {2572.0190429688, 1714.6441650391, 73.054527282715},
 {2156.2463378906, 1960.9647216797, 83.467964172363},
 {1720.8698730469, 2025.5073242188, 71.787414550781},
 {1269.0887451172, 1807.2464599609, 67.807060241699},
 {894.74560546875, 1536.8321533203, 63.504974365234},
 {533.85668945313, 1383.7797851563, 81.52018737793},
 {304.93185424805, 1380.3084716797, 90.855979919434},
 {-52.76554107666, 1195.8686523438, 101.04379272461},
}
 
function rozpocznijheli(player, dim)
        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_marker, rozpocznijheli)
 
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.0, 255,0,0,255, player)
        praca_heli[player].blip = createBlipAttachedTo(praca_heli[player].cel, 41,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(p, money)
                local zdjh1 = getAccountData(konto,"zdjeciaH1")
                zdjh1 = (zdjh1 or 0) + 1
                setAccountData(konto,"zdjeciaH1",zdjh1)
                celresp(p)
        end
        addEventHandler("onMarkerHit",praca_heli[player].cel, wjechal)
end
 
 
 
function usun_pojazd (player, seat)
        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: 4471 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