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

Wysłany: 2018-07-30, 21:07


BlackSkorpion

Uczę się LUA






Wiek: 25
Na forum: 3471 dni
Posty: 53
Nick w MP: Black

Piwa: 371

Respekt: 50

mam problem z prac? kuriera powiem, ze ta praca to jest orginalna wersja np kupion?.
kod lua
--[[
    AutorMalentas
]]
 
local sxsy guiGetScreenSize()
local okno1 false
local niesie false
local ulepszenia false
local alpha 250
local ile 0
local trasa " "
 
local oddanie = {}
local oddanieped = {}
local boddanie = {}
 
local pracodawca createPed(1531042.48, -1444.9123.1859.347457885742)
setElementData(pracodawca"name""Pracodawca")
setElementDimension(pracodawca15)
setElementFrozen(pracodawcatrue)
local rozpoczecie createMarker(1040.02, -1444.1123.18-.95"cylinder"1255255255)
setElementData(rozpoczecie"praca"true)
setElementDimension(rozpoczecie15)
 
 
addEventHandler("onClientMarkerHit"rozpoczecie, function(gracz)
    if gracz ~= localPlayer then return end
    if getElementData(localPlayer"block:prawko"then exports["np-notyfikacje"]:noti("Posiadasz zabrane prawo jazdy kat. A, B, C""error") return end
    if getElementData(localPlayer"pracuje"then
        if getElementData(localPlayer"pracuje") ~= "kurier" then exports["np-notyfikacje"]:noti("Posiadasz inn? aktywn? prace!""error") return end
    end
    addEventHandler("onClientRender"rootguistart)
    okno1 true
    showCursor(true)
    triggerServerEvent("pokazTopke:kurier:source"localPlayer)
end)
 
local font dxCreateFont("cz.ttf"10)
local font2 dxCreateFont("cz.ttf"12)
 
local pracownicy = { }
 
local listaulepszen = {
    {"Sprint""Dzi?ki temu ulepszeniu mo?esz biega? z paczk?"300"dolar.png"},
    {"Szybszy pojazd""Dzi?ki temu ulepszeniu tw?j pojazd je?dzi szybciej"500"dolar.png"},
    {"Zarobek +5%""Dzi?ki temu ulepszeniu zarabiasz wi?cej o 5%"700"dolar.png"},
}
 
 
function guistart()
    dxDrawImage(scale_x(402), scale_y(251), scale_x(637), scale_y(399), ":np-gui/grafiki/tlo.png"000tocolor(255255255255), false)
    if ulepszenia == false then
       local punkty getElementData(localPlayer"kpunkty") or 0
       local zlecenia getElementData(localPlayer"kzlecenia") or 0
        shadowText("Praca dostawcy paczek"scale_x(401), scale_y(251), scale_x(1039), scale_y(295), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        --shadowText("Wymagania:\nBRAK"scale_x(401), scale_y(295), scale_x(719), scale_y(449), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        shadowText("Wykonane zlecenia: "..zlecenia.."\nPunkty: "..punkty..""scale_x(402), scale_y(510), scale_x(719), scale_y(646), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        shadowText("Top pracownicy:"scale_x(719), scale_y(295), scale_x(1036), scale_y(329), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        dxDrawImage(scale_x(415), scale_y(310), scale_x(304), scale_y(175), ":np-magazynier/grafiki/bg3.png"000tocolor(255255255255), false)
        shadowText("Wymagania: Kategoria C\n34 poziom "scale_x(415), scale_y(500), scale_x(719), scale_y(548), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        if mysz(scale_x(889), scale_y(592), scale_x(139), scale_y(44)) then
           dxDrawImage(scale_x(889), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_on.png"000tocolor(255255255255), false)
        else
           dxDrawImage(scale_x(889), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_off.png"000tocolor(255255255255), false)
        end
        if mysz(scale_x(729), scale_y(592), scale_x(139), scale_y(44)) then
           dxDrawImage(scale_x(729), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_on.png"000tocolor(255255255255), false)
        else
           dxDrawImage(scale_x(729), scale_y(592), scale_x(139), scale_y(44), ":np-gui/grafiki/button_off.png"000tocolor(255255255255), false)
        end
        if getElementData(localPlayer"pracuje") == "kurier" then
           shadowText("Zako?cz prace"scale_x(728), scale_y(591), scale_x(868), scale_y(636), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        else
           shadowText("Rozpocznij prace"scale_x(728), scale_y(591), scale_x(868), scale_y(636), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        end
        shadowText("Ulepszenia"scale_x(888), scale_y(592), scale_x(1028), scale_y(637), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        dxDrawImage(scale_x(1010), scale_y(261), scale_x(16), scale_y(16), ":guieditor/images/cross.png"000tocolor(255255255255), false)
        shadowText("Nickname:"scale_x(729), scale_y(329), scale_x(880), scale_y(363), tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)
        shadowText("Wykonane zlecenia:"scale_x(877), scale_y(329), scale_x(1028), scale_y(363), tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)
 
        for iv in ipairs(pracownicy) do
           local dodatekY = (scale_y(37))*(i-1)
           local dodatekY2 = (scale_y(74))*(i-1)
 
           dxDrawRectangle(scale_x(729), scale_y(363) + dodatekYscale_x(299), scale_y(35), tocolor(000120), false)
           shadowText(v.nickscale_x(729), scale_y(364) + dodatekY2scale_x(877), scale_y(398), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
            shadowText(v.liczbascale_x(880), scale_y(364) + dodatekY2scale_x(1028), scale_y(398), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        end
    else
        local punkty getElementData(localPlayer"kpunkty") or 0
        shadowText("Kupno ulepszen"scale_x(401), scale_y(251), scale_x(1039), scale_y(295), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        dxDrawImage(scale_x(1011), scale_y(262), scale_x(16), scale_y(16), ":np-gui/grafiki/cofnij.png"000tocolor(255255255255), false)
        dxDrawText("Posiadasz: "..punkty.." punkt?w"scale_x(402), scale_y(582), scale_x(1037), scale_y(648), tocolor(02550255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        for iv in ipairs(listaulepszen) do
            local dodatekY = (scale_y(72))*(i-1)
            local dodatekY2 = (scale_y(144))*(i-1)
 
            dxDrawRectangle(scale_x(417), scale_y(297)+dodatekYscale_x(610), scale_y(70), tocolor(000120), false)
            dxDrawImage(scale_x(432), scale_y(307)+dodatekYscale_x(50), scale_y(50), ":np-magazynier/grafiki/"..v[4]..""000tocolor(255255255255), false)
            shadowText(v[1], scale_x(501), scale_y(297)+dodatekY2scale_x(874), scale_y(332), tocolor(255255255255), 1.00font2"left""center"falsefalsefalsefalsefalse)
            shadowText(v[2], scale_x(501), scale_y(332)+dodatekY2scale_x(874), scale_y(367), tocolor(255255255255), 1.00font"left""center"falsefalsefalsefalsefalse)
            if mysz(scale_x(904), scale_y(312)+dodatekYscale_x(113), scale_y(38)) then
                dxDrawImage(scale_x(904), scale_y(312)+dodatekYscale_x(113), scale_y(38), ":np-gui/grafiki/button_on.png"000tocolor(255255255255), false)
            else
                dxDrawImage(scale_x(904), scale_y(312)+dodatekYscale_x(113), scale_y(38), ":np-gui/grafiki/button_off.png"000tocolor(255255255255), false)
            end
            shadowText("Zakup"scale_x(904), scale_y(312)+dodatekY2scale_x(1017), scale_y(350), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
            shadowText("Cena: "..v[3].."p"scale_x(781), scale_y(297)+dodatekY2scale_x(894), scale_y(335), tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        end
    end
end
 
addEventHandler("onClientClick"root, function(btnstate)
  if btn == "left" and state == "down" then
    if mysz(scale_x(729), scale_y(592), scale_x(139), scale_y(44)) and okno1 == true and ulepszenia == false then
        if getElementData(localPlayer"pracuje") == "kurier" then
            zakonczprace()
        else
            if not getElementData(localPlayer"lvl") or getElementData(localPlayer"lvl") < 34 then
                exports['np-notyfikacje']:noti("Posiadasz zbyt ma?y poziom by tutaj pracowa?""error");
                return false;
            end
            rozpocznijprace()
        end
    elseif mysz(scale_x(889), scale_y(592), scale_x(139), scale_y(44)) and okno1 == true and ulepszenia == false then
        ulepszenia true
    elseif mysz(scale_x(1010), scale_y(261), scale_x(16), scale_y(16)) and okno1 == true and ulepszenia == false then
        removeEventHandler("onClientRender"rootguistart)
        okno1 false
        showCursor(false)
    elseif mysz(scale_x(1011), scale_y(262), scale_x(16), scale_y(16)) and okno1 == true and ulepszenia == true then
        ulepszenia false
    end
    for iv in ipairs(listaulepszen) do
        local dodatekY = (scale_y(72))*(i-1)
        if mysz(scale_x(904), scale_y(312)+dodatekYscale_x(113), scale_y(38)) and okno1 == true and ulepszenia == true then
            local punkty getElementData(localPlayer"kpunkty") or 0
            if punkty tonumber(v[3]) then exports["np-notyfikacje"]:noti("Posiadasz za ma?o punkt?w by zakupi? to ulepszenie""error") return end
            if v[1] == "Szybszy pojazd" then
                if getElementData(localPlayer"kurier:ulepszenie2") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"kurier:ulepszenie2"1)
            elseif v[1] == "Sprint" then
                if getElementData(localPlayer"kurier:ulepszenie1") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"kurier:ulepszenie1"1)
            elseif v[1] == "Zarobek +5%" then
                if getElementData(localPlayer"kurier:ulepszenie3") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"kurier:ulepszenie3"1)
            end
            exports["np-notyfikacje"]:noti("Zakupujesz ulepszenie: "..v[1])
            setElementData(localPlayer"kpunkty"punkty-tonumber(v[3]))
        end
    end
  end
end)
 
addEvent("pokazTopke:kurier:client"true)
addEventHandler("pokazTopke:kurier:client"root, function(tabelka)
  pracownicy tabelka
end)
 
-- praca
 
local miejsca1 = {
    {1081.36, -298.3373.991855},
    {1050.45, -359.9173.9900},
    {1113.24, -355.6173.9990280},
    {1106.34, -314.5873.99035},
    {1102.40, -300.2973.99180105},
}

local miejsca2 = {
    {242.33, -88.371.5890270},
    {242.73, -123.681.5130240},
    {325.00, -88.301.5827090},
    {292.14, -55.731.8090270},
    {254.55, -61.721.571800},
}

local miejsca3 = {
    {342.0962.573.85120300},
    {340.6133.776.41310180},
    {316.8117.534.521800},
    {285.8441.782.53190190},
    {317.2255.073.3823050},
}

local miejsca4 = {
    {1283.46164.0420.460180},
    {1292.41171.7320.4770250},
    {1300.93192.2820.4621028},
    {1312.93170.8520.46333159},
    {1307.21148.8720.3425070},
}

local miejsca5 = {
    {1475.62373.8019.66330150},
    {1452.17373.3019.1022030},
    {1427.19355.0818.84150330},
    {1409.83345.4718.882776},
    {1414.76323.9118.84135316},
}

local miejsca6 = {
    {-49.351085.4820.20360180},
    {-22.601114.9919.74180270},
    {1.141080.6919.740180},
    {-149.141081.0519.74360260},
    {-180.041091.0719.740180},
}

local miejsca7 = {
    {-362.031106.8119.74265360},
    {-22.601114.9919.74180270},
    {-366.351166.3519.7422341},
    {-320.441161.5920.24180360},
    {-290.271174.5620.94180352},
}

local miejsca8 = {
    {801.17360.0419.3980264},
    {784.71379.7721.21324143},
    {753.64377.9723.18319142},
    {749.96348.6220.4221630},
    {805.44372.5519.6085266},
}

local miejsca9 = {
    {2447.7254.1326.871750},
    {2452.0327.1026.5627091},
    {2480.20, -20.8026.87359179},
    {2547.911.4026.4890272},
    {2530.34123.8226.48178358},
}

 
function rozpocznijprace()
    --if getElementData(localPlayer"punkty") < 320 then exports["np-notyfikacje"]:noti("Nie posiadasz 400 punkt?w reputacji!""error") return end
    if getElementData(localPlayer"prawko_c") ~= 1 then exports["np-notyfikacje"]:noti("Nie posiadasz prawa jazdy kat.c!""error") return end
    if getVehicleModel(element) == 410 then end
    setElementData(localPlayer"pracuje""kurier")
    exports["np-notyfikacje"]:noti("Rozpoczynasz prace jako dostawca paczek, udaj si? za?adowa? pojazd.")
    triggerServerEvent("dajBus:kurier"localPlayer)
    zaladunek createMarker(790.00, -609.0116.34-.95"cylinder"2.5255255255)
    bzaladunek createBlipAttachedTo(zaladunek41)
    addEventHandler("onClientMarkerHit"zaladunekzaladuj)
    removeEventHandler("onClientRender"rootguistart)
    okno1 false
    showCursor(false)
    ile 0
end
 
function zakonczprace()
    setElementData(localPlayer"pracuje"false)
    exports["np-notyfikacje"]:noti("Zako?czy?e? prace.")
    if isElement(zaladunekthen
        destroyElement(zaladunek)
    end
    if isElement(bzaladunekthen
        destroyElement(bzaladunek)
    end
    if isElement(branieskrzynkithen
        destroyElement(branieskrzynki)
    end
    if isElement(skrzynia5then destroyElement(skrzynia5end
    if isElement(skrzynia4then destroyElement(skrzynia4end
    if isElement(skrzynia3then destroyElement(skrzynia3end
    if isElement(skrzynia2then destroyElement(skrzynia2end
    if isElement(skrzynia1then destroyElement(skrzynia1end
    for iv in ipairs(oddanie) do
        if isElement(vthen
            destroyElement(v)
        end
    end
    for iv in ipairs(oddanieped) do
        if isElement(vthen
            destroyElement(v)
        end
    end
    for iv in ipairs(boddanie) do
        if isElement(vthen
            destroyElement(v)
        end
    end
    setElementData(localPlayer"niesieskrzynie"false)
    triggerServerEvent("usunSkrzynie:kurier"localPlayer)
    triggerServerEvent("usunBus:kurier"localPlayer)
end
 
function zaladuj(gracz)
    if gracz ~= localPlayer then return end
    if getPedOccupiedVehicle(localPlayer) and (getElementData(getPedOccupiedVehicle(localPlayer), "kierowca:kurier") or 0) == getElementData(localPlayer"dbid"then
        if isElement(zaladunekthen
            destroyElement(zaladunek)
        end
        if isElement(bzaladunekthen
            destroyElement(bzaladunek)
        end
        local pojazd getPedOccupiedVehicle(localPlayer)
        skrzynia1 createObject(29120,0,0)
        skrzynia2 createObject(29120,0,0)
        skrzynia3 createObject(29120,0,0)
        skrzynia4 createObject(29120,0,0)
        skrzynia5 createObject(29120,0,0)
        attachElements(skrzynia1pojazd, -0.45, -0.7, -0.1)
        setObjectScale(skrzynia10.6)
        attachElements(skrzynia2pojazd0.45, -0.7, -0.1)
        setObjectScale(skrzynia20.6)
        attachElements(skrzynia3pojazd, -0.45, -1.4, -0.1)
        setObjectScale(skrzynia30.6)
        attachElements(skrzynia4pojazd0.45, -1.4, -0.1)
        setObjectScale(skrzynia40.6)
        attachElements(skrzynia5pojazd0.45, -2.1, -0.1)
        setObjectScale(skrzynia50.6)
        ile 5
        local los math.random(18)
        if los == 1 then
            trasa miejsca1
        elseif los == 2 then
            trasa =  miejsca2
        elseif los == 3 then
            trasa =  miejsca3
        elseif los == 4 then
            trasa =  miejsca4
        elseif los == 5 then
            trasa =  miejsca5
        elseif los == 6 then
            trasa =  miejsca6
        elseif los == 7 then
            trasa =  miejsca7
       elseif los == 8 then
            trasa =  miejsca8
       elseif los == 9 then
            trasa =  miejsca9
        end
        exports["np-notyfikacje"]:noti("Pomy?lnie za?adowa?e? paczki, udaj si? do klient?w.")
        for iv in ipairs(trasa) do
            local skin math.random(1041)
            oddanie[i] = createMarker(v[1], v[2], v[3]-.95"cylinder"1.5255255255)
            oddanieped[i] = createPed(skinv[1], v[2], v[3], v[4])
            boddanie[i] = createBlipAttachedTo(oddanie[i], 41)
            setElementData(oddanie[i], "ped"oddanieped[i])
            setElementData(oddanie[i], "blip"boddanie[i])
            setPedAnimation(oddanieped[i], 'ped','XPRESSscratch')
            setElementFrozen(oddanieped[i], true)
            addEventHandler("onClientMarkerHit"oddanie[i], function(gracz)
            if gracz ~= localPlayer then return end
                if not getElementData(localPlayer"niesieskrzynie"then exports["np-notyfikacje"]:noti("Nie posiadasz paczki dla klienta.""error") return end
                local ped getElementData(source"ped")
                local blip getElementData(source"blip")
                setElementFrozen(pedfalse)
                setElementRotation(ped, -0.000.00v[5])
                setPedAnimation(ped'ped''WOMAN_walknorm')
                setElementData(localPlayer"ped"ped)
                fade true
                destroyElement(source)
                destroyElement(blip)
                ile ile 1
                setElementData(localPlayer"niesieskrzynie"false)
                triggerServerEvent("usunSkrzynie:kurier"localPlayer)
                local zarobek math.random(7985)
                if getElementData(localPlayer"premium"then
                    zarobek zarobek zarobek*0.20
                end
                local nagroda math.random(0,1)
                if getElementData(localPlayer"premium"then
                    nagroda nagroda nagroda*2
                end
                if getElementData(localPlayer"kurier:ulepszenie3"then
                    zarobek zarobek zarobek*0.05
                end
               
            local los2 100
            if getElementData(localPlayer"premium"then
                los2 110
            end
            setElementData(localPlayer"lvl:xp"getElementData(localPlayer"lvl:xp")+los2)
            exports["np-notyfikacje"]:noti("Zdobywasz "..los2.." punkt?w do?wiadczenia")


                local pkt math.random(02)
                local zarobek2 string.format("%1d"zarobek)
                setElementData(localPlayer"pieniadze"getElementData(localPlayer"pieniadze")+zarobek2)
                setElementData(localPlayer"kpunkty"getElementData(localPlayer"kpunkty")+pkt)
                if ile == 0 then
                    zaladunek createMarker(790.00, -609.0116.34-.95"cylinder"2.5255255255)
                    bzaladunek createBlipAttachedTo(zaladunek41)
                    addEventHandler("onClientMarkerHit"zaladunekzaladuj)
                    exports["np-notyfikacje"]:noti("Dowioz?e? paczke do klienta otrzymujesz: "..zarobek2.." PLN.\nUdaj si? po nowe zlecenie")
                    triggerServerEvent("daj:kzlecenia"localPlayerlocalPlayer)
                else
                    exports["np-notyfikacje"]:noti("Dowioz?e? paczke do klienta otrzymujesz: "..zarobek2.." PLN.\nZosta?o: "..ile.." paczek")
                end
                setTimer(function()
                    fade false
                    destroyElement(ped)
                    setElementData(localPlayer"ped"false)
                    alpha 255
                end30001)
            end)
        end
    end
end
 
function skinAlpha()
    if fade == true then
        alpha alpha-1.5
        if alpha 0 then
            setElementAlpha(getElementData(localPlayer"ped"), alpha)
        elseif alpha 0 then
            fade false
        end
    end
end
addEventHandler('onClientRender'rootskinAlpha)
 
addEventHandler("onClientVehicleExit"root, function(graczseat)
    if gracz ~= localPlayer then return end
    if getElementData(localPlayer"pracuje") == "kurier" then
        local xygetVehicleComponentPosition(source"boot_dummy")
        setVehicleComponentPosition(source"boot_dummy"xyz+1)
        local rxryrz getVehicleComponentRotation(source"boot_dummy")
        setVehicleComponentRotation(source"boot_dummy"rx+90ryrz)
        branieskrzynki createMarker(0,0,0"cylinder"1.525175131)
        attachElements(branieskrzynkisource0, -3.5, -0.9)
        setElementData(branieskrzynki"auto"source)
        addEventHandler("onClientMarkerHit"branieskrzynki, function(gracz)
            if gracz ~= localPlayer then return end
            if ile == 0 then exports["np-notyfikacje"]:noti("Nie posiadasz paczek.""error") return end
            if not getElementData(localPlayer"niesieskrzynie"then
                setElementData(localPlayer"niesieskrzynie"true)
                triggerServerEvent("dajSkrzynie:kurier"localPlayer)
                if ile == 5 then
                    if isElement(skrzynia5then destroyElement(skrzynia5end
                elseif ile == 4 then
                    if isElement(skrzynia4then destroyElement(skrzynia4end
                elseif ile == 3 then
                    if isElement(skrzynia3then destroyElement(skrzynia3end
                elseif ile == 2 then
                    if isElement(skrzynia2then destroyElement(skrzynia2end
                elseif ile == 1 then
                    if isElement(skrzynia1then destroyElement(skrzynia1end
                end
            else
                setElementData(localPlayer"niesieskrzynie"false)
                triggerServerEvent("usunSkrzynie:kurier"localPlayer)
                local veh getElementData(source"auto")
                if ile == 5 then
                    skrzynia5 createObject(29120,0,0)
                    attachElements(skrzynia5veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia50.6)
                elseif ile == 4 then
                    skrzynia4 createObject(29120,0,0)
                    attachElements(skrzynia4veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia40.6)
                elseif ile == 3 then
                    skrzynia3 createObject(29120,0,0)
                    attachElements(skrzynia3veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia30.6)
                elseif ile == 2 then
                    skrzynia2 createObject(29120,0,0)
                    attachElements(skrzynia2veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia20.6)
                elseif ile == 1 then
                    skrzynia5 createObject(29120,0,0)
                    attachElements(skrzynia1veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia10.6)
                end
            end
        end)
    end
end)
 
addEventHandler("onClientVehicleEnter"root, function(graczseat)
    if gracz ~= localPlayer then return end
    if getElementData(localPlayer"pracuje") == "kurier" then
        local xygetVehicleComponentPosition(source"boot_dummy")
        setVehicleComponentPosition(source"boot_dummy"xyz-1)
        local rxryrz getVehicleComponentRotation(source"boot_dummy")
        setVehicleComponentRotation(source"boot_dummy"rx-90ryrz)
        if isElement(branieskrzynkithen
            destroyElement(branieskrzynki)
        end
    end
end)
 
--opcje
 
function shadowText(text,x,y,w,h,color,size,font,xx,yy,x1,x2,x3,x4,x5)
    dxDrawText(text,x+1,y+1,w+1,h+1,tocolor(0,0,0),size,font,xx,yy,x1,x2,x3,x4,x5)
    dxDrawText(text,x,y,w,h,color,size,font,xx,yy,x1,x2,x3,x4,x5)
end
 
function mysz(psx,psy,pssx,pssy,abx,aby)
    if not isCursorShowing() then return end
    cx,cy=getCursorPosition()
    cx,cy=cx*sx,cy*sy
    if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
        return true,cx,cy
    else
        return false
    end
end
 
function scale_x(value)
    local result = (value 1440) * sx
 
    return result
end
 
function scale_y(value)
    local result = (value 900) * sy
 
    return result
end


b??dy z db3:[2018-07-30 21:05] ERROR: [prace]/np-kurier/s.lua:8: attempt to index field '?' (a nil value)

Podpis
Pomagam na tyle ile mogę :D
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-30, 21:25


Kalizman







Wiek: 23
Na forum: 3652 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

wska? linijk? w kt?rej wywala b??d

PS. poda?e? stron? clienta, a b??d wywala po serverze

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-30, 21:27


BlackSkorpion

Uczę się LUA






Wiek: 25
Na forum: 3471 dni
Posty: 53
Nick w MP: Black

Piwa: 371

Respekt: 50

local ulepszenia false


Podpis
Pomagam na tyle ile mogę :D
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-30, 21:30


Kalizman







Wiek: 23
Na forum: 3652 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

podaj stron? serwer bo tam pokazuje b??d

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-30, 21:34


BlackSkorpion

Uczę się LUA






Wiek: 25
Na forum: 3471 dni
Posty: 53
Nick w MP: Black

Piwa: 371

Respekt: 50

        table.insert(topka, {nick q[i]["login"], liczba q[i]["kzlecenia"]})


Podpis
Pomagam na tyle ile mogę :D
Postaw piwo autorowi tego posta
 

 
Tagi: kurier
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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