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

Wysłany: 2019-11-07, 22:03


Kulegg







Wiek: 46
Na forum: 3266 dni
Posty: 283

Piwa: 20

Respekt: 50

Cze??,

Tak jak w tytule, po zdaniu prawa jazdy (testowa?em kat B). Gdy zdamy i wsi?dziemy do auta to mo?emy je?dzi? bo mamy prawko, ale po reconnec'tcie ju? usuwa nam prawko. Miesza?em w kodzie z tego prawka bo wklei?em du?? cz??? z innego skryptu prawka (te? z ogrpg-office) z ogrpg tak samo, i mo?liwe ?e oni mieli inny wygl?d kodu i np te PjA to u nich Pj albo katA czy jakos tak, dlatego pisze do was bo nie mam poj?cia jak naprawi? to :D

Kody w bazie danych kt?re zapisuje prawko:
PjA
PjB
PjC
PjL

Jest to domy?lny skrypt z ogrpg w ogrpg-office

s_zdawanie:

local wolneMiejsce=createColSphere(-1978.88, 461.45, 28.68,4)
local wolneMiejsce2=createColSphere(-1306.51, 73.28, 14.54,10)

addEvent("license:tp_player", true)
addEventHandler("license:tp_player", resourceRoot, function(player)
    fadeCamera(player, false, 1, 0, 0, 0)
    Timer(function()
        setElementInterior(player, 0)
        setElementDimension(player, 0)
        setElementPosition(player, 1310.11, -1370.11, 13.57)
    end, 1000, 1)
    Timer(fadeCamera, 1000, 1, player, true, 1)
end)

addEvent("license:zdaj", true)
addEventHandler("license:zdaj", resourceRoot, function(type)
    local dbid = getElementData(client, "player:uid")
    exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET pj"..type.."=? WHERE id=?", 1, dbid)
end)

addEvent("license:do",true)
addEventHandler("license:do", resourceRoot, function(cost,selected)    
    local result = exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_punish WHERE type=? AND active=? AND serial=? AND time>NOW()","prawko",1,getPlayerSerial(client))
    if #result >= 1 then outputChatBox("Posiadasz zawieszone licencje",client) return end
    
    if tonumber(cost) <= client.money then
        client:takeMoney(cost)
    end
    
    local veh = nil
    if selected == "A" then
        veh = createVehicle(586, 1278.11, -1372.41, 12.73, 359.2, 0.6, 179.9)
        client:setDimension(client:getData("player:uid"))
        veh:setDimension(client:getData("player:uid"))
    elseif selected == "B" then 
        veh = createVehicle(436, 1278.11, -1372.41, 13.03, 359.2, 0.6, 179.9)
        client:setDimension(client:getData("player:uid"))
        veh:setDimension(client:getData("player:uid"))
    elseif selected == "C" then
        veh = createVehicle(482, 1278.11, -1372.41, 13.53, 359.2, 0.6, 179.9)
        client:setDimension(client:getData("player:uid"))
        veh:setDimension(client:getData("player:uid"))
    elseif selected == "L" then
        veh = createVehicle(593, -1306.96, 75.25, 14.54, 0.41, 0.00, 134.39)
        client:setDimension(client:getData("player:uid"))
        veh:setDimension(client:getData("player:uid"))
    end
    
    if not veh then return end
    if selected == "L" then
        veh:setData("vehicle:desc", "Egzamin licencji lotniczej\nKategoria "..selected)
    else
        veh:setData("vehicle:desc", "Egzamin prawa jazdy\nKategoria "..selected)
        setVehicleHandling(veh, "maxVelocity", 57.0)
    end

    veh:setData("vehicle:fuel", 100)
    veh:setData("vehicle:mileage", math.random(500, 90000))
    veh:setData("vehicle:lic", true)
    client:setInterior(0)
        client:setDimension(0)
    client:warpIntoVehicle(veh, 0)
    
    triggerClientEvent(client, "license:start", resourceRoot, selected, veh)
    triggerClientEvent(client, "onClientAddNotification", client, "Przyst?pi?e?(a?) do egzaminu prawa jazdy na kategori? "..selected.."", "success")
end)

addEvent("license:vehdel", true)
addEventHandler("license:vehdel", resourceRoot, function(veh)
    veh:destroy()
end)

addEventHandler("onPlayerQuit", root, function()
    local vehicle = source.vehicle
    if not vehicle or vehicle:getController() ~= source or not vehicle:getData("vehicle:lic") then return false end
    vehicle:destroy()
end)

addEventHandler("onVehicleDamage", resourceRoot, function(loss)
    local vehicle_controller = getVehicleController(source)
    if not vehicle_controller or not source:getData("vehicle:lic") then return false end
    
    if source.model ~= 593 then
        if loss > 5 then 
            source:destroy()
            triggerClientEvent(vehicle_controller, "onClientAddNotification", vehicle_controller, "Uszkodzi?e?(a?) pojazd, nie zdajesz egzaminu!", "error")
            triggerClientEvent(vehicle_controller, "license:finish", resourceRoot, true)
            fadeCamera(vehicle_controller, false, 1)
            vehicle_controller:setDimension(0)
            Timer(fadeCamera, 1000, 1, vehicle_controller, true, 1)
            Timer(setElementInterior, 1000, 1, vehicle_controller, 0)
            Timer(setElementDimension, 1000, 0, vehicle_controller, 0)
            Timer(setElementPosition, 1000, 1, vehicle_controller, 1310.17, -1369.74, 13.57)    
        end
    else
        if loss > 100 then 
            source:destroy()
            triggerClientEvent(vehicle_controller, "onClientAddNotification", vehicle_controller, "Uszkodzi?e?(a?) samolot, nie zdajesz egzaminu!", "error")
            triggerClientEvent(vehicle_controller, "license:finish", resourceRoot, true)
            fadeCamera(vehicle_controller, false, 1)
            vehicle_controller:setDimension(0)
            Timer(fadeCamera, 1000, 1, vehicle_controller, true, 1)
            Timer(fadeCamera, 1000, 1, vehicle_controller, true, 1)
            Timer(setElementDimension, 1000, 0, vehicle_controller, 0)
            Timer(setElementPosition, 1000, 1, vehicle_controller, 1310.17, -1369.74, 13.57)    
        end
    end
end)

addEventHandler("onVehicleStartExit", resourceRoot, function()
    cancelEvent()
end)

addCommandHandler("lotgp", function(plr,cmd)
    local x,y,z=getElementPosition(plr)
    local p=string.format("{%.02f, %.02f, %.02f},", x,y,z)
    outputChatBox(p, plr)
end)

addCommandHandler("lotgp2", function(plr,cmd)
    local veh=getPedOccupiedVehicle(plr)
    if not veh then return end
    local x,y,z=getElementPosition(veh)
    local rx,ry,rz=getElementRotation(veh)
    local p=string.format("%.02f, %.02f, %.02f, %.02f, %.02f, %.02f", x,y,z,rx,ry,rz)
    outputChatBox(p, plr)
end)


c_zdawanie:

--[[
    Resource: OURGame v2
    Developers: Split <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c) 2015 <split.programista@gmail.com>. All rights reserved.
]]

local licenseBlip
local licenseTarget
local licenseMarker
local licenseVehicle
local licenseCategory

local categoryPositions={
    ["A"]={
        {1278.45, -1381.24, 12.95},
        {1272.64, -1393.26, 12.84},
        {1238.24, -1393.15, 12.82},
        {1173.26, -1393.07, 13.05},
        {1106.50, -1393.17, 13.15},
        {1077.09, -1393.56, 13.28},
        {1060.44, -1369.07, 13.08},
        {1060.25, -1340.21, 13.08},
        {1060.12, -1301.54, 13.26},
        {1060.36, -1251.03, 14.65},
        {1060.35, -1193.59, 19.78},
        {1060.31, -1164.27, 23.41},
        {1081.07, -1149.56, 23.35},
        {1117.17, -1149.22, 23.35},
        {1156.44, -1149.09, 23.34},
        {1208.08, -1149.24, 23.22},
        {1254.37, -1149.26, 23.35},
        {1289.16, -1148.83, 23.34},
        {1325.70, -1148.92, 23.34},
        {1340.37, -1162.06, 23.41},
        {1340.43, -1191.68, 20.05},
        {1340.49, -1235.80, 13.25},
        {1340.31, -1266.08, 13.07},
        {1350.23, -1282.44, 13.07},
        {1359.85, -1261.75, 13.08},
        {1373.88, -1242.90, 13.07},
        {1404.00, -1242.99, 13.07},
        {1437.61, -1243.07, 13.07},
        {1452.64, -1260.63, 13.07},
        {1452.50, -1288.23, 13.07},
        {1470.95, -1304.13, 13.14},
        {1509.20, -1304.50, 14.07},
        {1566.89, -1304.38, 16.71},
        {1634.57, -1304.56, 15.92},
        {1692.87, -1304.79, 13.24},
        {1721.82, -1303.24, 13.08},
        {1747.78, -1300.41, 13.15},
        {1774.21, -1288.49, 13.15},
        {1807.98, -1266.38, 13.15},
        {1832.73, -1263.44, 13.23},
        {1846.03, -1284.03, 13.08},
        {1845.69, -1323.04, 13.08},
        {1845.82, -1390.91, 13.08},
        {1845.93, -1466.35, 13.09},
        {1834.93, -1529.23, 13.08},
        {1819.60, -1593.57, 13.05},
        {1845.07, -1614.59, 13.08},
        {1893.89, -1614.57, 13.08},
        {1926.94, -1614.50, 13.07},
        {1939.51, -1635.68, 13.08},
        {1939.58, -1695.01, 13.07},
        {1939.67, -1737.01, 13.07},
        {1924.21, -1750.28, 13.07},
        {1895.72, -1750.20, 13.08},
        {1855.91, -1750.15, 13.08},
        {1836.32, -1750.05, 13.08},
        {1819.67, -1761.84, 13.07},
        {1819.47, -1799.20, 13.07},
        {1819.23, -1844.89, 13.11},
        {1819.07, -1878.18, 13.09},
        {1819.00, -1921.73, 13.07},
        {1833.39, -1934.28, 13.06},
        {1886.05, -1934.38, 13.07},
        {1946.43, -1934.60, 13.07},
        {1963.68, -1918.35, 13.08},
        {1963.79, -1884.80, 13.07},
        {1963.89, -1838.15, 13.07},
        {1963.83, -1775.96, 13.07},
        {1982.74, -1754.38, 13.07},
        {2057.85, -1754.45, 13.08},
        {2080.90, -1754.45, 13.08},
        {2100.93, -1732.05, 13.09},
        {2114.70, -1677.67, 13.07},
        {2114.76, -1606.72, 24.13},
        {2114.77, -1512.68, 23.43},
        {2114.75, -1477.39, 23.50},
        {2094.70, -1460.01, 23.49},
        {2059.81, -1459.76, 20.55},
        {2008.46, -1460.11, 13.08},
        {1943.69, -1460.06, 13.08},
        {1904.94, -1460.03, 13.08},
        {1865.69, -1460.00, 13.07},
        {1830.99, -1459.02, 13.06},
        {1776.82, -1447.13, 13.06},
        {1730.99, -1438.91, 13.06},
        {1628.21, -1438.89, 13.07},
        {1519.48, -1438.56, 13.07},
        {1469.76, -1438.40, 13.07},
        {1441.09, -1438.31, 13.07},
        {1423.00, -1421.44, 13.07},
        {1408.39, -1393.13, 13.07},
        {1370.89, -1393.23, 13.14},
        {1348.39, -1393.40, 13.09},
        {1326.18, -1393.30, 13.06},
        {1272.50, -1393.13, 12.85},
        {1260.91, -1374.14, 12.91},
        {1261.04, -1350.67, 12.81},
        {1269.22, -1336.76, 13.02},
        {1279.48, -1336.82, 13.05},
    },
    ["C"]={
        {1278.45, -1381.24, 12.95},
        {1272.64, -1393.26, 12.84},
        {1238.24, -1393.15, 12.82},
        {1173.26, -1393.07, 13.05},
        {1106.50, -1393.17, 13.15},
        {1077.09, -1393.56, 13.28},
        {1060.44, -1369.07, 13.08},
        {1060.25, -1340.21, 13.08},
        {1060.12, -1301.54, 13.26},
        {1060.36, -1251.03, 14.65},
        {1060.35, -1193.59, 19.78},
        {1060.31, -1164.27, 23.41},
        {1081.07, -1149.56, 23.35},
        {1117.17, -1149.22, 23.35},
        {1156.44, -1149.09, 23.34},
        {1208.08, -1149.24, 23.22},
        {1254.37, -1149.26, 23.35},
        {1289.16, -1148.83, 23.34},
        {1325.70, -1148.92, 23.34},
        {1340.37, -1162.06, 23.41},
        {1340.43, -1191.68, 20.05},
        {1340.49, -1235.80, 13.25},
        {1340.31, -1266.08, 13.07},
        {1350.23, -1282.44, 13.07},
        {1359.85, -1261.75, 13.08},
        {1373.88, -1242.90, 13.07},
        {1404.00, -1242.99, 13.07},
        {1437.61, -1243.07, 13.07},
        {1452.64, -1260.63, 13.07},
        {1452.50, -1288.23, 13.07},
        {1470.95, -1304.13, 13.14},
        {1509.20, -1304.50, 14.07},
        {1566.89, -1304.38, 16.71},
        {1634.57, -1304.56, 15.92},
        {1692.87, -1304.79, 13.24},
        {1721.82, -1303.24, 13.08},
        {1747.78, -1300.41, 13.15},
        {1774.21, -1288.49, 13.15},
        {1807.98, -1266.38, 13.15},
        {1832.73, -1263.44, 13.23},
        {1846.03, -1284.03, 13.08},
        {1845.69, -1323.04, 13.08},
        {1845.82, -1390.91, 13.08},
        {1845.93, -1466.35, 13.09},
        {1834.93, -1529.23, 13.08},
        {1819.60, -1593.57, 13.05},
        {1845.07, -1614.59, 13.08},
        {1893.89, -1614.57, 13.08},
        {1926.94, -1614.50, 13.07},
        {1939.51, -1635.68, 13.08},
        {1939.58, -1695.01, 13.07},
        {1939.67, -1737.01, 13.07},
        {1924.21, -1750.28, 13.07},
        {1895.72, -1750.20, 13.08},
        {1855.91, -1750.15, 13.08},
        {1836.32, -1750.05, 13.08},
        {1819.67, -1761.84, 13.07},
        {1819.47, -1799.20, 13.07},
        {1819.23, -1844.89, 13.11},
        {1819.07, -1878.18, 13.09},
        {1819.00, -1921.73, 13.07},
        {1833.39, -1934.28, 13.06},
        {1886.05, -1934.38, 13.07},
        {1946.43, -1934.60, 13.07},
        {1963.68, -1918.35, 13.08},
        {1963.79, -1884.80, 13.07},
        {1963.89, -1838.15, 13.07},
        {1963.83, -1775.96, 13.07},
        {1982.74, -1754.38, 13.07},
        {2057.85, -1754.45, 13.08},
        {2080.90, -1754.45, 13.08},
        {2100.93, -1732.05, 13.09},
        {2114.70, -1677.67, 13.07},
        {2114.76, -1606.72, 24.13},
        {2114.77, -1512.68, 23.43},
        {2114.75, -1477.39, 23.50},
        {2094.70, -1460.01, 23.49},
        {2059.81, -1459.76, 20.55},
        {2008.46, -1460.11, 13.08},
        {1943.69, -1460.06, 13.08},
        {1904.94, -1460.03, 13.08},
        {1865.69, -1460.00, 13.07},
        {1830.99, -1459.02, 13.06},
        {1776.82, -1447.13, 13.06},
        {1730.99, -1438.91, 13.06},
        {1628.21, -1438.89, 13.07},
        {1519.48, -1438.56, 13.07},
        {1469.76, -1438.40, 13.07},
        {1441.09, -1438.31, 13.07},
        {1423.00, -1421.44, 13.07},
        {1408.39, -1393.13, 13.07},
        {1370.89, -1393.23, 13.14},
        {1348.39, -1393.40, 13.09},
        {1326.18, -1393.30, 13.06},
        {1272.50, -1393.13, 12.85},
        {1260.91, -1374.14, 12.91},
        {1261.04, -1350.67, 12.81},
        {1269.22, -1336.76, 13.02},
        {1279.48, -1336.82, 13.05},
    },
    ["B"]={
        {1278.45, -1381.24, 12.95},
        {1272.64, -1393.26, 12.84},
        {1238.24, -1393.15, 12.82},
        {1173.26, -1393.07, 13.05},
        {1106.50, -1393.17, 13.15},
        {1077.09, -1393.56, 13.28},
        {1060.44, -1369.07, 13.08},
        {1060.25, -1340.21, 13.08},
        {1060.12, -1301.54, 13.26},
        {1060.36, -1251.03, 14.65},
        {1060.35, -1193.59, 19.78},
        {1060.31, -1164.27, 23.41},
        {1081.07, -1149.56, 23.35},
        {1117.17, -1149.22, 23.35},
        {1156.44, -1149.09, 23.34},
        {1208.08, -1149.24, 23.22},
        {1254.37, -1149.26, 23.35},
        {1289.16, -1148.83, 23.34},
        {1325.70, -1148.92, 23.34},
        {1340.37, -1162.06, 23.41},
        {1340.43, -1191.68, 20.05},
        {1340.49, -1235.80, 13.25},
        {1340.31, -1266.08, 13.07},
        {1350.23, -1282.44, 13.07},
        {1359.85, -1261.75, 13.08},
        {1373.88, -1242.90, 13.07},
        {1404.00, -1242.99, 13.07},
        {1437.61, -1243.07, 13.07},
        {1452.64, -1260.63, 13.07},
        {1452.50, -1288.23, 13.07},
        {1470.95, -1304.13, 13.14},
        {1509.20, -1304.50, 14.07},
        {1566.89, -1304.38, 16.71},
        {1634.57, -1304.56, 15.92},
        {1692.87, -1304.79, 13.24},
        {1721.82, -1303.24, 13.08},
        {1747.78, -1300.41, 13.15},
        {1774.21, -1288.49, 13.15},
        {1807.98, -1266.38, 13.15},
        {1832.73, -1263.44, 13.23},
        {1846.03, -1284.03, 13.08},
        {1845.69, -1323.04, 13.08},
        {1845.82, -1390.91, 13.08},
        {1845.93, -1466.35, 13.09},
        {1834.93, -1529.23, 13.08},
        {1819.60, -1593.57, 13.05},
        {1845.07, -1614.59, 13.08},
        {1893.89, -1614.57, 13.08},
        {1926.94, -1614.50, 13.07},
        {1939.51, -1635.68, 13.08},
        {1939.58, -1695.01, 13.07},
        {1939.67, -1737.01, 13.07},
        {1924.21, -1750.28, 13.07},
        {1895.72, -1750.20, 13.08},
        {1855.91, -1750.15, 13.08},
        {1836.32, -1750.05, 13.08},
        {1819.67, -1761.84, 13.07},
        {1819.47, -1799.20, 13.07},
        {1819.23, -1844.89, 13.11},
        {1819.07, -1878.18, 13.09},
        {1819.00, -1921.73, 13.07},
        {1833.39, -1934.28, 13.06},
        {1886.05, -1934.38, 13.07},
        {1946.43, -1934.60, 13.07},
        {1963.68, -1918.35, 13.08},
        {1963.79, -1884.80, 13.07},
        {1963.89, -1838.15, 13.07},
        {1963.83, -1775.96, 13.07},
        {1982.74, -1754.38, 13.07},
        {2057.85, -1754.45, 13.08},
        {2080.90, -1754.45, 13.08},
        {2100.93, -1732.05, 13.09},
        {2114.70, -1677.67, 13.07},
        {2114.76, -1606.72, 24.13},
        {2114.77, -1512.68, 23.43},
        {2114.75, -1477.39, 23.50},
        {2094.70, -1460.01, 23.49},
        {2059.81, -1459.76, 20.55},
        {2008.46, -1460.11, 13.08},
        {1943.69, -1460.06, 13.08},
        {1904.94, -1460.03, 13.08},
        {1865.69, -1460.00, 13.07},
        {1830.99, -1459.02, 13.06},
        {1776.82, -1447.13, 13.06},
        {1730.99, -1438.91, 13.06},
        {1628.21, -1438.89, 13.07},
        {1519.48, -1438.56, 13.07},
        {1469.76, -1438.40, 13.07},
        {1441.09, -1438.31, 13.07},
        {1423.00, -1421.44, 13.07},
        {1408.39, -1393.13, 13.07},
        {1370.89, -1393.23, 13.14},
        {1348.39, -1393.40, 13.09},
        {1326.18, -1393.30, 13.06},
        {1272.50, -1393.13, 12.85},
        {1260.91, -1374.14, 12.91},
        {1261.04, -1350.67, 12.81},
        {1269.22, -1336.76, 13.02},
        {1279.48, -1336.82, 13.05},
         
    },
    ["L"]={
        {413.22, 2508.45, 16.98},
        {333.02, 2510.17, 17.81},
        {237.28, 2509.11, 34.80},
        {138.16, 2509.30, 52.04},
        {55.60, 2509.35, 82.06},
        {0.92, 2507.86, 104.80},
        {-38.97, 2456.81, 99.51},
        {13.88, 2372.89, 101.60},
        {121.39, 2326.92, 83.42},
        {252.37, 2276.14, 38.69},
        {354.88, 2278.69, 69.68},
        {443.05, 2351.14, 43.14},
        {448.44, 2438.52, 48.34},
        {355.15, 2455.51, 46.60},
        {292.87, 2515.25, 58.50},
        {346.60, 2583.21, 56.50},
        {441.44, 2551.18, 56.60},
        {556.46, 2552.09, 61.06},
        {657.66, 2561.77, 74.49},
        {678.70, 2495.53, 93.96},
        {602.38, 2464.61, 94.88},
        {525.70, 2489.49, 87.52},
        {442.01, 2501.05, 45.21},
        {353.07, 2500.90, 27.99},
        {277.30, 2506.57, 17.01},
        {213.16, 2508.25, 17.03},
        {168.64, 2493.37, 16.96},
        {186.71, 2479.14, 16.96},
        {239.11, 2480.49, 17.00},
        {290.19, 2491.78, 16.98},
        {292.48, 2525.48, 17.28},
        {288.39, 2550.45, 17.28},
    },
    ["T"]={
        {-198.44, 1068.28, 19.59},
        {-212.64, 1021.00, 19.59},
        {-272.87, 1036.33, 19.59},
        {-303.12, 1065.90, 19.59},
        {-333.20, 1101.14, 19.59},
        {-322.88, 1145.96, 19.59},
        {-261.95, 1195.71, 19.59},
        {-126.29, 1195.98, 19.58},
        {-118.64, 1157.00, 19.59},
        {-179.50, 1150.61, 19.60},
        {-209.20, 1100.95, 19.59},
    },
}

function finishLicense(value)
    if isElement(licenseMarker) and licenseMarker then
        destroyElement(licenseMarker)
        licenseMarker=nil
    end
    if isElement(licenseBlip) and licenseBlip then
        destroyElement(licenseBlip)
        licenseBlip=nil
    end
    if value == true then
        licenseCategory=nil
        licenseVehicle=nil
        licenseMarker=nil
        licenseTarget=nil
        licenseBlip=nil
    end
end
addEvent("license:finish",true)
addEventHandler("license:finish", resourceRoot, finishLicense)

function showMarker()
    local pos=categoryPositions[licenseCategory][licenseTarget]
    if licenseCategory ~= "L" then
    licenseMarker=createMarker(pos[1], pos[2], pos[3], "checkpoint", 1.5, 0, 0, 255, 155)
    else
    licenseMarker=createMarker(pos[1], pos[2], pos[3], "ring", 3.5, 0, 0, 255, 155)
    end
    licenseBlip=createBlip(pos[1], pos[2], pos[3], 0, 1.15, 0, 255, 0)
    if categoryPositions[licenseCategory][licenseTarget+1] then
          e=categoryPositions[licenseCategory][licenseTarget+1]
        setMarkerTarget(licenseMarker, e[1], e[2], e[3])
    end
    addEventHandler("onClientMarkerHit", licenseMarker, function(el,md)
        if not md or el~=localPlayer then return end
        if not getPedOccupiedVehicle(el) then return end
        if licenseTarget < #categoryPositions[licenseCategory] then
            --local sound=playSound(":ogrpg-misc/misc/point.wav")
            --setSoundVolume(sound, 1.0)
            
            finishLicense(false)
            licenseTarget=licenseTarget+1
            showMarker()
        else
            --local sound=playSound(":ogrpg-misc/misc/success.flac")
            --setSoundVolume(sound, 1.0)

            outputChatBox("* Zda?e?(a?) egzamin. Gratulacje!")
            triggerServerEvent("license:vehdel", resourceRoot, licenseVehicle)
            setElementData(localPlayer,"player:license:pj"..licenseCategory, 1)
            finishLicense(true)
        end
    end)
end

addEvent("license:start",true)
addEventHandler("license:start", resourceRoot, function(category,vehicle)
    licenseTarget=1
    licenseBlip=nil
    licenseMarker=nil
    licenseCategory=category
    licenseVehicle=vehicle
    showMarker()
end)

punkty={}

function nalicz()
    local veh=getPedOccupiedVehicle(localPlayer)
    if not veh then return end
    local x,y,z=getElementPosition(veh)
    table.insert(punkty, {x,y,z})
    outputChatBox("* Dodano")
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-07, 22:08


Szypki_exe







Wiek: 22
Na forum: 3380 dni
Posty: 172

Piwa: 1426

Respekt: 150
Respekt: 150Respekt: 150

W evencie "license:zdaj" jest ?le oznaczony element gracza - zmie? go z "client" na "source"

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-11-07, 23:05


Wilq







Wiek: 24
Na forum: 4569 dni
Posty: 3409

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Nie wiem, czy wiesz, ale 'client' to jak najbardziej poprawna zmienna. Nic nie zmieniaj przy niej.

Natomiast prawid?owym rozwi?zaniem jest triggerowanie tego eventu 'license:zdaj' po uko?czeniu egzaminu, bo nie wydaje mi si?, ?eby? gdzie? to robi?. Zobacz czy w tym evencie masz dobrze wskazane kolumny i w triggerze uwzgl?dnij kategori? egzaminu.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Kulegg
Wysłany: 2019-11-08, 15:21


Kulegg







Wiek: 46
Na forum: 3266 dni
Posty: 283

Piwa: 20

Respekt: 50

Doda?em jak radzi?e?, trigger, zaraz po license:zdaj:

triggerServerEvent("license:zdaj", resourceRoot, licenseCategory)

I uda?o si?, dzi?kuje ci bardzo, zimne :piwo: dla ciebie :D

Postaw piwo autorowi tego posta
 

 
Tagi: brak :: zapisywania :: się :: prawa :: jazdy :: zrobieniu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Brak zapisywania się prawa jazdy po zrobieniu go 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