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

Wysłany: 2018-04-18, 17:21


Rumper

Majster od pysa






Wiek: 15
Na forum: 3456 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Witam,mam taki problem ?e przenios?em marker do interioru i go w tym interiorze wogule nie wida?.
KOD:
--[[
    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 marker=createMarker(-2022.36108, -116.64605, 1035.17188, "cylinder", 1, 50, 90, 200, 75)
setElementInterior(marker, 0)
createBlip( 415.67,2531.83,22.51, 5,2,0,0,0,0,0,275)
local marker2=createMarker(415.51, 2532.14, 19.15-0.90, "cylinder", 1, 50, 90, 200, 75)
setElementInterior(marker2, 0)
local t=createElement("text")
setElementInterior(t, 0)
setElementPosition(t, -2022.36108, -116.64605, 1035.17188)
setElementData(t,"name","Zdawanie na prawo jazdy")
local t2=createElement("text")
setElementInterior(t2, 0)
setElementPosition(t2, 415.51, 2532.14, 19.15)
setElementData(t2,"name","Zdawanie licencji lotniczej")


local wm={}
wm.window=guiCreateWindow(0.21, 0.20, 0.57, 0.54, "Zdawanie prawa jazdy", true)
guiWindowSetSizable(wm.window, false)
guiWindowSetMovable(wm.window, false)
guiSetVisible(wm.window, false)
wm.label=guiCreateLabel(0.02, 0.06, 0.96, 0.05, "Z poni?szej listy wybierz kategori? prawa jazdy do kt?rej chcesz przyst?pi? p??niej kliknij Przyst?p", true, wm.window)
guiLabelSetHorizontalAlign(wm.label, "center", false)
guiLabelSetVerticalAlign(wm.label, "center")
wm.gridlist=guiCreateGridList(0.02, 0.12, 0.96, 0.69, true, wm.window)
guiGridListAddColumn(wm.gridlist, "Kategoria", 0.3)
guiGridListAddColumn(wm.gridlist, "Pojazdy", 0.3)
guiGridListAddColumn(wm.gridlist, "Cena", 0.2)
guiGridListAddColumn(wm.gridlist, "Zdane", 0.2)
wm.close=guiCreateButton(0.62, 0.83, 0.36, 0.13, "Zamknij", true, wm.window)
wm.submit=guiCreateButton(0.02, 0.83, 0.36, 0.13, "Przyst?p", true, wm.window)

local function fillLicenseData()
    guiGridListClear(wm.gridlist)
    for i,v in ipairs(licenseCategory) do
        local row=guiGridListAddRow(wm.gridlist)
        guiGridListSetItemText(wm.gridlist, row, 1, v[1], false, false)
        guiGridListSetItemText(wm.gridlist, row, 2, v[2], false, false)
        guiGridListSetItemText(wm.gridlist, row, 3, v[3].." PLN", false, false)
        guiGridListSetItemData(wm.gridlist, row, 3, v[3])
        -- Settings
        if getElementData(localPlayer,"player:license:pj"..v[1]) == 1 then
            guiGridListSetItemText(wm.gridlist, row, 4, "TAK", false, false)
            guiGridListSetItemColor(wm.gridlist, row, 4, 0, 255, 0)
        else
            guiGridListSetItemText(wm.gridlist, row, 4, "NIE", false, false)
            guiGridListSetItemColor(wm.gridlist, row, 4, 255, 0, 0)
        end
    end
end

local function fillLicenseData2()
    guiGridListClear(wm.gridlist)
    for i,v in ipairs(licenseCategory2) do
        local row=guiGridListAddRow(wm.gridlist)
        guiGridListSetItemText(wm.gridlist, row, 1, v[1], false, false)
        guiGridListSetItemText(wm.gridlist, row, 2, v[2], false, false)
        guiGridListSetItemText(wm.gridlist, row, 3, v[3].." PLN", false, false)
        guiGridListSetItemData(wm.gridlist, row, 3, v[3])
        -- Settings
        if getElementData(localPlayer,"player:license:pj"..v[1]) == 1 then
            guiGridListSetItemText(wm.gridlist, row, 4, "TAK", false, false)
            guiGridListSetItemColor(wm.gridlist, row, 4, 0, 255, 0)
        else
            guiGridListSetItemText(wm.gridlist, row, 4, "NIE", false, false)
            guiGridListSetItemColor(wm.gridlist, row, 4, 255, 0, 0)
        end
    end
end

addEventHandler("onClientGUIClick", wm.submit, function()
    local selectedRow=guiGridListGetSelectedItem(wm.gridlist)
    if not selectedRow or selectedRow < 0 then return end
    local cat=guiGridListGetItemText(wm.gridlist, selectedRow, 1)
    local cost=guiGridListGetItemData(wm.gridlist, selectedRow, 3)
    local zdane=guiGridListGetItemText(wm.gridlist, selectedRow, 4)
    if tonumber(cost) > getPlayerMoney(localPlayer) then
        outputChatBox("* Nie posiadasz tyle got?wki.", 255, 0, 0)
        return
    end
    --[[if getPlayerName(localPlayer) ~= "Split" then
        outputChatBox("* W budowie...", 255, 0, 0)
        return
    end]]
    if zdane ~= "TAK" then
        triggerServerEvent("license:do", resourceRoot, tonumber(cost), cat)
        if not guiGetVisible(wm.window) then return end
        guiSetVisible(wm.window, false)
        showCursor(false)
    else
        outputChatBox("* Posiadasz ju? zdane prawo jazdy.", 255, 0, 0)
    end
end)

addEventHandler("onClientGUIClick", wm.close, function()
    if not guiGetVisible(wm.window) then return end
    showCursor(false)
    guiSetVisible(wm.window, false)
end)

addEventHandler("onClientMarkerHit", marker, function(el,md)
    if not md or el~=localPlayer then return end
    if guiGetVisible(wm.window) then return end
    showCursor(true)
    guiSetVisible(wm.window,true)
    fillLicenseData()
end)

addEventHandler("onClientMarkerHit", marker2, function(el,md)
    if not md or el~=localPlayer then return end
    if guiGetVisible(wm.window) then return end
    showCursor(true)
    guiSetVisible(wm.window,true)
    fillLicenseData2()
end)


Podpis
Elo benc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-18, 17:26


Atroth







Wiek: 24
Na forum: 3818 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4813

Respekt: 540
Respekt: 540

Lolelo, Czy m?g?by? wskaza? zawsze, o kt?ry marker chodzi?


setElementInterior(marker2, 0)


Czy ustawi?e? do odpowiedniego markera numer interioru?

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-18, 17:28


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

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

Powiedz Nam, w jakim dimensionie i interiorze znajduje si? Tw?j interior urz?du.
Bo w kodzie ustali?e?, ?e znajduje si? marker w interiorze 0.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-18, 17:28


Rumper

Majster od pysa






Wiek: 15
Na forum: 3456 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Chodzi o ten pierwszy marker
local marker=createMarker(-2022.36108, -116.64605, 1035.17188, "cylinder", 1, 50, 90, 200, 75) 


[ Dodano: 2018-04-18, 17:29 ]
W interiorze 0,
Dla pewno?ci macie kod ?eby spamu nie robi?
createBlip(-2431.41, -114.93, 35.32, 36,2,0,0,0,0,0,275)

wejscie_marker = createMarker (-2431.41, -114.93, 35.32+1, "arrow", 1.5, 255, 200, 0, 150)
wyjscie_marker = createMarker (-2026.88, -103.60, 1035.18+1, "arrow", 1.5, 255, 200, 0, 150)
setElementDimension(wyjscie_marker, 1)
setElementInterior(wyjscie_marker, 3)

addEventHandler("onMarkerHit", wejscie_marker, function(el, md)
    if isPedInVehicle(el) then return end
    fadeCamera(el ,false)
    setElementFrozen(el, true)
    setTimer(function ()
    outputChatBox( "* Wszed?e?(a?) do szko?y jazdy.", el)
    setElementDimension(el, 1)
    setElementInterior(el, 3)
    setElementPosition(el, -2029.72, -106.90, 1035.17)
    setElementFrozen(el, false)
    showPlayerHudComponent(el, "radar", false)
    fadeCamera(el, true)
    end, 1500, 1)
end)

addEventHandler("onMarkerHit", wyjscie_marker, function(el, md)
    if isPedInVehicle(el) then return end
    fadeCamera(el ,false)
    setElementFrozen(el, true)
    setTimer(function ()
    outputChatBox("* Wyszed?e?(a?) ze szko?y jazdy.", el)
    setElementDimension(el, 0)
    setElementInterior(el, 0)
    setElementPosition(el, -2427.54, -114.84, 35.32)
    setElementFrozen(el, false)
    showPlayerHudComponent(el, "radar", true)
    fadeCamera(el, true)
    end, 1500, 1)
end) 


[ Dodano: 2018-04-18, 17:53 ]
Teraz mi wogule nie dzia?a interior

[ Dodano: 2018-04-18, 17:56 ]
a dobra zwracam honor jednak dzia?a leci :piwo:

[ Dodano: 2018-04-18, 18:00 ]
Jednak nie dzi?a, i sr za spam

Podpis
Elo benc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-18, 18:02


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

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

Lolelo, nie pisz g?upot, ?e znajduje si? w interiorze 0.
Masz jasno podane: DIMENSION 1, INTERIOR 3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-18, 18:06


Rumper

Majster od pysa






Wiek: 15
Na forum: 3456 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Tak ale, jak zmieniam na 0 to wogule nie widze interioru

Podpis
Elo benc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-18, 19:51


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

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

Do kodu prawa jazdy:

local marker=createMarker(-2022.36108, -116.64605, 1035.17188, "cylinder", 1, 50, 90, 200, 75)
setElementInterior(marker, 3)
setElementDimension(marker, 1)
createBlip( 415.67,2531.83,22.51, 5,2,0,0,0,0,0,275)
local marker2=createMarker(415.51, 2532.14, 19.15-0.90, "cylinder", 1, 50, 90, 200, 75)
setElementInterior(marker2, 3)
setElementDimension(marker2, 1)
local t=createElement("text")
setElementInterior(t, 3)
setElementDimension(t, 1)
setElementPosition(t, -2022.36108, -116.64605, 1035.17188)
setElementData(t,"name","Zdawanie na prawo jazdy")
local t2=createElement("text")
setElementInterior(t2, 3)
setElementDimension(t2, 1)
setElementPosition(t2, 415.51, 2532.14, 19.15)
setElementData(t2,"name","Zdawanie licencji lotniczej")


W kodzie wej?cia i wyj?cia z interioru nic nie zmieniasz.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Rumper
Wysłany: 2018-04-19, 19:06


Rumper

Majster od pysa






Wiek: 15
Na forum: 3456 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Dzi?ki leci :piwo:
Do zamkni?cia

Podpis
Elo benc
Postaw piwo autorowi tego posta
 

 
Tagi: niedziałające :: prawojazdy
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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