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

Wysłany: 2016-12-18, 20:33


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

Mam problem z prawkiem z It's Your World poniewa? gracze robi? prawko ale jak zrobi? reconnect to musz? od nowa zdawa?

[ Dodano: 2016-12-19, 01:10 ]
Poprostu prawko si? nie zapisuje :/ . Prosz? o pomoc! ;)

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 16:28


Luqas

.lua <3






Wiek: 25
Na forum: 3455 dni
Posty: 84
Nick w MP: Luqas

Piwa: 10

Respekt: 80

Witaj!
Chodzi Ci o to, ?e podczas zdawania, je?eli gracz zrobi reconnect, to po wej?ciu na serwer nie siedzi w samochodzie?

Najlepiej jakby? poda? kod skryptu, bo nie mam dost?pu do tego GM'a w tej chwili :)

Podpis
Pomogłem? Postaw Piwo lub/i respekt ^^


 Mój Youtube (klik)
Moje skrypty:
- Pay'n'Spray -

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 18:11


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Nie zapisuje si? bo pewnie jest na zwyk?e elementdaty.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 18:32


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

A powiesz jak to zmieni?? :P

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 18:45


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Czarownikiem nie jestem, szklanej kuli nie mam wi?c bez kodu to ja sobie mog? pogwizda?.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 19:06


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

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(361.49, 171.21, 1008.38-1, "cylinder", 1.2, 255, 255, 255, 155) -- Prawo Jazdy
setElementInterior(marker, 3)
setElementDimension(marker, 1)

local marker2=createMarker(415.51, 2532.14, 19.15-1, "cylinder", 1.2, 255, 255, 255, 155) -- Licencja Lotnicza
setElementInterior(marker2, 0)

local t=createElement("text")
setElementInterior(t, 3)
setElementDimension(t,1)
setElementPosition(t, 361.49, 171.21, 1008.38)
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)


[ Dodano: 2016-12-19, 19:06 ]
To jest plik c_license.lua

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 20:21


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

BarteQ03, podaj jeszcze kod z pliku "server" i polecam stosowa? znaczki [.lua] i [./lua] (oczywi?cie bez kropek) bo kod jest wtedy czytelniejszy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 20:28


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

s_zdawanie.lua



--[[
    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 marker2=createMarker(-2050.29,-106.16,35.24,"corona",2,170,200,0)

addEventHandler("onMarkerHit"marker2, function(el,md)
 setElementPosition(el,-2044.69,-94.57,35.17 )
end)--]]

addEvent("license:do",true)
addEventHandler("license:do"resourceRoot, function(cost,selected)
    if tonumber(cost) <= getPlayerMoney(clientthen
        takePlayerMoney(client,cost)
    end

    local veh=nil
    if selected == "A" then veh=createVehicle(586, -1948.291001.0435.060.599.91269.09)
    elseif selected == "B" then veh=createVehicle(436, -1948.451001.4534.900.440.00269.07)
    elseif selected == "C" then veh=createVehicle(482, -1947.891001.9335.210.55, -0.00269.03)
    elseif selected == "L" then veh=createVehicle(593324.692543.6717.28359.4360.0179.0end
    if not veh then return end
    if selected == "L" then
    setElementData(veh,"vehicle:desc","Egzamin Licencji Lotniczej\nKategoria "..selected)
    else
    setElementData(veh,"vehicle:desc","Egzamin prawa jazdy\nKategoria "..selected)
    end
    setElementData(veh,"vehicle:mileage",16442)
    setElementData(veh,"vehicle:fuel",100)
    setElementData(veh,"vehicle:lic",true)

    setElementDimension(client,0)
    setElementInterior(client,0)
    showPlayerHudComponent(client"radar"true)
    warpPedIntoVehicle(client,veh)
    triggerClientEvent(client"license:start"resourceRootselectedveh)
    --outputChatBox("* "..getPlayerName(client).." rozpocz??(??a) egzamin prawa jazdy, kategoria: "..selected..""root25500)
end)

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

addEventHandler("onPlayerQuit"root, function()
    local veh=getPedOccupiedVehicle(source)
    if not veh then return end
    if getVehicleController(veh) ~= source then return end
    if not getElementData(veh,"vehicle:lic"then return end
    destroyElement(veh)
end)

addEventHandler("onVehicleDamage"resourceRoot, function(loss)
    local kierowca=getVehicleController(source)
    if not kierowca then return end
    if not getElementData(source,"vehicle:lic"then return end
    destroyElement(source)
    outputChatBox("* Uszkodzi?e?(a?) pojazd, nie zdajesz egzaminu!"kierowca25500)
    triggerClientEvent(kierowca"license:finish"resourceRoottrue)
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(pplr)
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(pplr)
end)


[ Dodano: 2016-12-20, 17:39 ]
Poda?em kod i czekam :/

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Tagi: prawo :: jazdy
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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