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

Wysłany: 2018-11-24, 22:00


Kakatus







Wiek: 25
Na forum: 2751 dni
Posty: 8
Nick w MP: kakatus



Respekt: 50

Cze??, natkn??em si? na problem z przechowalni?. Kto? wie o co chodzi?
[18-11-24 21:52] ERROR: [Zasoby]/rpg_garage/przecho_server.lua:166: attempt to get length of global 'q' (a boolean value)

ta linijka:
if #q > 0 then


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:05


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Poka? ca?y kod.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:07


Kakatus







Wiek: 25
Na forum: 2751 dni
Posty: 8
Nick w MP: kakatus



Respekt: 50

------------------------------------------------ PulsLife ------------------------------------------------
--                                       Skrypt serwera PulsLife                                        --
--                                                                                                      --
--                            U?YWANIE TYCH SKRYPT?WMAP I MODELI ZABRONIONE                           --
----------------------------------------------------------------------------------------------------------
local respawnedVehs = {}
local przechowalnie = {
{ped_przecho={1612.650390625, -1560.657226562514.170525550842},ped_name="Andrei Bruton",marker_wyjscie={1618.046875, -1554.397460937513.6621831893920},marker_wejscie={1607.7978515625, -1554.43164062515.58208656311},collNoCollision={1600.796875, -1561.789062512.0478376388522.4208}},
--{ped_przecho={-2418.30957031251029.16210937550.39062,0},colider_ped={-2418.355468751030.120117187550.390625},marker_wyjscie={-2426.410156251031.7812550.390625358.21194458008},marker_wejscie={-2436.7949218751031.01757812550.390625},brama={-2424.17285156251028.437550.39062590}}
}

addEventHandler("onColShapeHit"root, function(el,md)
    if getElementType(el) ~= "player" then return end
    if getElementData(source"przecho:wyjazd"then
        if isPedInVehicle(elthen return end
         bindKey(el"e""down"rozmowaStart)
        exports.rpg_noti:createNotification(el"info""Aby porazmawia? z NPC naci?nij E")
        setElementData(el"przecho:wyjazd"getElementData(source"przecho:wyjazd"))
        setElementData(el"przecho:rotacja"getElementData(source"przecho:rotacja"))
        setElementData(el"ped:name"getElementData(source"ped:name"))
    end
end)


function usunRozmowe thePlayer )
    if getElementData(source"przecho:wyjazd"then
       unbindKey(thePlayer"e""down"rozmowaStart)
       setElementData(thePlayer"hud:blockOpen"false)
       setElementData(thePlayer"przecho:wyjazd"false)
       setElementData(thePlayer"przecho:rotacja"false)
         setElementData(thePlayer"ped:name"false)
   end
end
addEventHandler "onColShapeLeave"resourceRootusunRozmowe )

function rozmowaStart(thePlayer)
    if getElementData(thePlayer"hud:blockOpen"then return end
    if isPedInVehicle(thePlayerthen return end

    local responseArray = { "Dzie? dobry""Czym si? zajmujesz?""Chcia?bym skorzysta? z waszych us?ug""Musz? ju? i??" }
    local event "SFPrzecho"
    setElementData(thePlayer"hud:blockOpen"true)
    triggerClientEventthePlayer"npc:talk"thePlayerresponseArrayevent1)
end

function SFPrzecho(thePlayerstateodp)
    local pedName getElementData(thePlayer"ped:name")
    if state == 1 then
        if odp == 1 then
        outputChatBox"#9E9E9E"..pedName..": #ffffffMamy du?o klient?w. Prosz? si? pospieszy?"thePlayer255255255true )
        setElementData(thePlayer"hud:blockOpen"false)
        elseif odp == 2 then
            outputChatBox"#9E9E9E"..pedName..": #ffffffMo?esz u mnie zostawi? samoch?d na przechowanie. Nasze siedziby znajduj? si? wsz?dzie. Zawsze mo?esz odebra? sw?j pojazd w jednej z nich."thePlayer255255255true )
            setElementData(thePlayer"hud:blockOpen"false)
        elseif odp == 3 then
            outputChatBox"#9E9E9E"..pedName..": #ffffffCzego potrzeba?"thePlayer255255255true )
            local responseArray = {"Chcia?bym odebra? specjalny pojazd""Chcia?bym odebra? sw?j pojazd""Dzi?kuj? za po?wi?cony czas""Do widzenia" }
            local event "SFPrzecho"
            setElementData(thePlayer"hud:blockOpen"true)
            triggerClientEventthePlayer"npc:talk"thePlayerresponseArrayevent2)
        elseif odp == 4 then
            outputChatBox"#9E9E9E"..pedName..": #ffffffDo zobaczenia."thePlayer255255255true )
            setElementData(thePlayer"hud:blockOpen"false)
        end

    elseif state == 2 then
        if odp == 1 then
            pokazListeForSpecialCars(thePlayer)
            setElementData(thePlayer"hud:blockOpen"false)
        elseif odp == 2 then
            pokazListe(thePlayer)
        elseif odp == 3 then
            outputChatBox"#9E9E9E"..pedName..": #ffffffProsz? mi nie zawraca? bezsensownie czasu nast?pnym razem dobrze?"thePlayer255255255true )
            setElementData(thePlayer"hud:blockOpen"false)
        elseif odp == 4 then
            outputChatBox"#9E9E9E"..pedName..": #ffffffDo zobaczenia."thePlayer255255255true )
            setElementData(thePlayer"hud:blockOpen"false)
        end
    end
end
addEvent("SFPrzecho",true)
addEventHandler("SFPrzecho",root,SFPrzecho)


addEventHandler("onResourceStart"resourceRoot, function ()
    for i,v in ipairs(przechowalnie) do
        local ped_x,ped_y,ped_zped_rot unpack(v["ped_przecho"])
        local ped createPed(120ped_xped_yped_zped_rot)
        createBlipped_xped_yped_z142255255255 2550370)
        setElementData(ped"name"v["ped_name"])
        setElementData(ped"role""[Obs?uga przechowalni]")
        setPedFrozenpedtrue)

        local x2,y2,z2 unpack(v["marker_wyjscie"])
        cs_wyjazd createColSphere(x2y2z23)

        local x,y,zw,d,unpack(v["collNoCollision"])
        local csCol createColCuboid (x,y,zw,d,h)

        addEventHandler("onColShapeHit",csCol, function(plr)
            if getElementType plr ) == "player" then
                if getPedOccupiedVehicle(plrthen
                    triggerClientEventplr"addGhostMode"plrgetPedOccupiedVehicle(plr))
                end
            end
        end)

        addEventHandler("onColShapeLeave",csCol, function(plr)
            if getElementType plr ) == "player" then
                if getPedOccupiedVehicle(plrthen
                    triggerClientEventplr"removeGhostMode"plrgetPedOccupiedVehicle(plr))
                end
            end
        end)


        addEventHandler("onColShapeLeave",cs_wyjazd,killTimerShape)

        local colX,colY,colZ getPositionInfrontOfElement(ped1)
        colider_ped createColSphere(colXcolYcolZ)
        setElementData(colider_ped"przecho:wyjazd"cs_wyjazd)
        setElementData(colider_ped"przecho:rotacja"v["marker_wyjscie"][4])
        setElementData(colider_ped"ped:name"v["ped_name"])

        local wjaX,wjaY,wjaZ unpack(v["marker_wejscie"])
        cs_wjazd createMarker(wjaXwjaYwjaZ-2.98"cylinder"5111772060)
        setElementData(cs_wjazd"isMarkerCustom"true)
        setElementData(cs_wjazd"customMarker:img""parking")
        setElementData(cs_wjazd"przecho:marker",true)

        addEventHandler("onMarkerHit"cs_wjazdoddajPojazd)
        addEventHandler("onColShapeLeave"colider_pedusunListe)
    end
end)

function killTimerShape(hit,dim)
    if not hit or not isElement(hitthen return end
    if getElementType(hit) == "vehicle" then
        if isTimer(getElementData(hit"onSpawnParkingTimer")) then
            killTimer(getElementData(hit"onSpawnParkingTimer"))
        end
    end
end

function pokazListeForSpecialCars(plr)
    local q exports.rpg_mysql:mysql_query("SELECT id FROM rpg_vehiclesSpecial WHERE parking=1 AND owner=? LIMIT 1"getElementData(plr"user:uid"))
    if #q > 0 then
        odbierzPojazd(plrq[1].id2)
    else
        local pedName getElementData(plr"ped:name")
        if getElementData(plr"user:plec") == 1 then
            outputChatBox"#9E9E9E"..pedName..": #ffffffNie posiadamy ?adnego pa?skiego pojazdu."plr255255255true )
        else
            outputChatBox"#9E9E9E"..pedName..": #ffffffNie zostawi?a pani u nas ?adnego pojazdu."plr255255255true )
        end
    end
end

function pokazListe(hit)
    if getElementType(hit) ~= "player" then return end
    if isPedInVehicle(hitthen return end
    local rent tostring("%"..getElementData(hit"user:imie").." "..getElementData(hit"user:nazwisko").."%")

    exports.rpg_mysql:mysql_query("SELECT * FROM rpg_vehicles WHERE (ownedPlayer=? AND parking=1) OR (rent LIKE ? AND parking=1)"getElementData(hit"user:uid"), rent)

    if #q > 0 then
        outputChatBox"#9E9E9E[Parkingowy] #ffffffKt?ry pojazd sobie ?yczysz?"hit255255255true )

        setElementData(hit ,"hud:blockOpen"true)
        setElementData(hit"hud:enabled"false)

        triggerClientEvent(hit"createLoadingWindow"hit"Wczytywanie pojazd?w w gara?u")
        setTimer(function() triggerClientEvent(hit"removeLoadingWindow"hitend2000)
        setTimer(function() triggerClientEvent(hit"showPrzechoWindow"hitqq2end1000)
    else
        local pedName getElementData(hit"ped:name")
        if getElementData(hit"user:plec") == 1 then
            outputChatBox"#9E9E9E"..pedName..": #ffffffNie posiadamy ?adnego pa?skiego pojazdu."hit255255255true )
        else
            outputChatBox"#9E9E9E"..pedName..": #ffffffNie zostawi?a pani u nas ?adnego pojazdu."hit255255255true )
        end
    return end
end

function usunListe(hitdim)
    setElementData(hit"przecho:wyjazd"false)
    setElementData(hit"przecho:rotacja"false)
end

function odbierzPojazd(playeruidtype)
    if type == 1 then
        local przecho_wyjazd getElementData(player"przecho:wyjazd")
        local x2,y2,z2 getElementPosition(przecho_wyjazd)
        local rz getElementData(player"przecho:rotacja")
        exports.rpg_mysql:mysql_query("SELECT parking FROM rpg_vehicles WHERE id = ?"uid)
        if tonumber(q[1].parking) == 0 then return end

        veh exports.rpg_vehicles:onRespawnVehicles(_,uid, {x2,y2,z2-20,0,0,rz}, true)
        exports.rpg_mysql:mysql_query("UPDATE rpg_vehicles SET parking=0 WHERE id=?"uid)

        setTimer(function()
            local x2,y2,z2 getElementPosition(przecho_wyjazd)
            setElementPosition(veh,x2,y2,z2)
            setElementRotation(veh0,0,rz)

            warpPedIntoVehicle(playerveh)

            triggerClientEventplayer"addGhostMode"playerveh)
        end10001)

        local timer setTimer(function()
            exports.rpg_vehicles:onSaveVehicle(veh)
            destroyElement(veh)
            local q exports.rpg_mysql:mysql_query("UPDATE rpg_vehicles SET parking=1 WHERE id=?"uid)
        end150001)

        setElementData(veh"onSpawnParkingTimer"timer)
        usunListe(player)

    else
        local przecho_wyjazd getElementData(player"przecho:wyjazd")
        local x2,y2,z2 getElementPosition(przecho_wyjazd)
        local rz getElementData(player"przecho:rotacja")
        exports.rpg_mysql:mysql_query("SELECT parking, model, date FROM rpg_vehiclesSpecial WHERE id = ? AND time > NOW()"uid)
        if tonumber(q[1].parking) == 0 then return end

        veh createVehicle(q[1].modelx2,y2,z2-20,0,0,rz)
        blip createBlipAttachedTo(veh0225525525525509999player)
        respawnedVehs[player] = {vehblip}
        setVehicleColor(respawnedVehs[player][1], 25518453255184532551845325518453)
        setElementData(respawnedVehs[player][1], "vehicle:spawnSpecial"true)
        setElementData(respawnedVehs[player][1], "vehicle:idSpecial"uid)
        setElementData(respawnedVehs[player][1], "vehicle:ownedPlayer"getElementData(player"user:uid"))
        setElementData(respawnedVehs[player][1], "vehicle:capacity"50)
        setElementData(respawnedVehs[player][1], "vehicle:fuel"50)
        setElementData(respawnedVehs[player][1], "vehicle:milage"0)
        setElementData(respawnedVehs[player][1], "vehicle:date"q[1].date)
        setElementData(respawnedVehs[player][1], "vehicle:respawned"getTickCount())

        exports.rpg_mysql:mysql_query("UPDATE rpg_vehiclesSpecial SET parking=0 WHERE id=?"uid)

        setTimer(function()
            local x2,y2,z2 getElementPosition(przecho_wyjazd)
            setElementPosition(respawnedVehs[player][1],x2,y2,z2)
            setElementRotation(respawnedVehs[player][1],0,0,rz)
            warpPedIntoVehicle(playerrespawnedVehs[player][1])

            triggerClientEventplayer"addGhostMode"playerrespawnedVehs[player][1])
        end10001)

        usunListe(player)
    end
end
addEvent("odbierzPojazd"true)
addEventHandler("odbierzPojazd"getRootElement(), odbierzPojazd)

function oddajPojazd(hitdim)
    if not hit or not isElement(hitthen return end
    if getElementType(hit) ~= "player" then return end
    if not isPedInVehicle(hitthen return end
    local veh getPedOccupiedVehicle(hit)
    local uid getElementData(veh"vehicle:id")
    if not uid then exports.rpg_noti:createNotification(hit"error""Nie mo?nesz odda? tego pojazdu do przechowywalni") return end
    local t1 setTimer(function()

        fadeCamera(hitfalse)
        t2 setTimer(
        function()
            fadeCamera(hittrue)
            exports.rpg_vehicles:onSaveVehicle(veh)
            local q,n,exports.rpg_mysql:mysql_query("UPDATE rpg_vehicles SET parking=1 WHERE id=?"uid)
            if q then
                removePedFromVehicle(hit)
                destroyElement(veh)
                exports.rpg_noti:createNotification(hit"success""Oddajesz sw?j pojazd do przechowywalni.")
            else
                exports.rpg_noti:createNotification(hit"error""Wystapi? problem podczas oddawania pojazdu do przechowywalni [ERR13]")
            end
        end20001)

    end,2000,1)
    setElementData(veh"przecho:timer"t1)
    setElementData(veh"przecho:timer2"t2)
end

function killTimerr(hit,dim)
    if not hit or not isElement(hitthen return end
    if getElementData(source"przecho:marker"then
        if getElementType(hit) == "vehicle" then
            if isTimer(getElementData(hit"przecho:timer")) then killTimer(getElementData(hit"przecho:timer")) end
            if isTimer(getElementData(hit"przecho:timer2")) then killTimer(getElementData(hit"przecho:timer2")) end
        end
    end
end
addEventHandler("onMarkerLeave",root,killTimerr)

function getPositionInfrontOfElement(elementmeters)
    if (not element or not isElement(element)) then return false end
    local meters = (type(meters) == "number" and meters) or 3
    local posXposYposZ getElementPosition(element)
    local __rotation getElementRotation(element)
    posX posX math.sin(math.rad(rotation)) * meters
    posY posY math.cos(math.rad(rotation)) * meters
    rot rotation math.cos(math.rad(rotation))
    return posXposYposZ rot
end


addEventHandler("onResourceStop"resourceRoot, function(resource)
    exports.rpg_mysql:mysql_query("UPDATE rpg_vehiclesSpecial SET parking=1")

    for iv in pairs(respawnedVehs) do
        if isElement(v[1]) then
            local uid getElementData(v[1], "vehicle:idSpecial")
            local date getElementData(v[1], "vehicle:date") - (getTickCount() - (getElementData(v[1], "vehicle:respawned"))/1000)
            if date 0 then
                exports.rpg_mysql:mysql_query("UPDATE rpg_vehiclesSpecial SET date=? WHERE id = ?"dateuid)
            else
                exports.rpg_mysql:mysql_query("DELETE FROM `rpg_vehiclesSpecial` WHERE id = ?"uid)
            end
            destroyElement(v[1])
        end
        if isElement(v[2]) then destroyElement(v[2]) end
    end
end)



function checkCarTime()
    for iv in pairs(respawnedVehs) do
        if isElement(v[1]) then
            local uid getElementData(v[1], "vehicle:idSpecial")
            local date getElementData(v[1], "vehicle:date") - (getTickCount() - (getElementData(v[1], "vehicle:respawned"))/1000)
            if date <= 0 then
                exports.rpg_mysql:mysql_query("DELETE FROM `rpg_vehiclesSpecial` WHERE id = ?"uid)
                if isElement(v[1]) then destroyElement(v[1]) end
                if isElement(v[2]) then destroyElement(v[2]) end
            end
        end
    end

    exports.rpg_mysql:mysql_query("DELETE FROM `rpg_vehiclesSpecial` WHERE `time` < NOW()")
end
checkCarTime()
setTimer(checkCarTime600000)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:13


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Czy mo?esz wys?a? funkcj? 'mysql_query' ze skryptu 'rpg_mysql'?
Chcia?bym zobaczy? w jaki spos?b zwracane s? dane z bazy danych MySQL.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:15


Kakatus







Wiek: 25
Na forum: 2751 dni
Posty: 8
Nick w MP: kakatus



Respekt: 50

------------------------------------------------ PulsLife ------------------------------------------------
--                                       Skrypt serwera PulsLife                                        --
--                                                                                                      --
--                            U?YWANIE TYCH SKRYPT?WMAP I MODELI ZABRONIONE                           --
----------------------------------------------------------------------------------------------------------
local mysql
function mysql_connect()
    mysql dbConnect("mysql""dbname=db_37291;host=94.23.90.14""db_32791""taelqvtastasdsx""share=1")
    if not mysql then
        outputDebugString("[rpg_mysql] Connection: false")
    else
        outputDebugString("[rpg_mysql] Connection: true")
        setNames()
    end
end
addEventHandler("onResourceStart"resourceRootmysql_connect)


function mysql_query(...)
    if string.find(table.concat({...}, " "), "DROP"then return end
    local qh dbQuery(mysql,  ...)
    if not qh then return false end
    local resultnum_affected_rowslast_insert_id dbPoll(qh, -1)
    return resultnum_affected_rowslast_insert_id
end

function setNames()
    if mysql then
        mysql_query("SET NAMES utf8")
    end
end


[ Dodano: 2018-11-24, 22:16 ]
Discord posiadasz? jesli tak to prosilbym o kontakt.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:19


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Spr?buj jedn? z dw?ch opcji poni?ej:

if q then


lub

if q[1then


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:25


Kakatus







Wiek: 25
Na forum: 2751 dni
Posty: 8
Nick w MP: kakatus



Respekt: 50

Pojawia sie wyciaganie z pojazdu lecz pojawia sie rowniez blad


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:29


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Wy?lij kod z pliku 'przecho_client.luac' ze skryptu 'rpg_garage'.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:30


Kakatus







Wiek: 25
Na forum: 2751 dni
Posty: 8
Nick w MP: kakatus



Respekt: 50

if guiGetScreenSize() < 1400 then
end
function isMouseInPosition(_ARG_0__ARG_1__ARG_2__ARG_3_)
  if not isCursorShowing() then
    return false
  end
  if _ARG_0_ <= getCursorPosition() * guiGetScreenSize() and getCursorPosition() * guiGetScreenSize() <= _ARG_0_ _ARG_2_ and _ARG_1_ <= getCursorPosition() * guiGetScreenSize() and getCursorPosition() * guiGetScreenSize() <= _ARG_1_ _ARG_3_ then
    return true
  else
    return false
  end
end
function openPrzechoWindow(_ARG_0__ARG_1_)
  vehicles1 = {}
  vehicles1 _ARG_0_
  _UPVALUE0_ 1
  _UPVALUE1_ createVehicle(vehicles1[1].model1600.671875, -1573.10742187514.80480098724400307)
  ped createPed(getElementModel(localPlayer), 1595.9453125, -1578.023437515.863374710083305.9382019043false)
  showChat(false)
  setTimer(function()
    if vehicles1[1].tuning ~= false and vehicles1[1].tuning ~= "" and vehicles1[1].tuning ~= nil then
      for _FORV_3__FORV_4_ in ipairs(split(vehicles1[1].tuning",")) do
        addVehicleUpgrade(_UPVALUE0__FORV_4_)
      end
    end
    setElementData(_UPVALUE0_"vehicle:neon"split(vehicles1[1].neon","))
    setVehiclePaintjob(_UPVALUE0_vehicles1[1].paintjob)
    setVehicleOverrideLights(_UPVALUE0_2)
    setElementHealth(_UPVALUE0_vehicles1[1].health)
    setVehicleHeadLightColor(_UPVALUE0_split(vehicles1[1].headlights",")[1], split(vehicles1[1].headlights",")[2], split(vehicles1[1].headlights",")[3])
    setVehicleColor(_UPVALUE0_split(vehicles1[1].color",")[1], split(vehicles1[1].color",")[2], split(vehicles1[1].color",")[3], split(vehicles1[1].color",")[4], split(vehicles1[1].color",")[5], split(vehicles1[1].color",")[6], split(vehicles1[1].color",")[7], split(vehicles1[1].color",")[8], split(vehicles1[1].color",")[9], split(vehicles1[1].color",")[10], split(vehicles1[1].color",")[11], split(vehicles1[1].color",")[12])
    setElementFrozen(localPlayertrue)
    addEventHandler("onClientRender"getRootElement(), render)
    setElementData(localPlayer"user:blockFP"true)
  end2001)
  setTimer(function()
    addEventHandler("onClientKey"rootclick)
  end10001)
end
addEvent("showPrzechoWindow"true)
addEventHandler("showPrzechoWindow"getRootElement(), openPrzechoWindow)
function clickAccept(_ARG_0_)
  if not _ARG_0_ then
    return
  end
  triggerServerEvent("odbierzPojazd"rootlocalPlayer_ARG_0_1)
  closePrzechoWindow()
end
addEvent("clickAccept"true)
addEventHandler("clickAccept"getRootElement(), clickAccept)
function closePrzechoWindow()
  removeEventHandler("onClientKey"rootclick)
  setTimer(function()
    removeEventHandler("onClientRender"getRootElement(), render)
    setCameraTarget(localPlayer)
    destroyElement(_UPVALUE0_)
    destroyElement(ped)
    setElementData(localPlayer"user:blockFP"false)
  end10001)
  triggerEvent("createLoadingWindow"localPlayer"Wczytywanie mapy 75wiata")
  setTimer(function()
    triggerEvent("removeLoadingWindow"localPlayer)
  end14001)
  setTimer(function()
    setElementFrozen(localPlayerfalse)
    setElementData(localPlayer"hud:blockOpen"false)
    setElementData(localPlayer"hud:enabled"true)
    hudSettings split(getElementData(localPlayer"hud:settings"), ",")
    if tonumber(hudSettings[4]) == 1 then
      showChat(true)
    end
  end16001)
end
addEvent("destroyPrzechoWindow"true)
addEventHandler("destroyPrzechoWindow"getRootElement(), closePrzechoWindow)
function render()
  setCameraMatrix(1608.9638671875, -1569.764648437516.3830623626711595.0498046875, -1575.7148437515.018062591553)
  dxDrawText(getVehicleName(_UPVALUE0_) or "ERROR"0_UPVALUE1_ 40 _UPVALUE2__UPVALUE3__UPVALUE1_ 40 _UPVALUE2_tocolor(220220220220), 1_UPVALUE4_"center""bottom")
  dxDrawImage(00520 _UPVALUE2_273 _UPVALUE2_"files/legend.png")
end
function click(_ARG_0__ARG_1_)
  if _ARG_0_ == "arrow_r" and _ARG_1_ then
    if _UPVALUE0_ #vehicles1 then
      return
    end
    _UPVALUE0_ _UPVALUE0_ 1
    fadeCamera(false0.3)
    if isTimer(timerOffthen
      killTimer(timerOff)
    end
    timerOff setTimer(function()
      fadeCamera(true0.5)
    end5001)
    setTimer(function()
      setElementModel(_UPVALUE0_vehicles1[_UPVALUE1_].model)
      if vehicles1[_UPVALUE1_].tuning ~= false and vehicles1[_UPVALUE1_].tuning ~= "" and vehicles1[_UPVALUE1_].tuning ~= nil then
        for _FORV_3__FORV_4_ in ipairs(split(vehicles1[_UPVALUE1_].tuning",")) do
          addVehicleUpgrade(_UPVALUE0__FORV_4_)
        end
      end
      setElementData(_UPVALUE0_"vehicle:neon", (split(vehicles1[_UPVALUE1_].neon",")))
      setVehicleOverrideLights(_UPVALUE0_2)
      setElementHealth(_UPVALUE0_vehicles1[_UPVALUE1_].health)
      setVehicleHeadLightColor(_UPVALUE0_split(vehicles1[_UPVALUE1_].headlights",")[1], split(vehicles1[_UPVALUE1_].headlights",")[2], split(vehicles1[_UPVALUE1_].headlights",")[3])
      setVehicleColor(_UPVALUE0_split(vehicles1[_UPVALUE1_].color",")[1], split(vehicles1[_UPVALUE1_].color",")[2], split(vehicles1[_UPVALUE1_].color",")[3], split(vehicles1[_UPVALUE1_].color",")[4], split(vehicles1[_UPVALUE1_].color",")[5], split(vehicles1[_UPVALUE1_].color",")[6], split(vehicles1[_UPVALUE1_].color",")[7], split(vehicles1[_UPVALUE1_].color",")[8], split(vehicles1[_UPVALUE1_].color",")[9], split(vehicles1[_UPVALUE1_].color",")[10], split(vehicles1[_UPVALUE1_].color",")[11], split(vehicles1[_UPVALUE1_].color",")[12])
    end4001)
  elseif _ARG_0_ == "arrow_l" and _ARG_1_ then
    if _UPVALUE0_ == 1 then
      return
    end
    _UPVALUE0_ _UPVALUE0_ 1
    fadeCamera(false0.3)
    if isTimer(timerOffthen
      killTimer(timerOff)
    end
    timerOff setTimer(function()
      fadeCamera(true0.5)
    end5001)
    setTimer(function()
      setElementModel(_UPVALUE0_vehicles1[_UPVALUE1_].model)
      if vehicles1[_UPVALUE1_].tuning ~= false and vehicles1[_UPVALUE1_].tuning ~= "" and vehicles1[_UPVALUE1_].tuning ~= nil then
        for _FORV_3__FORV_4_ in ipairs(split(vehicles1[_UPVALUE1_].tuning",")) do
          addVehicleUpgrade(_UPVALUE0__FORV_4_)
        end
      end
      setElementData(_UPVALUE0_"vehicle:neon", (split(vehicles1[_UPVALUE1_].neon",")))
      setVehicleOverrideLights(_UPVALUE0_2)
      setElementHealth(_UPVALUE0_vehicles1[_UPVALUE1_].health)
      setVehicleHeadLightColor(_UPVALUE0_split(vehicles1[_UPVALUE1_].headlights",")[1], split(vehicles1[_UPVALUE1_].headlights",")[2], split(vehicles1[_UPVALUE1_].headlights",")[3])
      setVehicleColor(_UPVALUE0_split(vehicles1[_UPVALUE1_].color",")[1], split(vehicles1[_UPVALUE1_].color",")[2], split(vehicles1[_UPVALUE1_].color",")[3], split(vehicles1[_UPVALUE1_].color",")[4], split(vehicles1[_UPVALUE1_].color",")[5], split(vehicles1[_UPVALUE1_].color",")[6], split(vehicles1[_UPVALUE1_].color",")[7], split(vehicles1[_UPVALUE1_].color",")[8], split(vehicles1[_UPVALUE1_].color",")[9], split(vehicles1[_UPVALUE1_].color",")[10], split(vehicles1[_UPVALUE1_].color",")[11], split(vehicles1[_UPVALUE1_].color",")[12])
    end4001)
  elseif _ARG_0_ == "enter" and _ARG_1_ then
    clickAccept(vehicles1[_UPVALUE0_].id)
  elseif _ARG_0_ == "backspace" and _ARG_1_ then
    closePrzechoWindow()
  end
end
function dxDrawBorder(_ARG_0__ARG_1__ARG_2__ARG_3__ARG_4__ARG_5__ARG_6_)
  _ARG_4_ _ARG_4_ or 2
  dxDrawRectangle(_ARG_0_ _ARG_4__ARG_1__ARG_4__ARG_3__ARG_5_ or tocolor(000180), _ARG_6_)
  dxDrawRectangle(_ARG_0_ _ARG_2__ARG_1__ARG_4__ARG_3__ARG_5_ or tocolor(000180), _ARG_6_)
  dxDrawRectangle(_ARG_0_ _ARG_4__ARG_1_ _ARG_4__ARG_2_ _ARG_4_ 2_ARG_4__ARG_5_ or tocolor(000180), _ARG_6_)
  dxDrawRectangle(_ARG_0_ _ARG_4__ARG_1_ _ARG_3__ARG_2_ _ARG_4_ 2_ARG_4__ARG_5_ or tocolor(000180), _ARG_6_)
end
function ghostmode_on(_ARG_0_)
  for _FORV_4__FORV_5_ in ipairs(getElementsByType("vehicle")) do
    setElementCollidableWith(_ARG_0__FORV_5_false)
    setElementCollidableWith(localPlayer_FORV_5_false)
  end
  _UPVALUE0_ setTimer(function()
    if isElement(_UPVALUE0_then
      for _FORV_3__FORV_4_ in ipairs(getElementsByType("vehicle")) do
        setElementCollidableWith(_UPVALUE0__FORV_4_false)
        setElementCollidableWith(localPlayer_FORV_4_false)
      end
    end
  end100000)
end
addEvent("addGhostMode"true)
addEventHandler("addGhostMode"getRootElement(), ghostmode_on)
function ghostmode_off(_ARG_0_)
  if isTimer(_UPVALUE0_then
    killTimer(_UPVALUE0_)
  end
  for _FORV_4__FORV_5_ in ipairs(getElementsByType("vehicle")) do
    if isElement(_ARG_0_then
      setElementCollidableWith(_ARG_0__FORV_5_true)
    end
    setElementCollidableWith(localPlayer_FORV_5_true)
  end
end
addEvent("removeGhostMode"true)
addEventHandler("removeGhostMode"getRootElement(), ghostmode_off)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:34


Kakatus







Wiek: 25
Na forum: 2751 dni
Posty: 8
Nick w MP: kakatus



Respekt: 50

44 linijka w c lua .
return

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:46


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Czy auto normalnie si? pojawia podczas wyci?gania go z przechowalni? (mam na my?li podgl?d, chyba tak zosta?o to tutaj wykonane)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 22:47


Kakatus







Wiek: 25
Na forum: 2751 dni
Posty: 8
Nick w MP: kakatus



Respekt: 50

Do zamkniecia naprawilem.

Postaw piwo autorowi tego posta
 

 
Tagi: przechowalnia
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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