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

Wysłany: 2017-07-01, 14:51


DaVeCS

Mapper






Wiek: 31
Na forum: 3527 dni
Posty: 193
Nick w MP: DaVe

Piwa: 59

Respekt: 70,5

Witajcie, mam problem z Eazy Workshop a dok?adniej z Mk1 i Mk2, mo?na je zamontowa? lecz nie poprawiaj? one osi?g?w auta.

Tak wygl?da cz??? skryptu odpowiadaj?ca za MK:

function getVehicleHandlingProperty ( element, property )
    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

addEvent("mk2", true)
addEventHandler("mk2", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
if not ccar then outputChatBox("Musisz by? w poje?dzie", source, 255, 255, 255) return end
if getElementData(source, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", source, 255, 255, 255) return end
if hajs < 0 then outputChatBox("Nie sta? Ci? na te ulepszenie", source, 255, 255, 255) return end
local id = getElementData(ccar, "vehicle:id")
if not id then return end
local qr = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND mk2=?",getElementData(ccar, "vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
exports["ogrpg-vehicles"]:onSaveVehicle(ccar)
destroyElement(ccar)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ US2", id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk2=1 WHERE id=?", id)
outputChatBox("Monta? systemu US2 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni", source, 255, 255, 255)
takePlayerMoney(source, 0)
end)

addEvent("mk1", true)
addEventHandler("mk1", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
if not ccar then outputChatBox("Musisz by? w poje?dzie", source, 255, 255, 255) return end
if getElementData(source, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji Eazy Workshop", source, 255, 255, 255) return end
if hajs < 0 then outputChatBox("Nie sta? Ci? na te ulepszenie", source, 255, 255, 255) return end
local id = getElementData(ccar, "vehicle:id")
if not id then return end
local qr = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND mk1=?",getElementData(ccar, "vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
--exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk1=1 WHERE ownedPlayer=? AND id=?", getElementData(source, "player:uid"), getElementData(ccar, "vehicle:id"))
exports["ogrpg-vehicles"]:onSaveVehicle(ccar)
destroyElement(ccar)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk1=1 WHERE id=?", id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ US1", id)
outputChatBox("Monta? systemu US1 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni", source, 255, 255, 255)
takePlayerMoney(source, 0)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-01, 15:20


koxpl2x22

MAPPER-ALLEREK






Wiek: 23
Na forum: 4697 dni
Posty: 375
Nick w MP: ALLEREK

Piwa: 1725

Respekt: 142,5
Respekt: 142,5

Dane o poprawianiu osiagow przez mk s? w ogrpg-vehicles

Postaw piwo autorowi tego posta
 

 
Tagi: eazy :: workshop
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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