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

Wysłany: 2018-08-29, 21:01


BabyKonik







Wiek: 36
Na forum: 3153 dni
Posty: 9
Nick w MP: BabyKonik

Piwa: 1

Respekt: 50

Witam, przychodze z takim problemem, poniewa? mam gm z new place kiedy chce rozpocz?? prace kosiarek to ona si? nie respi. Prosze o pomoc ! Stawiam :piwo:



Debugscript
https://imgur.com/a/Q82G8Vc

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
swierzak18
Wysłany: 2018-08-29, 21:04


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

Nie ma nast?puj?cych event?w:
- usunKosiarke:kosiarki,
- dajKosiarke:kosiarki,
- pokazTopke:kosiarki.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
BabyKonik
Wysłany: 2018-08-29, 21:05


BabyKonik







Wiek: 36
Na forum: 3153 dni
Posty: 9
Nick w MP: BabyKonik

Piwa: 1

Respekt: 50

Jak mam je doda? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-29, 21:10


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

Nie wiem. Nie pisa?em kodu b?d? nie czyta trigger?w... - nie wiem bo nie poda?e? kodu a moja magiczna kula zepsu?a si?...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-29, 21:14


BabyKonik







Wiek: 36
Na forum: 3153 dni
Posty: 9
Nick w MP: BabyKonik

Piwa: 1

Respekt: 50

c.lua

--[[
    AutorMalentas
]]
 
local sxsy guiGetScreenSize()
local okno1 false
local ulepszenia false

local dostal_powiadomienie false;
 
local pracodawca createPed(16773.27, -1305.9413.560)
setElementData(pracodawca"name""Pracodawca")
setElementDimension(pracodawca0)
setElementFrozen(pracodawcatrue)
local rozpoczecie createMarker(773.18, -1304.6613.56-.95"cylinder"1255255255)
setElementData(rozpoczecie"praca"true)
setElementDimension(rozpoczecie0)
 
 
addEventHandler("onClientMarkerHit"rozpoczecie, function(gracz)
    if gracz ~= localPlayer then return end
    if getPedOccupiedVehicle(localPlayerthen return end
    if getElementData(localPlayer"pracuje"then
        if getElementData(localPlayer"pracuje") ~= "kosiarki" then exports["np-notyfikacje"]:noti("Posiadasz inn? aktywn? prace!""error") return end
    end
    addEventHandler("onClientRender"rootguistart)
    okno1 true
    showCursor(true)
    triggerServerEvent("pokazTopke:kosiarki:source"localPlayer)
end)
 
local font dxCreateFont("cz.ttf"10)
local font2 dxCreateFont("cz.ttf"12)
 
local font dxCreateFont("cz.ttf"10)
local font2 dxCreateFont("cz.ttf"12)
 
local pracownicy = { }
 
local listaulepszen = {
    {"Pojemniejsza kosiarka""Dzi?ki temu twoja kosiarka ma wieksz? pojemno?? kosza"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"kospunkty") or 0
       local zlecenia getElementData(localPlayer"koszlecenia") or 0
        shadowText("Praca piel?gnowania trawnika"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/bg4.png"000tocolor(255255255255), false)
        shadowText("Wymagania: brak"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") == "kosiarki" 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("Skoszone pola:"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"kospunkty") 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") == "kosiarki" then
            zakonczprace()
        else
            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"kospunkty") 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] == "Pojemniejsza kosiarka" then
                if getElementData(localPlayer"kosiarki:ulepszenie1") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"kosiarki:ulepszenie1"1)
            elseif v[1] == "Zarobek +5%" then
                if getElementData(localPlayer"kosiarki:ulepszenie2") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"kosiarki:ulepszenie2"1)
            end
            exports["np-notyfikacje"]:noti("Zakupujesz ulepszenie: "..v[1])
            setElementData(localPlayer"kospunkty"punkty-tonumber(v[3]))
        end
    end
  end
end)
 
addEvent("pokazTopke:kosiarki:client"true)
addEventHandler("pokazTopke:kosiarki:client"root, function(tabelka)
  pracownicy tabelka
end)
 
 
-- praca
 
 
 
local trawy 0
 
function rozpocznijprace()
    setElementData(localPlayer"pracuje""kosiarki")
    triggerServerEvent("dajKosiarke:kosiarki"localPlayer)
    losuj()
    zaladunek 0
    removeEventHandler("onClientRender"rootguistart)
    okno1 false
    showCursor(false)
    wyladunek createMarker(735.11, -1303.0313.57-.95"cylinder"225131)
    addEventHandler("onClientMarkerHit"wyladunek, function(gracz)
        if gracz ~= localPlayer then return end
        if not getPedOccupiedVehicle(localPlayerthen return end
        if getElementData(localPlayer"kosiarki:ulepszenie1") == 1 then
            ilosc 500
        else
            ilosc 250
        end
        if zaladunek ~= ilosc then return end
        if ilosc == 250 then
            zarobek =  math.random(400600)
        elseif ilosc == 500 then
            zarobek =  math.random(100900)
        end
        if getElementData(localPlayer"premium"then
            zarobek zarobek zarobek*1
        end
        if getElementData(localPlayer"kosiarki:ulepszenie1") == 2 then
            zarobek zarobek zarobek*0.05
        end
        local nagroda math.random(15)
        if tonumber(nagroda) == 5 then
            local los2 math.random(13)
            if getElementData(localPlayer"premium"then
                los2 math.random(26)
            end
            setElementData(localPlayer"punkty"getElementData(localPlayer"punkty")+los2)
            exports["np-notyfikacje"]:noti("Za dobr? prace otrzymujesz "..los2.." RP")
        end
        local zarobek2 string.format("%1d"zarobek)
        setElementData(localPlayer"pieniadze"getElementData(localPlayer"pieniadze")+zarobek2)
        exports["np-notyfikacje"]:noti("Wy?adowa?e? trawe zarabiasz "..zarobek2.." PLN")
        dostal_powiadomienie false;
        zaladunek 0
        local los math.random(1,3)
        local pkt getElementData(localPlayer"kospunkty") or 0
        setElementData(localPlayer"kospunkty"pkt+los)
    end)
end
 
function zakonczprace()
    setElementData(localPlayer"pracuje"false)
    triggerServerEvent("usunKosiarke:kosiarki"localPlayer)
    for iv in ipairs(getElementsByType("marker")) do
        if getElementData(v"element"then
            destroyElement(getElementData(v"element"))
            destroyElement(v)
        end
    end
    destroyElement(wyladunek)
end
 
 
local miejsca = {
    {773.27, -1295.4013.56},
    {752.78, -1295.8413.57},
    {752.78, -1253.2513.56},
    {774.34, -1253.1313.56},
}
 
function losuj()
    trawy 0
    local los miejsca[math.random(#miejsca)]
    for 130 do
        local add i
        obj createObject(818los[1], los[2]+addlos[3]-2)
        setObjectScale(obj0.5)
        marker createMarker(los[1], los[2]+addlos[3], "corona"0.82552552550)
        setElementData(marker"element"obj)
        trawy trawy 1
    end
    for 114 do
        local add i
        obj createObject(818los[1]-addlos[2], los[3]-2)
        setObjectScale(obj0.5)
        marker createMarker(los[1]-addlos[2], los[3], "corona"0.82552552550)
        setElementData(marker"element"obj)
        trawy trawy 1
        for i2 130 do
            local add2 i2
            obj createObject(818los[1]-addlos[2]+add2los[3]-2)
            setObjectScale(obj0.5)
            marker createMarker(los[1]-addlos[2]+add2los[3], "corona"0.82552552550)
            setElementData(marker"element"obj)
            trawy trawy 1
        end
    end
    addEventHandler("onClientMarkerHit"root, function(gracz)
        if gracz ~= localPlayer then return end
        if not source then return end
        if not getElementData(source"element"then return end
        if not getPedOccupiedVehicle(graczthen return end
        if getElementData(localPlayer"kosiarki:ulepszenie1") == 1 then
            ilosc 350
        else
            ilosc 250
        end
        if zaladunek == ilosc then 
            if not dostal_powiadomienie then
                exports["np-notyfikacje"]:noti("Twoja kosiarka jest pe?na musisz j? wy?adowa?""error");
                dostal_powiadomienie true;
            end
            return;
        end
        destroyElement(getElementData(source"element"))
        destroyElement(source)
        trawy trawy 1
        zaladunek zaladunek 1
        if trawy == 0 then
            for iv in ipairs(getElementsByType("marker")) do
                if getElementData(v"element"then
                    destroyElement(getElementData(v"element"))
                    destroyElement(v)
                end
            end
            marker false
            losuj()
            triggerServerEvent("daj:koszlecenia"localPlayerlocalPlayer)
        end
    end)
end
 
strefa createColCuboid(722.99, -1308.7013.57-16010010)

addEventHandler("onClientColShapeLeave"strefa, function(gracz)
    if gracz ~= localPlayer then return end
    if getElementData(localPlayer"pracuje") == "kosiarki" then
        zakonczprace()
    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




s.lua

function pokazpracownikow()
    local q exports['np-mysql']:wykonaj("SELECT * from konta order by koszlecenia desc")
    local topka = {}

    for 1,do
        table.insert(topka, {nick q[i]["login"], liczba q[i]["koszlecenia"]})
    end

    return topka
end


tablica pokazpracownikow()

setTimer(function()
    tablica pokazpracownikow()
end6000000)

addEvent("pokazTopke:kosiarki:source"true)
addEventHandler("pokazTopke:kosiarki:source"root, function()
    triggerClientEvent(source"pokazTopke:kosiarki:client"sourcetablica)
end)

kosiarka = { }

addEvent("dajKosiarke:kosiarki"true)
addEventHandler("dajKosiarke:kosiarki"root, function()
    kosiarka[source] = createVehicle(572770.50, -1306.1813.140.90.03.4)
    warpPedIntoVehicle(sourcekosiarka[source])
    triggerClientEvent(root"ghost:vehicle"rootkosiarka[source])
    setElementData(kosiarka[source], "kierowca:kosiarki"getElementData(source"dbid"))
end)

addEvent("usunKosiarke:kosiarki"true)
addEventHandler("usunKosiarke:kosiarki"root, function()
    if isElement(kosiarka[client]) then
        destroyElement(kosiarka[client])
    end
end)

addEventHandler("onPlayerQuit"root, function()
    if isElement(kosiarka[source]) then
        destroyElement(kosiarka[source])
    end
end)

addEvent("daj:koszlecenia"true)
addEventHandler("daj:koszlecenia"root, function(player)
    local dbid getElementData(player"dbid")
    local ilosc getElementData(player"koszlecenia") or 0
    local q exports['np-mysql']:wykonaj("UPDATE konta SET koszlecenia=koszlecenia+1 where dbid=?"dbid)
    setElementData(player"koszlecenia"ilosc+1)
end)

addEventHandler("onVehicleStartEnter"root, function(graczseat)
    if seat ~= 0 then return end
    if getElementData(gracz"pracuje") == "kosiarki" then
        if getElementData(source"id"then
            cancelEvent()
        end
        if getElementData(source"kierowca:kosiarki") ~= getElementData(gracz"dbid"then
            cancelEvent()
        end
    else
        if getElementData(source"kierowca:kosiarki"then
            cancelEvent()
        end
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-30, 08:45


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

Musisz mie? odpalone
np-mysql
np-notyfikacje
np-gui
Skrypt na markery
+ by? mo?e co? jeszcze co wywo?uje
- usunKosiarke:kosiarki,
- dajKosiarke:kosiarki,
- pokazTopke:kosiarki.

Podpis

Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
BabyKonik
Wysłany: 2018-08-30, 10:18


BabyKonik







Wiek: 36
Na forum: 3153 dni
Posty: 9
Nick w MP: BabyKonik

Piwa: 1

Respekt: 50

np-pizza ma te triggery ale nawet jak jest odpalone to nie dzia?a

[ Dodano: 2018-08-30, 10:24 ]
c.lua np-pizza
--[[
    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 rozpoczecie createMarker(2105.49, -1806.4513.55"cylinder"1255255255)
setElementData(rozpoczecie"praca"true)
setElementDimension(rozpoczecie0)
 
 
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") ~= "pizza" then exports["np-notyfikacje"]:noti("Posiadasz inn? aktywn? prace!""error") return end
    end
    addEventHandler("onClientRender"rootguistart)
    okno1 true
    showCursor(true)
    triggerServerEvent("pokazTopke:pizza:source"localPlayer)
end)
 
local font dxCreateFont("cz.ttf"10)
local font2 dxCreateFont("cz.ttf"12)
 
local pracownicy = { }
 
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 pizzy"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 B\n10 punkt?w reputacji "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") == "pizza" 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") == "pizza" then
            zakonczprace()
        else
            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"pizza:ulepszenie2") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"pizza:ulepszenie2"1)
            elseif v[1] == "Sprint" then
                if getElementData(localPlayer"pizza:ulepszenie1") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"pizza:ulepszenie1"1)
            elseif v[1] == "Zarobek +5%" then
                if getElementData(localPlayer"pizza:ulepszenie3") == 1 then exports["np-notyfikacje"]:noti("Posiadasz ju? to ulepszenie""error") return end
                setElementData(localPlayer"pizza:ulepszenie3"1)
            end
            exports["np-notyfikacje"]:noti("Zakupujesz ulepszenie: "..v[1])
            setElementData(localPlayer"kpunkty"punkty-tonumber(v[3]))
        end
    end
  end
end)
 
addEvent("pokazTopke:pizza:client"true)
addEventHandler("pokazTopke:pizza:client"root, function(tabelka)
  pracownicy tabelka
end)
 
-- praca
 
local miejsca1 = {
    {1667.07, -2108.3013.891855},
    {1673.64, -2122.3814.1500},
    {1684.41, -2098.1613.8390280},
    {1695.71, -2125.8313.81035},
    {1707.99, -2101.8613.55180105},
}

local miejsca2 = {
    {2275.85, -1785.8813.5590270},
    {2247.07, -1795.7013.55130240},
    {2290.14, -1795.7113.5527090},
    {2307.68, -1785.7413.5690270},
    {2292.04, -1758.3113.551800},
}

local miejsca3 = {
    {2018.05, -1629.9214.04120300},
    {2016.54, -1641.7414.11310180},
    {2013.58, -1656.4814.141800},
    {2018.24, -1703.1714.23190190},
    {2016.20, -1717.2914.1323050},
}

function rozpocznijprace()
    if getElementData(localPlayer"punkty") < 10 then exports["np-notyfikacje"]:noti("Nie posiadasz 10 punkt?w reputacji!""error") return end
    if getElementData(localPlayer"prawko_b") ~= 1 then exports["np-notyfikacje"]:noti("Nie posiadasz prawa jazdy kat.c!""error") return end
    if getVehicleModel(element) == 410 then end
    setElementData(localPlayer"pracuje""pizza")
    exports["np-notyfikacje"]:noti("Rozpoczynasz prace jako dostawca pizzy, udaj si? za?adowa? pizze.")
    triggerServerEvent("dajBus:pizza"localPlayer)
    zaladunek createMarker(2097.32, -1815.4213.38-.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:pizza"localPlayer)
    triggerServerEvent("usunBus:pizza"localPlayer)
end
 
function zaladuj(gracz)
    if gracz ~= localPlayer then return end
    if getPedOccupiedVehicle(localPlayer) and (getElementData(getPedOccupiedVehicle(localPlayer), "kierowca:pizza") or 0) == getElementData(localPlayer"dbid"then
        if isElement(zaladunekthen
            destroyElement(zaladunek)
        end
        if isElement(bzaladunekthen
            destroyElement(bzaladunek)
        end
        local pojazd getPedOccupiedVehicle(localPlayer)
        skrzynia1 createObject(15820,0,0)
        skrzynia2 createObject(15820,0,0)
        skrzynia3 createObject(15820,0,0)
        skrzynia4 createObject(15820,0,0)
        skrzynia5 createObject(15820,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(13)
        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? pizze, 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 pizzy 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:pizza"localPlayer)
                local zarobek math.random(300800)
                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"pizza:ulepszenie3"then
                    zarobek zarobek zarobek*0.05
                end
                local nagroda math.random(12)
                if tonumber(nagroda) == 5 then
                    local los2 math.random(1,3)
                    if getElementData(localPlayer"premium"then
                        los2 math.random(23)
                    end
                    setElementData(localPlayer"punkty"getElementData(localPlayer"punkty")+los2)
                    exports["np-notyfikacje"]:noti("Za dobr? prace otrzymujesz "..los2.." RP")
                end
                local pkt math.random(02)
                local zarobek2 string.format("%1d"zarobek)
                setElementData(localPlayer"punkty"getElementData(localPlayer"punkty")+nagroda)
                setElementData(localPlayer"pieniadze"getElementData(localPlayer"pieniadze")+zarobek2)
                setElementData(localPlayer"kpunkty"getElementData(localPlayer"kpunkty")+pkt)
                if ile == 0 then
                    zaladunek createMarker(2097.32, -1815.4213.38-.95"cylinder"2.5255255255)
                    bzaladunek createBlipAttachedTo(zaladunek41)
                    addEventHandler("onClientMarkerHit"zaladunekzaladuj)
                    exports["np-notyfikacje"]:noti("Dowioz?e? pizze do klienta otrzymujesz: "..zarobek2.." PLN.\nUdaj si? po nowe zlecenie")
                    triggerServerEvent("daj:kzlecenia"localPlayerlocalPlayer)
                else
                    exports["np-notyfikacje"]:noti("Dowioz?e? pizze do klienta otrzymujesz: "..zarobek2.." PLN.\nZosta?o: "..ile.." pizzy")
                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") == "pizza" 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:pizza"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:pizza"localPlayer)
                local veh getElementData(source"auto")
                if ile == 5 then
                    skrzynia5 createObject(15820,0,0)
                    attachElements(skrzynia5veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia50.6)
                elseif ile == 4 then
                    skrzynia4 createObject(15820,0,0)
                    attachElements(skrzynia4veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia40.6)
                elseif ile == 3 then
                    skrzynia3 createObject(15820,0,0)
                    attachElements(skrzynia3veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia30.6)
                elseif ile == 2 then
                    skrzynia2 createObject(15820,0,0)
                    attachElements(skrzynia2veh0.45, -2.1, -0.1)
                    setObjectScale(skrzynia20.6)
                elseif ile == 1 then
                    skrzynia5 createObject(15820,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") == "pizza" 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




s.lua
local bus = {}

function pokazpracownikow()
    local q exports['np-mysql']:wykonaj("SELECT * from konta order by kzlecenia desc")
    local topka = {}

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

    return topka
end

tablica pokazpracownikow()

setTimer(function()
    tablica pokazpracownikow()
end6000000)

addEvent("pokazTopke:pizza:source"true)
addEventHandler("pokazTopke:pizza:source"root, function()
    triggerClientEvent(source"pokazTopke:pizza:client"sourcetablica)
end)


addEvent("dajBus:pizza"true)
addEventHandler("dajBus:pizza"root, function()
    bus[source] = createVehicle(4042095.36, -1799.0213.12359.7359.991.1)
    warpPedIntoVehicle(sourcebus[source])
    setVehicleVariant(bus[source], 255255)
    setElementDimension(bus[source], 0)
    setVehicleDamageProof(bus[source], true)
    triggerClientEvent(root"ghost:vehicle"rootbus[source])
    setElementData(bus[source], "kierowca:pizza"getElementData(source"dbid"))
    if getElementData(source"pizza:ulepszenie2") == 1 then
        setVehicleColor(bus[source], 23000)
        setVehicleHandling(bus[source], "driveType""awd")
        setVehicleHandling(bus[source], "engineAcceleration"getVehicleHandling(bus[source]).engineAcceleration+2)
        setVehicleHandling(bus[source], "maxVelocity"getVehicleHandling(bus[source]).maxVelocity+30)
    else
        setVehicleColor(bus[source], 0190)
    end
end)

addEvent("usunBus:pizza"true)
addEventHandler("usunBus:pizza"root, function()
    if isElement(bus[source]) then
        destroyElement(bus[source])
    end
end)

addEvent("daj:kzlecenia"true)
addEventHandler("daj:kzlecenia"root, function(player)
    local dbid getElementData(player"dbid")
    local ilosc getElementData(player"kzlecenia") or 0
    local q exports['np-mysql']:wykonaj("UPDATE konta SET kzlecenia=kzlecenia+1 where dbid=?"dbid)
    setElementData(player"kzlecenia"ilosc+1)
end)

addEventHandler("onVehicleStartEnter"root, function(graczseat)
    if getElementData(gracz"pracuje") == "pizza" then
        if getElementData(source"id"then
            cancelEvent()
        end
        if getElementData(source"kierowca:pizza") ~= getElementData(gracz"dbid"then
            cancelEvent()
        end
        if getElementData(gracz"niesieskrzynie"then 
            exports["np-notyfikacje"]:noti("Nie mo?esz wej?? do pojazdu z pizza"gracz"error") 
            cancelEvent() 
        end
    else
        if getElementData(source"kierowca:pizza"then
            cancelEvent()
        end
    end
end)


local skrzynka = {}
local timer = {}


addEvent("dajSkrzynie:pizza"true)
addEventHandler("dajSkrzynie:pizza"root, function()
    local x,y,getElementPosition(source)
    skrzynka[source] = createObject(1582x,y,z)
    pudelko exports.bone_attach:attachElementToBone(skrzynka[source],source,11,-0.15,0.00,0.10,-92.00,-5.00,5.00)
    setPedAnimation(source,"CARRY","crry_prtial",0,true,true,false,true)
    toggleControl(source,"sprint"false) 
    toggleControl(source,"jump"false) 
    toggleControl(source,"fire"false) 
    if getElementData(source"pizza:ulepszenie1"then
        toggleControl(source,"walk"true) 
        setControlState(source,"walk"false)
    else
        toggleControl(source,"walk"false) 
        setControlState(source,"walk"true)
    end
    setObjectScale(skrzynka[source], 0.6)
    unbug(source)
end)

function unbug(gracz)
    timer[gracz] = setTimer(function()
        toggleControl(gracz,"sprint"false) 
        toggleControl(gracz,"jump"false) 
        toggleControl(gracz,"fire"false) 
        if getElementData(gracz"pizza:ulepszenie1") == 1 then
            toggleControl(gracz,"walk"true) 
            setControlState(gracz,"walk"false)
        else
            toggleControl(gracz,"walk"false) 
            setControlState(gracz,"walk"true)
        end
    end510)
end



addEvent("usunSkrzynie:pizza"true)
addEventHandler("usunSkrzynie:pizza"root, function()
    if isElement(skrzynka[source]) then destroyElement(skrzynka[source]) end
    setPedAnimation(source,"ped","facanger",-1,false,true,true,false)
    toggleControl(source,"sprint"true) 
    toggleControl(source,"jump"true) 
    toggleControl(source,"fire"false) 
    toggleControl(source,"walk"true) 
    setControlState(source,"walk"false)
    if isTimer(timer[source]) then
        killTimer(timer[source])
    end
end)

addEventHandler("onPlayerQuit"root, function()
    if isTimer(timer[source]) then
        killTimer(timer[source])
    end
    if isElement(skrzynka[source]) then 
        destroyElement(skrzynka[source]) 
    end
    if isElement(bus[source]) then
        destroyElement(bus[source])
    end
end)





Debugscript jak jest odpalone np-pizza

https://imgur.com/a/HA5riti

[ Dodano: 2018-08-30, 10:54 ]
Dzi?kuje wszystkim za pomoc, naprawi?em ! Stawiam :piwo: jak obieca?em :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-30, 13:05


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

BabyKonik, ka?da praca b?dzie mie? jakie? triggery, spr?buj wgra? core b?d? co? typu ,,ustawienia" ,,settings"

[ Dodano: 2018-08-30, 13:09 ]
Do serverside musisz doda? -
usunKosiarke:kosiarki,
- dajKosiarke:kosiarki,
- pokazTopke:kosiarki.

Podpis

Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-30, 15:11


Mikołajj







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

Piwa: 132

Respekt: 91

"Thinks" napisał/a:

BabyKonik, ka?da praca b?dzie mie? jakie? triggery, spr?buj wgra? core b?d? co? typu ,,ustawienia" ,,settings"

[ Dodano: 2018-08-30, 13:09 ]
Do serverside musisz doda? -
usunKosiarke:kosiarki,
- dajKosiarke:kosiarki,
- pokazTopke:kosiarki.


Przecie? to jest dodane, popatrz najpierw zanim co? napiszesz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-30, 15:13


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

ST4GE, Jak co? piszesz, to chocia? pisz to zrozumiale i bez offtopicowo, a czy napisa?em gdzie ma doda??

Podpis

Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-30, 17:26


radziowarsss







Wiek: 26
Na forum: 3331 dni
Posty: 9
Nick w MP: radziowarsss

Piwa: 1

Respekt: 50

Babykonik, moglbys napisac w jaki sposob to naprawiles? Bo ja nie mam pojecia ca?y czas.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-30, 19:03


Norbert1234

Nie umiem w LUA






Wiek: 22
Na forum: 3987 dni
Posty: 319
Nick w MP: Gusterowskyy

Piwa: 242

Respekt: 60

radziowarsss,

BabyKonik, ka?da praca b?dzie mie? jakie? triggery, spr?buj wgra? core b?d? co? typu ,,ustawienia" ,,settings"

[ Dodano: 2018-08-30, 13:09 ]
Do serverside musisz doda? -
usunKosiarke:kosiarki,
- dajKosiarke:kosiarki,
- pokazTopke:kosiarki.


Nie dzi?kuj...

Jezu ludzie patrzcie uwa?nie....

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-31, 01:07


radziowarsss







Wiek: 26
Na forum: 3331 dni
Posty: 9
Nick w MP: radziowarsss

Piwa: 1

Respekt: 50

Chodzi o to, ?e czyta?em to, lecz rozumiem z tego tylko tyle, ?e powinnem wgra? jaki? skrypt "co? typu ,,ustawienia" ,,settings" ". Ale nie mam poj?cia jak mam doda? do serverside powy?sze triggery. Sorka, ale jestem laikiem w tym temacie, a chc? si? nauczy?, mam nadziej?, ?e mnie rozumiesz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-31, 07:29


Norbert1234

Nie umiem w LUA






Wiek: 22
Na forum: 3987 dni
Posty: 319
Nick w MP: Gusterowskyy

Piwa: 242

Respekt: 60

radziowarsss, spk, przeanalizuj jeszcze raz, a jak ju? nie.b?dziesz mia? pomys?u, to napisz😉

Postaw piwo autorowi tego posta
 

 
Tagi: kosiarki :: nie :: działają
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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