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: 3315 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:
--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]

local marker=createMarker(-2022.36108, -116.646051035.17188"cylinder"1509020075)
setElementInterior(marker0)
createBlip415.67,2531.83,22.515,2,0,0,0,0,0,275)
local marker2=createMarker(415.512532.1419.15-0.90"cylinder"1509020075)
setElementInterior(marker20)
local t=createElement("text")
setElementInterior(t0)
setElementPosition(t, -2022.36108, -116.646051035.17188)
setElementData(t,"name","Zdawanie na prawo jazdy")
local t2=createElement("text")
setElementInterior(t20)
setElementPosition(t2415.512532.1419.15)
setElementData(t2,"name","Zdawanie licencji lotniczej")


local wm={}
wm.window=guiCreateWindow(0.210.200.570.54"Zdawanie prawa jazdy"true)
guiWindowSetSizable(wm.windowfalse)
guiWindowSetMovable(wm.windowfalse)
guiSetVisible(wm.windowfalse)
wm.label=guiCreateLabel(0.020.060.960.05"Z poni?szej listy wybierz kategori? prawa jazdy do kt?rej chcesz przyst?pi? p??niej kliknij Przyst?p"truewm.window)
guiLabelSetHorizontalAlign(wm.label"center"false)
guiLabelSetVerticalAlign(wm.label"center")
wm.gridlist=guiCreateGridList(0.020.120.960.69truewm.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.620.830.360.13"Zamknij"truewm.window)
wm.submit=guiCreateButton(0.020.830.360.13"Przyst?p"truewm.window)

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

local function fillLicenseData2()
    guiGridListClear(wm.gridlist)
    for i,v in ipairs(licenseCategory2) do
        local row=guiGridListAddRow(wm.gridlist)
        guiGridListSetItemText(wm.gridlistrow1v[1], falsefalse)
        guiGridListSetItemText(wm.gridlistrow2v[2], falsefalse)
        guiGridListSetItemText(wm.gridlistrow3v[3].." PLN"falsefalse)
        guiGridListSetItemData(wm.gridlistrow3v[3])
        -- Settings
        if getElementData(localPlayer,"player:license:pj"..v[1]) == 1 then
            guiGridListSetItemText(wm.gridlistrow4"TAK"falsefalse)
            guiGridListSetItemColor(wm.gridlistrow402550)
        else
            guiGridListSetItemText(wm.gridlistrow4"NIE"falsefalse)
            guiGridListSetItemColor(wm.gridlistrow425500)
        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.gridlistselectedRow1)
    local cost=guiGridListGetItemData(wm.gridlistselectedRow3)
    local zdane=guiGridListGetItemText(wm.gridlistselectedRow4)
    if tonumber(cost) > getPlayerMoney(localPlayerthen
        outputChatBox("* Nie posiadasz tyle got?wki."25500)
        return
    end
    --[[if getPlayerName(localPlayer) ~= "Split" then
        outputChatBox("* W budowie..."25500)
        return
    end]]
    if zdane ~= "TAK" then
        triggerServerEvent("license:do"resourceRoottonumber(cost), cat)
        if not guiGetVisible(wm.windowthen return end
        guiSetVisible(wm.windowfalse)
        showCursor(false)
    else
        outputChatBox("* Posiadasz ju? zdane prawo jazdy."25500)
    end
end)

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

addEventHandler("onClientMarkerHit"marker, function(el,md)
    if not md or el~=localPlayer then return end
    if guiGetVisible(wm.windowthen 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.windowthen 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: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

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


setElementInterior(marker20)


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: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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: 3315 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.646051035.17188"cylinder"1509020075


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

wejscie_marker createMarker (-2431.41, -114.9335.32+1"arrow"1.52552000150)
wyjscie_marker createMarker (-2026.88, -103.601035.18+1"arrow"1.52552000150)
setElementDimension(wyjscie_marker1)
setElementInterior(wyjscie_marker3)

addEventHandler("onMarkerHit"wejscie_marker, function(elmd)
    if isPedInVehicle(elthen return end
    fadeCamera(el ,false)
    setElementFrozen(eltrue)
    setTimer(function ()
    outputChatBox"* Wszed?e?(a?) do szko?y jazdy."el)
    setElementDimension(el1)
    setElementInterior(el3)
    setElementPosition(el, -2029.72, -106.901035.17)
    setElementFrozen(elfalse)
    showPlayerHudComponent(el"radar"false)
    fadeCamera(eltrue)
    end15001)
end)

addEventHandler("onMarkerHit"wyjscie_marker, function(elmd)
    if isPedInVehicle(elthen return end
    fadeCamera(el ,false)
    setElementFrozen(eltrue)
    setTimer(function ()
    outputChatBox("* Wyszed?e?(a?) ze szko?y jazdy."el)
    setElementDimension(el0)
    setElementInterior(el0)
    setElementPosition(el, -2427.54, -114.8435.32)
    setElementFrozen(elfalse)
    showPlayerHudComponent(el"radar"true)
    fadeCamera(eltrue)
    end15001)
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: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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: 3315 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: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

Do kodu prawa jazdy:

local marker=createMarker(-2022.36108, -116.646051035.17188"cylinder"1509020075)
setElementInterior(marker3)
setElementDimension(marker1)
createBlip415.67,2531.83,22.515,2,0,0,0,0,0,275)
local marker2=createMarker(415.512532.1419.15-0.90"cylinder"1509020075)
setElementInterior(marker23)
setElementDimension(marker21)
local t=createElement("text")
setElementInterior(t3)
setElementDimension(t1)
setElementPosition(t, -2022.36108, -116.646051035.17188)
setElementData(t,"name","Zdawanie na prawo jazdy")
local t2=createElement("text")
setElementInterior(t23)
setElementDimension(t21)
setElementPosition(t2415.512532.1419.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: 3315 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