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

Wysłany: 2019-10-17, 01:10


Cfeluszek

Uczeń LUA






Wiek: 24
Na forum: 3460 dni
Posty: 38
Nick w MP: R0B3RC1K

Piwa: 183

Respekt: 50

Cze??, wi?c zrobi?em skrypt do montowania Nitra i Paintjoba lecz jak klikam zeby kupic to bierze pieniadze i pisze ze naklejono paintjob, w bazie danych ID paintjoba sie zmienia lecz po wyjeciu auta z przecho paintjob Wraca na ten przed monta?em.
]m?j kod Client:
GUIEditor = {
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart"resourceRoot,
    function()
local screenWscreenH guiGetScreenSize()
        GUIEditor.window[1] = guiCreateWindow((screenW 678) / 2, (screenH 598) / 2678598"Monta? Nitra, Painjob?w"false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetProperty(GUIEditor.window[1], "CaptionColour""FFFF0000")

        GUIEditor.button[1] = guiCreateButton(23238204119"NITRO X5 - DU?A BUTLA\n\n$150000,000"falseGUIEditor.window[1])
        guiSetFont(GUIEditor.button[1], "default-bold-small")
        guiSetProperty(GUIEditor.button[1], "NormalTextColour""FFFE7700")
        
        GUIEditor.button[2] = guiCreateButton(1037201120"NITRO X2 - MA?A BUTLA\n\n$100000,000"falseGUIEditor.window[1])
        guiSetFont(GUIEditor.button[2], "default-bold-small")
        guiSetProperty(GUIEditor.button[2], "NormalTextColour""FFFE7700")
        
        GUIEditor.button[3] = guiCreateButton(45438214119"NITRO X10 - DWIE MA?E BUTLE\n\n$200000,000"falseGUIEditor.window[1])
        guiSetFont(GUIEditor.button[3], "default-bold-small")
        guiSetProperty(GUIEditor.button[3], "NormalTextColour""FFFE7700")
        
        GUIEditor.button[4] = guiCreateButton(9439202119"Paintjob ID:3\n\n$15000,000"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour""FFFD0000")
        
        GUIEditor.button[5] = guiCreateButton(451293207119"Painjob ID:2\n\n$15000,000"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour""FFFD0000")
        
        GUIEditor.button[6] = guiCreateButton(10293201119"Paintjob ID: 0\n\n$15000,000"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour""FFFD0000")
        
        GUIEditor.button[7] = guiCreateButton(22148923893"Zamknij"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour""FFFEFEFE")
        
        GUIEditor.button[8] = guiCreateButton(231293201119"Paintjob ID: 1\n\n$15000,000"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour""FFFD0000")    
    end
)

addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)

addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)

marker createMarker(781.476, -1351.49713.25'cylinder'425500120)
--createBlipAttachedTo(marker63)

function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayerthen return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
end
addEventHandler("onClientMarkerHit"markerhit)


function pj0()
if source ~= GUIEditor.button[6then return end
    triggerServerEvent("pj0"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end

addEventHandler "onClientGUIClick"rootpj0)


function pj1()
if source ~= GUIEditor.button[8then return end
    triggerServerEvent("pj1"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end

addEventHandler "onClientGUIClick"rootpj1)

function pj2()
if source ~= GUIEditor.button[5then return end
    triggerServerEvent("pj2"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end

addEventHandler "onClientGUIClick"rootpj2)

function pj3()
if source ~= GUIEditor.button[4then return end
    triggerServerEvent("pj3"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end

addEventHandler "onClientGUIClick"rootpj3)

function zamknij()
if source ~= GUIEditor.button[7then return end
   guiSetVisible(GUIEditor.window[1],false)
end
addEventHandler "onClientGUIClick"rootzamknij)


function zamykamy()
if source ~= GUIEditor.button[7then return end
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end

addEventHandler "onClientGUIClick"rootzamykamy)



I to m?j kod Server.lua
nitrox2 100000
nitrox5 150000
nitrox10 200000
pj0 15000
pj1 15000
pj2 15000
pj3 15000

local napis=createElement("text")
setElementData(napis"name""Lakiernia specjalna\n\nPaintjob (0-3) - 15k\nAtrapy 100-200k")
setElementPosition(napis781.476, -1351.49713.25)

addEvent("pj0"true)
addEventHandler("pj0"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(pj0)) then
  local id getElementData(pojazd"vehicle:id")
  exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET paintjob=0 WHERE id=?"id)
         outputChatBox("* Pomy?lnie naklejono Paintjob."source,true)
     outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!"source,true)
         takePlayerMoneysourcepj0 )
    else
         outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)


addEvent("pj1"true)
addEventHandler("pj1"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(pj1)) then
  local id getElementData(pojazd"vehicle:id")
  exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET paintjob=1 WHERE id=?"id)
     outputChatBox("* Pomy?lnie naklejono Paintjob."source,true)
     outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!"source,true)
     takePlayerMoneysourcepj1 )
  else
     outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)

addEvent("pj2"true)
addEventHandler("pj2"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(pj2)) then
  local id getElementData(pojazd"vehicle:id")
  exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET paintjob=2 WHERE id=?"id)
         outputChatBox("* Pomy?lnie naklejono Paintjob."source,true)
     outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!"source,true)
         takePlayerMoneysourcepj2 )
    else
         outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)

addEvent("pj3"true)
addEventHandler("pj3"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(pj3)) then
  local id getElementData(pojazd"vehicle:id")
  exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET paintjob=3 WHERE id=?"id)
     outputChatBox("* Pomy?lnie naklejono Paintjob."source,true)
     outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!"source,true)
     takePlayerMoneysourcepj3 )
  else
     outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-10-17, 06:50


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Pomi?my fakt, ?e Tw?j kod jest napisany beznadziejnie. Po co tak du?o i event?w? Wszystko mo?na w jednym zrobi?...

Poka? kod od przechowalni.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-10-17, 14:20


Cfeluszek

Uczeń LUA






Wiek: 24
Na forum: 3460 dni
Posty: 38
Nick w MP: R0B3RC1K

Piwa: 183

Respekt: 50

"Wilq" napisał/a:

Pomi?my fakt, ?e Tw?j kod jest napisany beznadziejnie. Po co tak du?o i event?w? Wszystko mo?na w jednym zrobi?...

Poka? kod od przechowalni.

Client:

local screenWscreenH guiGetScreenSize()
mojeW,mojeH 12801024
sW,sH guiGetScreenSize()
w= (sW/mojeW), (sH/mojeH)
local sxsy guiGetScreenSize ()
 
 przecho false
 
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

przechowalnie = {
{{1556.92, -1786.2013.55},setElementData(createMarker(1556.92, -1786.2013.55-1"cylinder"1.2012225550),"przecho:id",1),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(1557.56, -1783.3313.55-25.07.05.0),{1561.69, -1780.7213.31360.00.0270}},
{{2208.711253.7410.82},setElementData(createMarker(2208.711253.7410.82-1"cylinder"1.2012225550),"przecho:id",2),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColCuboid(2199.94873046881239.85559082039.82031259.510.5,  3.75),{2204.841247.1310.930.00.090.0}},
{{1943.05, -2232.7413.55},setElementData(createMarker(1943.05, -2232.7413.55-0.9"cylinder"1.20122255255,50),"przecho:id",3),{['Plane']=true,['Helicopter']=true,},"Samoloty i Helikoptery"createColCuboid(1911.2316894531, -2258.297607421912.54687520.2525.7515),{1921.82, -2243.5614.470.5360.0180.0}},
{{1983.181, -2068.81113.382},setElementData(createMarker(1983.181, -2068.81113.382-1"cylinder"1.2012225550),"przecho:id",4),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle",createColSphere(1988.609, -2066.34513.2353),{1988.609, -2066.34513.235359.6030.0370.552}},
}

for i,p in pairs(przechowalnie) do
local t=createElement("text")
setElementData(t,"scale",1.0)
setElementData(t,"name",("Odbi?r pojazd?w\n (%s)"):format(p[4]))
setElementPosition(t,p[1][1],p[1][2],p[1][3])

end

ID_PRZECHO_DO_JAKIEJ_WLAZLES nil

local wm={}
wm.gridlist=guiCreateGridList(357*w393*h567*w218*hfalse)
guiGridListAddColumn(wm.gridlist"ID"0.19)
guiGridListAddColumn(wm.gridlist"Model"0.19)
guiGridListAddColumn(wm.gridlist"Paliwo (L)"0.19)
guiGridListAddColumn(wm.gridlist"Przebieg (KM)"0.19)
guiGridListAddColumn(wm.gridlist"Ostatni Kierowca"0.19)
guiSetVisible(wm.gridlistfalse)
guiSetAlpha(wm.gridlist0.8)
guiSetFont(wm.gridlist"default-bold-small")
--guiSetProperty(wm.gridlist"NormalTextColour""FFFF0000")


addEvent("onParkingGetVehicles"true)
addEventHandler("onParkingGetVehicles"root, function(result,id)
    guiGridListClear(wm.gridlist)
    if not result then return end
    for i,v in pairs(result) do
        if v["mk1"] == "false" then
        v["mk1"] = "NIE"
        else
        v["mk1"] = "TAK"
        end
        local row=guiGridListAddRow(wm.gridlist)
        if przechowalnie[id][3][getVehicleType(v["model"])] then
            kierowcaa v["driver"]
            if not kierowcaa or kierowcaa == "" or kierowcaa == " " then kierowcaa "Dopiero zakupiony" end
            guiGridListSetItemText(wm.gridlistrow1v["id"], falsefalse)
            guiGridListSetItemText(wm.gridlistrow2getVehicleNameFromModel(v["model"]), falsefalse)
            guiGridListSetItemText(wm.gridlistrow3v["fuel"], falsefalse)
            guiGridListSetItemText(wm.gridlistrow4v["mileage"], falsefalse)
            guiGridListSetItemText(wm.gridlistrow5kierowcaafalsefalse)
            --guiGridListSetItemColor(wm.gridlistrow50122255 )
        end
    end
end)

addEventHandler("onClientMarkerHit"root, function(el,md)
    if not source then return end
    local id getElementData(source,"przecho:id")
    if not id then return end
    if el~=localPlayer then return end
    if isPedInVehicle(elthen return end
    if guiGetVisible(wm.gridlist) == false then
        showCursor(true)
        guiSetVisible(wm.gridlist,true)
        if przecho == false then
        addEventHandler("onClientRender",root,gui)
        przecho true
        triggerServerEvent("onParkingGetRekords"root,id)
        ID_PRZECHO_DO_JAKIEJ_WLAZLES id
        --etCameraMatrix(-2056.26468.7738.49, -2048.08467.7335.17)
    end
    end
end)

addEventHandler("onClientClick"root, function(btnstate)
    if btn == "left" and state == "down" then
    if przecho == true then
    if mysz(718*w624*h210*w78*hthen
        if guiGetVisible(wm.gridlist) == true then
            showCursor(false)
            guiSetVisible(wm.gridlist,false)
            removeEventHandler("onClientRender",root,gui)
            przecho false
            setCameraTarget(localPlayerlocalPlayer)
        end
    end
    if przecho == true then
    if mysz(352*w624*h210*w78*hthen
        local selectedRow=guiGridListGetSelectedItem(wm.gridlist) or -1
        if selectedRow 0 then return end
        local vehicles=getElementsWithinColShape(przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][5],"vehicle")
        if #vehicles > 0 then
            triggerEvent('onClientAddNotification'localPlayer'Miejsce jest zastawione, nie mo?esz wyci?gn?? pojazdu. Je?li kto? zastawia miejsce celowo, zg?o? to administracji za pomoc? komendy /raport.''error')
            return
        end
        local id=guiGridListGetItemText(wm.gridlistselectedRow1)
        local register=guiGridListGetItemText(wm.gridlistselectedRow3)
        if register == "NIE" then
        outputChatBox("*Zarejestruj pojazd w urz?dzie! Jego ID to "..id,255,0,0)
        return end
        guiGridListRemoveRow(wm.gridlistselectedRow)
        triggerServerEvent("onParkingVehicleSpawn"localPlayertonumber(id),przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][6], localPlayer)
    end
    end
    end
    end
end)


function gui()
        dxDrawImage(315*w313*h650*w400*h"przechowalnia-psrpg.png"000tocolor(255255255255), false)
end

function render1()
dxDrawText(" Nie ma miejsca aby wyci?gn?? pojazd"screenW 0.3656screenH 0.1553screenW 0.6273screenH 0.3193tocolor(0122255255), 1.50"pricedown""center""center"falsefalsefalsefalsefalse)
end

function renderstop1()
removeEventHandler("onClientRender",root,render1)
end


Server:

chowalnie = {
{{1912.07, -2276.3713.55},createMarker(1912.07, -2276.3713.55-3"cylinder"70122255,50),setElementData(createColCuboid(1907.7822265625, -2281.652587890612.5468759.2510.2515),"przecho:chowanie:id",1),{["Plane"]=true,["Helicopter"]=true,},"Samoloty i Helikoptery"},
{{1559.73, -1791.8613.55},createMarker(1559.73, -1791.8613.55-4"cylinder"5012225550),setElementData(createColCuboid(1556.41, -1795.7713.55-1.37.57,5),"przecho:chowanie:id",2),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle"},
{{2206.281212.9210.81},createMarker(2206.281212.9210.81-4"cylinder"5012225550),setElementData(createColCuboid(2202.41870117191209.535156259.82031256.756.53.25),"przecho:chowanie:id",3),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle"},
{{1977.88, -2067.01713.386},createMarker(1977.88, -2067.01713.386-4"cylinder"5012225550),setElementData(createColSphere(1977.88, -2067.01713.3863),"przecho:chowanie:id",4),{['Automobile']=true,['Bike']=true,['BMX']=true,['Quad']=true,['Monster Truck']=true,},"Samochody i motocykle"},
}

for _,c in pairs(chowalnie) do
createBlip(c[1][1],c[1][2],c[1][3], 35,2,0,0,0,0,0,250)
local t=createElement("text")
setElementData(t,"scale",1.0)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,c[1][1],c[1][2],c[1][3])
end

addEvent("onParkingGetRekords"true)
addEventHandler("onParkingGetRekords"root, function(id)
    local sid=getElementData(client,"player:sid")
    if not sid then return end
    local org getElementData(client,"player:organization")
    local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",sid,org or "Brak")
    if #result > 0 then
        triggerClientEvent(client"onParkingGetVehicles"rootresult,id)
    end
end)

addEventHandler("onColShapeHit"root, function(el,md)
    local id_chow getElementData(source,"przecho:chowanie:id")
    if not id_chow then return end
    if getElementType(el) == "player" then
        local veh=getPedOccupiedVehicle(el)
        if not veh then return end
        if getVehicleController(veh) ~= el then return end
        local id=getElementData(veh,"vehicle:id")
        if not id then return end
        if chowalnie[id_chow][4][getVehicleType(veh)] then
        if isTimer(timeroddaniathen return end
        setElementFrozen(veh,true)
        --outputChatBox("Trwa oddawanie  pojazdu."el,255,255,255,true)
        toggleControl(el,"enter_exit",false)
        setElementFrozen(veh,false)
        local id=getElementData(veh,"vehicle:id")
        if not id then return end
        exports["pystories-vehicles"]:onSaveVehicle(veh)
        destroyElement(veh)
        exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1,tp_to_parking=? WHERE id=?","Schowany recznie(kierowca)"id)
        toggleControl(el,"enter_exit",true)
        outputChatBox("#06B200(&#10004;) #FFFFFFPomy?lnie zapisano pojazd."el255255 ,255 ,true)
        end
    elseif getElementType(el) == "vehicle" then
        local gracz=getVehicleController(el)
        if gracz then return end
        local id=getElementData(el,"vehicle:id")
        if not id then return end
        if chowalnie[id_chow][4][getVehicleType(veh)] then
        if isTimer(timeroddaniathen return end
        timeroddania=setTimer(function()
            setElementFrozen(el,false)
            local id=getElementData(el,"vehicle:id")
            if not id then return end
            exports["pystories-vehicles"]:onSaveVehicle(el)
            destroyElement(el)
            exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1,tp_to_parking=? WHERE id=?","Schowany recznie(bez kierowcy)"id)
            outputChatBox("#06B200(&#10004;) #FFFFFFPomy?lnie zapisano pojazd."el255255 ,255 ,true)
        end30001)
        setElementFrozen(el,true)
        setVehicleLocked(el,true)
        end
    end
end)

addEvent("onParkingVehicleSpawn"true)
addEventHandler("onParkingVehicleSpawn"root, function(id,miejsce,plr)
    if not id then return end
    if not miejsce then return end
    miejsce = {miejsce[1], miejsce[2], miejsce[3] + 0.3miejsce[4], miejsce[5], miejsce[6]}
    local spawn=exports["pystories-vehicles"]:onRespawnVehicles(_,id,miejsce,plr)
    if spawn then
        setElementFrozenspawntrue )
        warpPedIntoVehicleplrspawn)
    end
end)



function render1()
dxDrawText("Zrespiono pojazd"screenW 0.3656screenH 0.1553screenW 0.6273screenH 0.3193tocolor(255255255255), 2.50"pricedown""center""center"falsefalsefalsefalsefalse)
end


function renderstop1()
removeEventHandler("onClientRender",root,render1)
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-10-17, 16:56


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Poka? funkcje onRespawnVehiclesz pystoriesvehicles. Pewnie nie ustawiasz tam paintjoba pojazdowi.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-10-17, 17:00


Cfeluszek

Uczeń LUA






Wiek: 24
Na forum: 3460 dni
Posty: 38
Nick w MP: R0B3RC1K

Piwa: 183

Respekt: 50

"Wilq" napisał/a:

Poka? funkcje onRespawnVehiclesz pystoriesvehicles. Pewnie nie ustawiasz tam paintjoba pojazdowi.

vehicles=0
root=getRootElement()
resourceRoot=getResourceRootElement(getThisResource())

local nlOffsets={
    [411]={-1,0,-0.6},    -- infernus
    [470]={-1,0,-0.4},    -- patriot
    [541]={-0.9,0,-0.4},    -- bulelt
    [549]={-0.9,0,-0.4},    -- tampa
    [587]={-1,0,-0.5},    -- euros
}

local nlIDX={
    3962,2113,1784,2054,2428,2352
}

function getVehicleHandlingProperty elementproperty )
    if isElement element ) and getElementType element ) == "vehicle" and type property ) == "string" then
        local handlingTable getVehicleHandling element ) 
        local value handlingTable[property] 
 
        if value then
            return value
        end
    end
 
    return false
end

function getAdmin2(plr,level)
    if level then
        local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=? AND level=?"getPlayerSerial(plr), level)
        if result and #result > 0 then
            return true
        else
            return false
        end
    else
        local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=?"getPlayerSerial(plr))
        if result and #result > 0 then
            return true
        else
            return false
        end
    end
end
--///////////////////////////////////// WCZYTYWANIE POJAZD?W /////////////////////////////////
function onRespawnVehicles(_,id,poss,plr)
    -- Settings (QUERY)
    if id then
        result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE parking=1 AND id=?"id)
        query=exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=0 WHERE id=?"id)
    else
        result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE parking=0")
    end

    -- Pairs
    tra nil
    for ile,vehicle in pairs(result) do
        vehicles=ile

        if id then pos={poss[1], poss[2], poss[3], poss[4], poss[5], poss[6]}
        else pos=split(vehicle["pos"], ","end

        local color=split(vehicle["color"], ",")
        local lights=split(vehicle["headlights"], ",")

        local veh=createVehicle(vehicle["model"], pos[1], pos[2], pos[3], pos[4], pos[5], pos[6])
        setVehicleColor(vehcolor[1], color[2], color[3], color[4],color[5], color[6], color[7], color[8],color[9], color[10], color[11], color[12])
        setVehicleHeadLightColor(vehlights[1], lights[2], lights[3])
        if vehicle["plateText"] ~= "" then
        setVehiclePlateText(vehvehicle["plateText"])
        else
         setVehiclePlateText(vehtostring("SA "..vehicle["id"]))
        end
        setElementFrozen(veh, (vehicle["frozen"]) > 0)
        if vehicle["paintjob"] ~= 3 then
        setVehiclePaintjob(vehvehicle["paintjob"])
        end
        setElementHealth(vehvehicle["health"])
        setElementData(veh,"vehicle:spawn",true)
        setElementData(veh,"vehicle:id"vehicle["id"])
        setElementData(veh,"vehicle:fuel"vehicle["fuel"])
        setElementData(veh,"vehicle:desc"vehicle["text"] or false)
        setElementData(veh,"vehicle:mileage"vehicle["mileage"])
        setElementData(veh,"vehicle:driver"vehicle["driver"])
        setElementData(veh,"vehicle:ownedGroup"vehicle["ownedGroup"])
        setElementData(veh,"vehicle:ownedPlayer"vehicle["ownedPlayer"])
        
        local mk1 vehicle['mk1']
        local mk1 vehicle['mk2']
        local mk1 vehicle['rh']
        local xfour vehicle['awd']
        
        if (type(vehicle['rent']) == "string"then
        local tabelka = {}
        local rente split(vehicle['rent'], ',')
        for k,v in ipairs(rente) do
        table.insert(tabelka,v)
        end
        setElementData(veh,"vehicle:rent"tabelka or false)
        else
        setElementData(veh,"vehicle:rent",0)
        end
        
        if tonumber(xfour) == 1 then
        setVehicleHandling(veh,"driveType","awd")
        end
        
        if tonumber(mk1) ~= 0 then
        local fast getVehicleHandlingProperty(veh,"engineAcceleration")
        local maxfast getVehicleHandlingProperty(veh,"maxVelocity")
        local masa getVehicleHandlingProperty(veh,"mass")
        local masa2 getVehicleHandlingProperty(veh,"turnMass")
        local xd getVehicleHandlingProperty(veh,"tractionMultiplier")
        local coef getVehicleHandlingProperty(veh,"dragCoeff")
        setVehicleHandling(veh,"engineAcceleration",fast+0.5)
        setVehicleHandling(veh,"maxVelocity",maxfast+6)
        setVehicleHandling(veh,"mass",masa+100)
        setVehicleHandling(veh,"tractionMultiplier",xd+0.1)
        setVehicleHandling(veh,"steeringLock",40)
        setVehicleHandling(veh,"dragCoeff",coef-0.15)
        end
        
        if tonumber(mk2) ~= 0 then
        local fast getVehicleHandlingProperty(veh,"engineAcceleration")
        local maxfast getVehicleHandlingProperty(veh,"maxVelocity")
        local masa getVehicleHandlingProperty(veh,"mass")
        local masa2 getVehicleHandlingProperty(veh,"turnMass")
        local xd getVehicleHandlingProperty(veh,"tractionMultiplier")
        local coef getVehicleHandlingProperty(veh,"dragCoeff")
        setVehicleHandling(veh,"engineAcceleration",fast+1.3)
        setVehicleHandling(veh,"maxVelocity",maxfast+14)
        setVehicleHandling(veh,"tractionMultiplier",xd+0.2)
        setVehicleHandling(veh,"mass",masa+150)
        setVehicleHandling(veh,"steeringLock",42)
        setVehicleHandling(veh,"dragCoeff",coef-0.21)
        end
        
    --[[    if vehicle["rearlights"] ~= "" then
        setElementData(veh,"vehicle:light"vehicle["rearlights"])
        else
        setElementData(veh,"vehicle:light""High Quality")
        end]]--
        setElementData(veh,"neony"vehicle["neon"])
        if vehicle["blokada"] == "true" then
            setElementData(veh,"vehicle:block"true)
            setVehicleWheelStates(veh2222)
        else
            setElementData(veh,"vehicle:block"false)
        end
        local rodzajneonu=tonumber(getElementData(veh,"neony"))
        if getElementData(veh,"neony") ~= 0 then
        local m getElementModel(veh)
        local of
        if not nlOffsets[mthen
        of={-1,0,-0.5}
        else
        of=nlOffsets[m]
        end
        neon1=createObject(nlIDX[rodzajneonu],0,0,0)
        neon2=createObject(nlIDX[rodzajneonu],0,0,0)
        setElementData(veh,"zneony", {neon1neon2})
        attachElements(neon1,veh,of[1],of[2],of[3])
        attachElements(neon2,veh,-of[1],of[2],of[3])
        end

        for i,v in ipairs(split(vehicle["tuning"], ",")) do addVehicleUpgrade(vehvend
        for i,v in ipairs(split(vehicle["panelstates"], ",")) do setVehiclePanelState(vehitonumber(v)) end
        setVehicleDamageProof(vehtrue)
        tra veh
    end
    outputDebugString("[pystories_vehicles] Loaded "..vehicles.." vehicles.")
    return tra
end

--///////////////////////////////////// ZAPISYWANIE POJAZD?W /////////////////////////////////
function onSaveVehicle(vehicle)
    if getElementData(vehicle,"vehicle:spawn"then
        -- Setting
        local panelstates={}
        local model=getElementModel(vehicle)
        local health=getElementHealth(vehicle)
        local x,y,z=getElementPosition(vehicle)
        local rx,ry,rz=getElementRotation(vehicle)
        local desc=getElementData(vehicle,"vehicle:desc") or ""
        local id=getElementData(vehicle,"vehicle:id")
        local fuel=getElementData(vehicle,"vehicle:fuel")
        local mileage=getElementData(vehicle,"vehicle:mileage")
        local c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12=getVehicleColor(vehicletrue)
        local driver=getElementData(vehicle,"vehicle:driver") or ""
        local rent=getElementData(vehicle,"vehicle:rent")
        local player=getElementData(vehicle,"vehicle:ownedPlayer")
     --   local group=getElementData(vehicle,"vehicle:ownedGroup")
        local blokada=getElementData(vehicle,"vehicle:block")
        local neon=getElementData(vehicle,"neony")
        local h1,h2,h3=getVehicleHeadLightColor(vehicle)
        local paintjob=getVehiclePaintjob(vehicle)
        local rear="Brak"
        local frozenisElementFrozen(vehicle) and or 0
        for i=0,do table.insert(panelstatesgetVehiclePanelState(vehicle,i)) end
        panelstates=table.concat(panelstates,",")
        upgrades=getVehicleUpgrades(vehicle)
        if not upgrades then upgrades={} end
        upgrades=table.concat(upgrades",")
        -- Query
        local query exports["pystories-db"]:dbSet(string.format("UPDATE pystories_vehicles SET model='%d', pos='%.2f,%.2f,%.2f,%.2f,%.2f,%.2f', rent='%d',text='%s', health='%d', fuel='%d', mileage='%d', frozen='%d', driver='%s', color='%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d', panelstates='%s', paintjob='%d', tuning='%s', headlights='%d,%d,%d', ownedPlayer='%d', neon='%d', blokada='%s' WHERE id=%d",
        modelx,y,zrx,ry,rz"0",deschealthfuelmileagefrozendriverc1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12panelstatespaintjobupgradesh1,h2,h3playerneontostring(blokada), id))
        if (type(rent) == "table"then
        local rr string.format("%s"table.concat(rent',') )
    --    outputDebugString(rr)
        local query2exports['pystories-db']:dbSet("UPDATE pystories_vehicles SET rent=? WHERE id=?",rr,id)
        end
    end
end

function onParkVehicle(vehicle) 
    local query=exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1 WHERE id=?"getElementData(vehicle,"vehicle:id"))
    if query then
        local zneony=getElementData(vehicle,"zneony")
        if (zneony and type(zneony)=="table"then
        destroyElement(zneony[1])
        destroyElement(zneony[2])
        removeElementData(vehicle,"zneony")
        end
        destroyElement(vehicle)
    end
end

--///////////////////////////////////// SPRAWDZANIE USTAWIE? /////////////////////////////////
function getSettings(plr,code,value)
    local sid=getElementData(plr,"player:sid")
    if not sid then return end
    if value == "faction" then
        local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_factions WHERE code=? AND sid=?"codesid)
        if result and #result > 0 then
            return result[1].code
        else
            return false
        end
    end
    if value == "organization" then
        local result=exports["pystories-db"]:dbGet("SELECT * FROM ms_organizacje WHERE sid=?"sid)
        if result and #result > 0 then
            return result[1].code
        else
            return false
        end
    end
    if value == "owner" then
        local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?"sid)
        if result and #result > 0 then
            return result[1].id
        else
            return false
        end
    end
end

--///////////////////////////////////// INNE USTAWIENIA /////////////////////////////////
addEventHandler("onVehicleExit"root, function(plr,seat)
    if seat ~= 0 then return end 
       onSaveVehicle(source)
       setVehicleEngineState(sourcefalse)
    setVehicleDamageProof(sourcetrue)
    unbindKey(plr'n''down'bindHoron4)
end)


addEventHandler("onPlayerQuit"root, function()
    local veh=getPedOccupiedVehicle(source)
    if veh then
        setVehicleDamageProof(sourcetrue)
        onSaveVehicle(veh)
    end
end)

addEventHandler("onResourceStop"resourceRoot, function()
    for i,v in ipairs(getElementsByType("vehicle")) do
        onSaveVehicle(v)
        local zneony=getElementData(v,"zneony")
        if (zneony and type(zneony)=="table"then
        destroyElement(zneony[1])
        destroyElement(zneony[2])
        removeElementData(v,"zneony")
        end
    end
    outputDebugString("[pystories_vehicles] Saved all vehicles!")
end)

addEventHandler("onVehicleEnter"root, function(plr,seat)
    if seat ~= 0 then return end
    setVehicleEngineState(sourcefalse)
    setElementData(source,"vehicle:driver",getPlayerName(plr))
    if getElementData(source,"neony") and getElementData(source,"neony") ~= 0 then
        --triggerClientEvent(plr,"addNotification",root,"* Posiadasz neony w pojezdzie, mo?esz wl?czy? i wylaczyc je za pomoc? przycisku H.","info")
        outputChatBox("* Posiadasz neony w pojezdzie, mo?esz wl?czy? i wylaczyc je za pomoc? przycisku N.",plr)
        bindKey(plr'n''down'bindHoron4plr)
    end
end)

--///////////////////////////////////// SPRAWDZENIE W?A?CICIELA /////////////////////////////////
addEventHandler("onVehicleStartEnter"resourceRoot, function(plr,seat,jacked)
    if seat == 0 then
        local rent=getElementData(source"vehicle:rent")
        local group=getElementData(source"vehicle:ownedGroup")
        if group == "0" then group "Brak" end
        local player=getElementData(source"vehicle:ownedPlayer")
        if getAdmin2(plr4then
            return
        end
        if rent and (type(rent) == "table"then
            for i,s in pairs(rent) do
                if tonumber(s) == getElementData(plr,"player:sid"then
                return end
            end
        end
        
        local plrgroup getElementData(plr,"player:organization")
        if plrgroup then
        --    outputDebugString(group)
            if getSettings(plr,false,"organization") == group then return end
        end
        if player and player ~= getSettings(plr,false,"owner"then
            --triggerClientEvent(plr,"addNotification",root,"* Nie masz kluczyk?w do tego pojazdu.","error")
            outputChatBox("* Nie posiadasz kluczyk?w do tego pojazdu."plr)
            cancelEvent()
        end
    end
end)

addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if jacked then 
        if getElementData(source,"vehicle:ownedPlayer") == getElementData(plr,"player:sid"then return end
        cancelEvent()
    end
end)

addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if seat == 0 then
        if getElementData(source,"spawnowany")== true then
            if getElementData(plr,"player:admin")== false then
                cancelEvent()
            end
        end
    end
end)



function bindHoron4(plr)
        veh=getPedOccupiedVehicle(plr)
        if not veh then return end
        local rodzajneonu=tonumber(getElementData(veh,"neony"))
        if not rodzajneonu then return end
        if rodzajneonu==0 then 
        outputChatBox('* Brak Neonow.'plr255,0)
        return end
        local zneony=getElementData(veh,"zneony")
        if (zneony and type(zneony)=="table"then
        destroyElement(zneony[1])
        destroyElement(zneony[2])
        removeElementData(veh,"zneony")

        --triggerClientEvent(plr,"addNotification",root,'* Wy??czy?e? Neony.',"warning")
        outputChatBox("* Od??czy?e?(a?) neony od pojazdu.",plr)
        else
        local m getElementModel(veh)
        local of
        if not nlOffsets[mthen
        of={-1,0,-0.5}
        else
        of=nlOffsets[m]
        end
        neon1=createObject(nlIDX[rodzajneonu],0,0,0)
        neon2=createObject(nlIDX[rodzajneonu],0,0,0)
        setElementData(veh,"zneony", {neon1neon2})
        attachElements(neon1,veh,of[1],of[2],of[3])
        attachElements(neon2,veh,-of[1],of[2],of[3])
        --triggerClientEvent(plr,"addNotification",root,'* W??czy?e? Neony. Pojawi? si? one jak poruszysz pojazdem!',"info")
        outputChatBox("* Za??czy?e?(a?) neony w poje?dzie.",plr)
        end
end

addEventHandler("onElementDestroy"getRootElement(), function ()
  if getElementType(source) == "vehicle" then
      local zneony=getElementData(source,"zneony")
    if (zneony and type(zneony)=="table"then
        destroyElement(zneony[1])
        destroyElement(zneony[2])
        removeElementData(source,"zneony")
        end
    end
end)


addEventHandler("onResourceStart"resourceRoot, function() onRespawnVehicles(_,falseend)


--[[
vehicles retrieval mechanizm wylawiajacy pojazdy z wody
@author Lukasz Biegaj <wielebny@bestplay.pl>
@author Karer <karer.programmer@gmail.com>
@author WUBE <wube@lss-rp.pl>
@copyright 2011-2013 Lukasz Biegaj <wielebny@bestplay.pl>
]]--



function shuffle(t)
  local n #t
 
  while >= do
    -- n is now the last pertinent index
    local k math.random(n) -- <= <= n
    -- Quick swap
    t[n], t[k] = t[k], t[n]
    1
  end
  return t
end

local function vr()

    local pojazdy=getElementsByType("vehicle")

    if (#pojazdy<1) then return end

    local pojazdwoda={}
    for _,pojazd in ipairs(pojazdy) do
        if isElementInWater(pojazd) and not getVehicleController(pojazdthen
            local x,y,z=getElementPosition(pojazd)
            if (z<-1then
                table.insert(pojazdwoda,pojazd)
            end
        end
    end
    if (#pojazdwoda<1) then return end

    outputDebugString("system_wylawiania_aut> Pojazdow w wodzie/pod mapa: " .. #pojazdwoda)

    shuffle(pojazdwoda)
    
    local pojazd=pojazdwoda[1]
    if getElementData(pojazd"vehicle:spawn"then
        onParkVehicle(pojazd)
    else
        respawnVehicle(pojazd)
    end
end
setTimer(vr350000)

--//////////////////////////////////////////////////////// Licencje

local categoryA={[463] = true,[462] = true,[461] = true,[581] = true,[448] = true,[468] = true,[471] = true,[521] = true,[522] = true,[523] = truelocal categoryB={[602] = true,[545] = true,[496] = true,[517] = true,[401] = true,[410] = true,[518] = true,[600] = true,[527] = true,[436] = true,[589] = true,[580] = true,[419] = true,[439] = true,[533] = true,[549] = true,[526] = true,[491] = true,[474] = true,[445] = true,[467] = true,[604] = true,[426] = true,[507] = true,[547] = true,[585] = true,[405] = true,[587] = true,[409] = true,[466] = true,[550] = true,[492] = true,[566] = true,[546] = true,[540] = true,[551] = true,[421] = true,[516] = true,[529] = true,[488] = true,[460] = true,
[469] = true,[487] = true,[510] = true,[509] = true,[481] = true,[586] = true,[472] = true,[473] = true,[493] = true,[595] = true,[484] = true,[430] = true,[453] = true,[452] = true,[446] = true,[454] = true,[485] = true,[552] = true,
[438] = true,[574] = true,[420] = true,[525] = true,[408] = true,[596] = true,[597] = true,[427] = true,[599] = true,[490] = true,[432] = true,[528] = true,[601] = true,[407] = true,[544] = true,[470] = true,[598] = true,[588] = true,
[532] = true,[443] = true,[486] = true,[531] = true,[543] = true,[422] = true,[583] = true,[478] = true,[605] = true,[554] = true,[530] = true,[418] = true,[572] = true,[582] = true,[536] = true,[575] = true,[534] = true,
[567] = true,[535] = true,[576] = true,[412] = true,[402] = true,[542] = true,[603] = true,[475] = true,[449] = true,[537] = true,[570] = true,[441] = true,[464] = true,[501] = true,[465] = true,[564] = true,[568] = true,[557] = true,[424] = true,[504] = true,[495] = true,[457] = true,[539] = true,[483] = true,[571] = true,[500] = true, 
[444] = true,[556] = true,[429] = true,[411] = true,[541] = true,[559] = true,[415] = true,[561] = true,[480] = true,[560] = true,[562] = true,[506] = true,[565] = true,[451] = true,[434] = true,[558] = true,[494] = true,[555] = true,[502] = true,[477] = true,[503] = true,[579] = true,[400] = true,[404] = true,[489] = true,[505] = true,[479] = true,[442] = true,[458] = true,
[606] = true,[607] = true,[610] = true,[590] = true,[569] = true,[611] = true,[584] = true,[608] = true,[435] = true,[450] = true,[591] = true,[594] = true}
local categoryC={[403] = true,[406] = true,[413] = true,[414] = true,[416] = true,[423] = true,[428] = true,[431] = true,[433] = true,[437] = true,[440] = true,[455] = true,[456] = true,[459] = true,[482] = true,[498] = true,[499] = true,[508] = true,[514] = true,[515] = true,[524] = true,[538] = true,[573] = true}
addEventHandler("onVehicleStartEnter"resourceRoot, function(plr,seat,jacked)
    if seat == 0 then
        if categoryA[getElementModel(source)] then
           
        elseif categoryB[getElementModel(source)] then
            
        elseif categoryC[getElementModel(source)] then
            
        end
    end
end)

addEventHandler("onVehicleEnter"getRootElement(), function(plr,seat,jacked)
if seat ~= 0 then return end
if getElementData(source"vehicle:id") and getElementData(source"vehicle:spawn"then
local mk2 exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk2=?",getElementData(source"vehicle:id"), "1")
local mk1 exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk1=?",getElementData(source"vehicle:id"), "1")
local rh exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND rh=?",getElementData(source"vehicle:id"), "1")
local np exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND naped=?",getElementData(source"vehicle:id"), "1")
if #mk1 > 0 then outputChatBox("&#10004; Uk?ad MK1 zaprogramowany",plr,255,140,0) end
    outputChatBox(" "source)
if #mk2 > 0 then outputChatBox("&#10004; Uk?ad MK2 zaprogramowany",plr,255,140,0) end
    outputChatBox(" "source) 
if #rh > 0 then outputChatBox("&#10004; Uk?ad RH1 zaprogramowany",plr,255,140,0) end
    outputChatBox(" "source) 
if #np > 0 then outputChatBox("&#10004; Uk?ad Nap?du 4x4 zaprogramowany",plr,255,140,0) end
    outputChatBox(" "sourceend
end)

local strefa = { }
local strefy = {
    {1336.23840656.788769.8562460.50634765625146.8001098632816.164074325562 },
    {924.076901661.905769.25354194.91711425781138.3175048828123.899999046326},
    {2197.997802405.43872, -31.81085178.1982421875112.389648437557.499998474121},
}
 
local ogranicznik createElement ("ogranicznik");
for i,v in ipairs strefy  ) do
     strefa[i] = createColCuboid ], ], ], ], ], ], [7] )
     setElementParent (strefa [i], ogranicznik);
end
 
addEventHandler("onColShapeHit"ogranicznik, function(el,md)
    if getElementType(el)=="vehicle" then
            setElementData(el,"vehicle:tempspeed"50)
    end
end)
addEventHandler("onColShapeLeave"ogranicznik, function(el,md)
    if getElementType(el)=="vehicle" then
        removeElementData(el,"vehicle:tempspeed")
    end
end)
function wariant(plrcmdvar1var2)
    local veh getPedOccupiedVehicle(plr)
    if not veh then return end
     local var1var2 getVehicleVariant(veh)
    if (veh and getVehicleController(veh) ~= plrthen return end
    local speedxspeedyspeedz getElementVelocity(veh)
    if not speedx then speedx=0 end
    if not speedy then speedy=0 end
    if not speedz then speedz=0 end
    speedx tonumber(speedx);speedy=tonumber(speedy);speedz=tonumber(speedz)
    local speed = (speedx^speedy^speedz^2)^(0.5) * 180
    if speed 2 then outputChatBox("* St?j w miejscu !",plr) return end
    local panel = {}
    for i=0,do
    panel[i] = getVehiclePanelState veh)
    end
    setVehicleVariant(vehtonumber(not var1), tonumber(not var1))
    for i=0do
    setVehiclePanelState veh,panel[i])
    end
end
addCommandHandler("wariant"wariant)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-10-17, 17:18


Szypki_exe







Wiek: 21
Na forum: 3239 dni
Posty: 172

Piwa: 1426

Respekt: 150
Respekt: 150Respekt: 150

Zastosuj

setVehiclePaintjob


na ogrpg nie musisz tego bezpo?rednio wysy?a? do mysqla, gdy? funkcja onSaveVehicles sama to zaktualizuje po oddaniu auta do przecho

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-10-17, 17:35


Cfeluszek

Uczeń LUA






Wiek: 24
Na forum: 3460 dni
Posty: 38
Nick w MP: R0B3RC1K

Piwa: 183

Respekt: 50

"Szypki_exe" napisał/a:

Zastosuj

setVehiclePaintjob


na ogrpg nie musisz tego bezpo?rednio wysy?a? do mysqla, gdy? funkcja onSaveVehicles sama to zaktualizuje po oddaniu auta do przecho


gdzie to zastosowa??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-10-17, 17:42


Szypki_exe







Wiek: 21
Na forum: 3239 dni
Posty: 172

Piwa: 1426

Respekt: 150
Respekt: 150Respekt: 150

Zamiast wysy?ania do bazy danych.

Dla jasno?ci przyk?ad:

addEvent("pj0"true)
addEventHandler("pj0"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(pj0)) then
setVehiclePaintjob(pojazd0)
         outputChatBox("* Pomy?lnie naklejono Paintjob."source,true)
         takePlayerMoneysourcepj0 )
    else
         outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Cfeluszek
Wysłany: 2019-10-17, 18:11


Cfeluszek

Uczeń LUA






Wiek: 24
Na forum: 3460 dni
Posty: 38
Nick w MP: R0B3RC1K

Piwa: 183

Respekt: 50

"Szypki_exe" napisał/a:

Zamiast wysy?ania do bazy danych.

Dla jasno?ci przyk?ad:

addEvent("pj0"true)
addEventHandler("pj0"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(pj0)) then
setVehiclePaintjob(pojazd0)
         outputChatBox("* Pomy?lnie naklejono Paintjob."source,true)
         takePlayerMoneysourcepj0 )
    else
         outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)

dzieki za pomoc

Postaw piwo autorowi tego posta
 

 
Tagi: montaz :: paintjobow :: nie :: działa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Montaz Paintjobow nie działa Odpowiedz do tematu

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