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

Wysłany: 2017-03-01, 18:44


polaczkos







Wiek: 25
Na forum: 4085 dni
Posty: 168
Nick w MP: polaczkos

Piwa: 3

Respekt: 45,3

Gdy rozpoczynam prawo jazdy to nie pojawia si? punkt

prawko_c

--kolejne wspolrzedne punktow 
local trasa = { 
{2153.40,1657.54,10.59},
{2086.02,1646.77,10.45},
{2070.08,1658.95,10.44},
{2102.94,1769.58,10.44},
{2135.84,1771.76,10.44},
{2319.09,1771.38,10.48},
{2324.68,1715.58,10.54},
{2324.94,1619.08,10.51},
{2364.87,1610.64,10.44},
{2423.14,1608.72,10.67},
{2425.32,1530.12,10.59},
{2420.69,1476.69,10.61},
{2375.75,1475.26,10.48},
{2364.86,1443.63,10.44},
{2361.96,1377.73,10.53},
{2242.83,1375.49,10.55},
{2224.81,1358.10,10.52},
{2225.17,1208.03,10.53},
{2230.50,1192.52,10.59},
{2336.95,1191.37,10.45},
{2344.92,1061.70,10.44},
{2342.70,978.59,10.43},
{2267.40,975.43,10.44},
{2141.10,976.28,10.49},
{2071.49,982.21,10.41},
{2074.53,1026.78,10.35},
{2157.94,1096.99,12.49},
{2189.63,1192.25,10.78},
{2189.73,1361.30,10.43},
{2160.40,1375.83,10.44},
{2078.08,1376.38,10.43},
{2069.42,1442.86,10.44},
{2069.94,1548.09,10.45},
{2073.35,1640.74,10.44},
{2137.71,1652.74,10.46},
{2158.08,1674.95,10.46},
}--{xyz}, prosze pamietac o przecinkudziekuje 

--nasze kategorie oraz ceny 
local kategorie = { 
{"A"100}, 
{"B"0}, 
{"C"150},    
{"D"300},
{"D+E"500},
} 

--gui 
mojeW,mojeH 640480 
sW,sH guiGetScreenSize() 
widthheight = (sW/mojeW), (sH/mojeHlocal guiprawko = {} 
guiprawko[1] = guiCreateWindow(150*width65*height321*width309*height"Prawo Jazdy"falseguiWindowSetSizable(guiprawko[1], falseguiprawko[2] = guiCreateLabel(61*width62*height204*width37*height"Zdawanie prawa jazdy\n Na serwerze IPlayGaming"falseguiprawko[1]) 
guiLabelSetHorizontalAlign(guiprawko[2], "left"trueguiprawko[3] = guiCreateGridList(45*width113*height236*width132*heightfalseguiprawko[1]) 
guiprawko[4] = guiGridListAddColumn(guiprawko[3], "Kategoria"0.5guiprawko[5] = guiGridListAddColumn(guiprawko[3], "Koszt (PLN)"0.5local row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria A"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[1][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria B"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[2][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria C"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[3][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria D"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[4][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria C+E"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[5][2], falsefalseguiprawko[6] = guiCreateButton(10*width255*height122*width44*height"Anuluj"falseguiprawko[1]) 
guiprawko[7] = guiCreateButton(190*width255*height121*width44*height"Dalej"falseguiprawko[1]) 
guiSetVisible(guiprawko[1], falseaddEvent("showGUIPrawko"trueaddEventHandler("showGUIPrawko"getRootElement(), 
function(abcdeguiSetVisible(guiprawko[1], trueshowCursor(trueend) 

function onPrawkoZamknij() 
guiSetVisible(guiprawko[1], falseshowCursor(falseend 
addEventHandler ("onClientGUIClick"guiprawko[6], onPrawkoZamknijfalse) 

function onPrawkoDalej() 
local rowcolumn guiGridListGetSelectedItem(guiprawko[3]) 
if row ~= -1 then 
local text guiGridListGetItemText (guiprawko[3], rowguiprawko[4]) 
local cena guiGridListGetItemText (guiprawko[3], rowguiprawko[5]) 
if tonumber(cena) <= getPlayerMoney(localPlayerthen 
if text == "Kategoria A" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"A"cena) 
elseif text == "Kategoria B" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"B"cena) 
elseif text == "Kategoria C" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"C"cena) 
elseif text == "Kategoria C+E" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"C+E"cena) 
elseif text == "Kategoria D" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"D"cenaend 
else 
outputChatBox("Nie posiadasz wystarczaj?co pieni?dzy."230230230trueend 
end 
end 
addEventHandler ("onClientGUIClick"guiprawko[7], onPrawkoDalejfalse) 

--egzamin 
addEvent("prawko:zdajacy"trueaddEventHandler("prawko:zdajacy"getRootElement(), 
function(vehonPrawkoZamknij() 

SAVEVEH veh --zapisuje sobie moj pojazd 
checkpoint 1 
stworzNowyCheckpoint() 


addEventHandler("onClientVehicleExit"resourceRoot, function(playerseat) 
if seat == 0 then 
if getElementData(source"kogo") == getPlayerName(localPlayerthen
triggerServerEvent("egzaminOblany"localPlayerusunOstatniCheckpoint() 
checkpoint false 
SAVEVEH false 
end
end 
end) 


--4. sek po respie auta mozna dopiero oblac dla bezpieczenstwa przy respawnie 
setTimer(function() 
fixVehicle(SAVEVEHaddEventHandler("onClientVehicleCollision"SAVEVEHonVehicleCollisionend40001end) 

function stworzNowyCheckpoint()
local pkt getElementData(localPlayer"prawko:postep")
local hm trasa[pkt]

if not hm then
zakonczEgzamin()
  return
end

punkt createMarker(hm[1], hm[2], hm[3], "checkpoint",3,0,255,255,170)
setElementData punkt"prawko:zdajacy"getPlayerName(localPlayer) )

    if trasa[pkt+1then
        hm trasa[pkt+1]
        setMarkerTarget(punkthm[1], hm[2], hm[3])
    end
end

function onCheckpointHit(hitElement) 
if localPlayer == hitElement then 
checkpoint checkpoint if checkpoint #trasa then 
triggerServerEvent("egzaminZdany"localPlayerzakonczEgzamin() 
else 
stworzNowyCheckpoint() 
end 
end 
end 

function onVehicleCollision(elementloss) 
if loss 50 then 
triggerServerEvent("egzaminOblany"localPlayerzakonczEgzamin() 
end 
end 

function zakonczEgzamin() 
removeEventHandler("onClientVehicleCollision"SAVEVEHonVehicleCollision) 
--usunOstatniCheckpoint() 
checkpoint false 
SAVEVEH false 
end 



prawko-s


--lista pojazdow 
local blokady = {} 

--kategoria A 
blokady[448] = "A" -- Pizzaboy 
blokady[461] = "A" -- PCJ_600 
blokady[463] = "A" -- Freeway 
blokady[468] = "A" -- Sanchez 
blokady[471] = "A" -- Quad 
blokady[521] = "A" -- FCR_900 
blokady[522] = "A" -- NRG_500 
blokady[523] = "A" -- HPV1000 
blokady[581] = "A" -- BF_400 
blokady[586] = "A" -- Wayfayer 

--kategoria B 
blokady[400] = "B" -- Landstalker 
blokady[401] = "B" -- Bravura 
blokady[402] = "B" -- Buffalo 
blokady[404] = "B" -- Perenniel 
blokady[405] = "B" -- Sentinel 
blokady[409] = "B" -- Stretch 
blokady[410] = "B" -- Manana 
blokady[411] = "B" -- Infernus 
blokady[415] = "B" -- Cheetah 
blokady[418] = "B" -- Moonbeam 
blokady[419] = "B" -- Esperanto 
blokady[420] = "B" -- Taxi 
blokady[421] = "B" -- Washington 
blokady[422] = "B" -- Bobcat 
blokady[423] = "B" -- BF_Injection 
blokady[426] = "B" -- Premier 
blokady[429] = "B" -- Banshee 
blokady[434] = "B" -- Hotknife 
blokady[436] = "B" -- Previon 
blokady[438] = "B" -- Cabbie 
blokady[439] = "B" -- Stallion 
blokady[442] = "B" -- Romero 
blokady[445] = "B" -- Admiral 
blokady[451] = "B" -- Turismo 
blokady[458] = "B" -- Solair 
blokady[466] = "B" -- Glendale 
blokady[467] = "B" -- Oceanic 
blokady[470] = "B" -- Patriot 
blokady[474] = "B" -- Hermes 
blokady[475] = "B" -- Sabre 
blokady[477] = "B" -- ZR-350 
blokady[478] = "B" -- Walton 
blokady[479] = "B" -- Regina 
blokady[480] = "B" -- Comet 
blokady[489] = "B" -- Rancher 
blokady[490] = "B" -- FBI Rancher 
blokady[491] = "B" -- Virgo 
blokady[492] = "B" -- Greenwood 
blokady[495] = "B" -- Sandking 
blokady[469] = "B" -- Blista_Compact 
blokady[496] = "B" -- Mesa 
blokady[505] = "B" -- Rancher2 
blokady[506] = "B" -- Super_GT 
blokady[507] = "B" -- Elegant 
blokady[516] = "B" -- Nebula 
blokady[517] = "B" -- Majestic 
blokady[518] = "B" -- Buccaneer 
blokady[526] = "B" -- Fortune 
blokady[527] = "B" -- Cadrona 
blokady[529] = "B" -- Willard 
blokady[531] = "B" -- Tractor 
blokady[533] = "B" -- Feltzer 
blokady[534] = "B" -- Remington 
blokady[535] = "B" -- Slamvan 
blokady[536] = "B" -- Blade 
blokady[540] = "B" -- Vincent 
blokady[541] = "B" -- Bullet 
blokady[542] = "B" -- Clover 
blokady[543] = "B" -- Sadler 
blokady[545] = "B" -- Hustler 
blokady[546] = "B" -- Intuder 
blokady[547] = "B" -- Primo 
blokady[548] = "B" -- Tampa 
blokady[550] = "B" -- Sunrise 
blokady[551] = "B" -- Merit 
blokady[552] = "B" -- Utility_Van 
blokady[554] = "B" -- Yosemite 
blokady[555] = "B" -- Windsor 
blokady[558] = "B" -- Uranus 
blokady[559] = "B" -- Jester 
blokady[560] = "B" -- Sultan 
blokady[561] = "B" -- Stratum 
blokady[562] = "B" -- Elegy 
blokady[565] = "B" -- Flash 
blokady[567] = "B" -- Savanna 
blokady[568] = "B" -- Bandito 
blokady[575] = "B" -- Broadway 
blokady[576] = "B" -- Tornado 
blokady[579] = "B" -- Huntley 
blokady[580] = "B" -- Stafford 
blokady[583] = "B" -- Tug 
blokady[585] = "B" -- Emperor 
blokady[587] = "B" -- Euros 
blokady[589] = "B" -- Club 
blokady[596] = "B" -- Police_Car_(LSPDblokady[597] = "B" -- Police_Car_(SFPDblokady[598] = "B" -- Police_Car_(LVPDblokady[599] = "B" -- Police Renger 
blokady[600] = "B" -- Picador 
blokady[602] = "B" -- Alpha 
blokady[603] = "B" -- Phoenix 
blokady[604] = "B" -- Glendale_Shit 
blokady[605] = "B" -- Sadler_Shit 

--kategoria C 
blokady[406] = "C" -- Dumper 
blokady[408] = "C" -- Trashmaster 
blokady[413] = "C" -- Pony 
blokady[414] = "C" -- Mule 
blokady[416] = "C" -- Ambulance 
blokady[423] = "C" -- Mr_Whoopee 
blokady[427] = "C" -- Enforcer 
blokady[428] = "C" -- Securicar 
blokady[433] = "C" -- Barracks 
blokady[440] = "C" -- Rumpo 
blokady[443] = "C" -- Packer 
blokady[455] = "C" -- Flatbed 
blokady[456] = "C" -- Yankee 
blokady[459] = "C" -- Topfun_Van(Berkley's RC) 
blokady[470] = "C" -- Patriot 
blokady[482] = "C" -- Burrito 
blokady[483] = "C" -- Camper 
blokady[486] = "C" -- Dozer 
blokady[498] = "C" -- Boxville 
blokady[499] = "C" -- Benson 
blokady[508] = "C" -- Journey  
blokady[524] = "C" -- Cement_Truck 
blokady[525] = "C" -- Towtruck 
blokady[528] = "C" -- FBI_Truck 
blokady[532] = "C" -- Combine_Harvester 
blokady[544] = "C" -- Firetruck_LA 
blokady[573] = "C" -- Dune 
blokady[578] = "C" -- DFT_30 
blokady[582] = "C" -- Newsvan 
blokady[588] = "C" -- Hotdog 
blokady[609] = "C" -- Boxville 

--Kategoria C+E
blokady[515] = "C+E" -- Roadtrain
blokady[514] = "C+E" -- Tanker 
blokady[403] = "C+E" -- Linerunner 

--Kategoria D
blokady[437] = "D" -- Coach 
blokady[431] = "D" -- Bus 


--markery 

local biurkop = createMarker( 358.24,182.70,1007.1, "cylinder", 2, 0,0, 255,255) 
setElementInterior(biurkop, 3) 
setElementDimension(biurkop, 3) 

function onPrawkoHit(hitElement, dim) 
if getElementType(hitElement) == "player" then 
triggerClientEvent(hitElement, "showGUIPrawko", resourceRoot, false, false, false) 
end 
end 
addEventHandler("onMarkerHit", biurkop, onPrawkoHit) 
--// koniec markerow i ich funkcji 
local veh = {} 

addEvent("egzaminPrawaJazdy", true) 
addEventHandler("egzaminPrawaJazdy", getRootElement(), 
function(kategoria, cena) 
local account = getPlayerAccount(source) 
if account then 
local data = getAccountData(account, "kat"..kategoria) 
if not data or data == false or data == nil then 
if not veh[source] then 
if kategoria == "A" then 
veh[source] = createVehicle(586,2173.18,1664.37,10.34, 0, 0,90) 
setElementDimension(source, 0) 
setElementData(veh[source], "pojazd_paliwo", 100)
setElementData(veh[source], "pojazd_przebieg", 9704)
setElementData(veh[source], "vopis", "Egzamin prawa jazdy kategori 'A'") 
setElementData(veh[source], "pojazdy_paliwo", 50) 
elseif kategoria == "B" then 
veh[source] = createVehicle(410,2173.07,1664.37,10.47, 0, 0,90) 
setElementDimension(source, 0) 
setElementData(veh[source], "pojazd_paliwo", 100)
setElementData(veh[source], "pojazd_przebieg", 9704)
setElementData(veh[source], "vopis", "Egzamin prawa jazdy kategori 'B'") 
setElementData(veh[source], "pojazdy_paliwo", 50) 
elseif kategoria == "C" then 
veh[source] = createVehicle(498,2173.54,1664.19,10.89, 0, 0,90) 
setElementDimension(source, 0) 
setElementData(veh[source], "pojazd_paliwo", 100)
setElementData(veh[source], "pojazd_przebieg", 9704)
setElementData(veh[source], "vopis", "Egzamin prawa jazdy kategori 'C'") 
setElementData(veh[source], "pojazdy_paliwo", 50) 
elseif kategoria == "C+E" then 
veh[source] = createVehicle(403,2173.06,1664.18,11.43, 0, 0,90) 
setElementDimension(source, 0) 
setElementData(veh[source], "pojazd_paliwo", 100)
setElementData(veh[source], "pojazd_przebieg", 9704)
setElementData(veh[source], "vopis", "Egzamin prawa jazdy kategori 'C+E'") 
setElementData(veh[source], "pojazdy_paliwo", 50) 
elseif kategoria == "D" then 
veh[source] = createVehicle(431,2171.67,1664.40,10.92, 0, 0,90) 
setElementDimension(source, 0) 
setElementData(veh[source], "pojazd_paliwo", 100)
setElementData(veh[source], "pojazd_przebieg", 9704)
setElementData(veh[source], "vopis", "Egzamin prawa jazdy kategori 'D'") 
setElementData(veh[source], "pojazdy_paliwo", 50) 
end 
takePlayerMoney(source, cena) 
setElementInterior(source, 0) 
warpPedIntoVehicle (source, veh[source]) 
triggerClientEvent(source, "prawko:zdajacy", resourceRoot, veh[source]) 
outputChatBox("Rozpocz??e? egzamin na prawo jazdy (kategoria "..kategoria..").", source, 230, 230, 230, true) 
setElementData(source, "prawko:postep", kategoria) 
else 
outputChatBox("Rozpocz??e? ju? jeden egzamin.", source, 230, 230, 230, true) 
end 
else 
outputChatBox("Posiadasz ju? prawo jazdy na kategori? "..kategoria..".", source, 230, 230, 230, true) 
end 
end 
end) 

addEvent("egzaminZdany", true) 
addEventHandler("egzaminZdany", getRootElement(), 
function() 
if isElement(veh[source]) then 
destroyElement(veh[source]) 
end 

local kat = getElementData(source, "egzamin") 
local account = getPlayerAccount(source) 
if account then 
setAccountData(account, "kat"..kat, true) 
outputChatBox("Gratulacje! Zda?e? prawo jazdy na kategori? "..kat.."!", source, 230, 230, 230, true) 
setElementData(source, "egzamin", false) 
warpToSzkolaJazdy(source) 
end 
end) 

addEvent("egzaminOblany", true) 
addEventHandler("egzaminOblany", getRootElement(), 
function() 
if isElement(veh[source]) then 
destroyElement(veh[source]) 
end 

local kat = getElementData(source, "egzamin") 
local account = getPlayerAccount(source) 
if account then 
setAccountData(account, "kat" ..kat.. "", false) 
outputChatBox("Niestety, nie uda?o Ci si? zda? prawa jazdy na kategorie "..kat.."!", source, 230, 230, 230, true)
setElementData(source, "egzamin", false) 
warpToSzkolaJazdy(source) 
end 
end) 

function warpToSzkolaJazdy(player) 
removePedFromVehicle (player) 
veh[player] = false 
setElementInterior(player, 3) 
setElementDimension(player, 3) 
setElementPosition(player, 367.19,182.55,1008.38) 
setElementRotation(player, 0, 0, 0) 
end 

--blokada wchodzenia 

function onBlokadaVeh(player, seat, jacked) 
local id = getElementModel(source) 
local blokada = blokady[id] 
if blokada then 
if (seat == 0) then 
local account = getPlayerAccount(player) 
if account then 
local kategoria = getAccountData(account, "kat"..blokada) 
if kategoria ~= true then 
cancelEvent() 
outputChatBox ("Potrzebujesz prawa jazdy kategorii "..blokada.." by prowadzi? ten pojazd.", player, 230, 230, 230, true) 
end 
end 
end 
end 
end 
addEventHandler ("onVehicleStartEnter", getRootElement(), onBlokadaVeh) 

prosz? o pomoc :D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-01, 19:34


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

Wywo?uj?c funkcj? musi by? on wy?ej ni? tam gdzie j? wywo?ujesz.

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-01, 19:51


maciek3286

LUA Developer






Wiek: 26
Na forum: 5201 dni
Posty: 230
Nick w MP: maciek00

Piwa: 3207

Respekt: 101,5
Respekt: 101,5

A mnie interesuje sk?d masz m?j skrypt je?eli nigdzie go nie udost?pnia?em. Hm?

Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-01, 20:09


polaczkos







Wiek: 25
Na forum: 4085 dni
Posty: 168
Nick w MP: polaczkos

Piwa: 3

Respekt: 45,3

ten skrypt jest z?ozony z kilkunastu kt?re znajdowa?y sie na gta o

[ Dodano: 2017-03-01, 20:56 ]
@amited to jak mam to zrobi? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-01, 20:59


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

To co napisa?em. Masz przenie?? "prawko:zdajacy" na sam d?? skryptu

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-02, 13:58


polaczkos







Wiek: 25
Na forum: 4085 dni
Posty: 168
Nick w MP: polaczkos

Piwa: 3

Respekt: 45,3


--nasze kategorie oraz ceny 
local kategorie = { 
{"A"100}, 
{"B"0}, 
{"C"150},    
{"D"300},
{"D+E"500},
} 

--gui 
mojeW,mojeH 640480 
sW,sH guiGetScreenSize() 
widthheight = (sW/mojeW), (sH/mojeHlocal guiprawko = {} 
guiprawko[1] = guiCreateWindow(150*width65*height321*width309*height"Prawo Jazdy"falseguiWindowSetSizable(guiprawko[1], falseguiprawko[2] = guiCreateLabel(61*width62*height204*width37*height"Zdawanie prawa jazdy\n Na serwerze IPlayGaming"falseguiprawko[1]) 
guiLabelSetHorizontalAlign(guiprawko[2], "left"trueguiprawko[3] = guiCreateGridList(45*width113*height236*width132*heightfalseguiprawko[1]) 
guiprawko[4] = guiGridListAddColumn(guiprawko[3], "Kategoria"0.5guiprawko[5] = guiGridListAddColumn(guiprawko[3], "Koszt (PLN)"0.5local row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria A"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[1][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria B"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[2][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria C"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[3][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria D"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[4][2], falsefalselocal row guiGridListAddRow (guiprawko[3]) 
guiGridListSetItemText (guiprawko[3], rowguiprawko[4], "Kategoria C+E"falsefalseguiGridListSetItemText (guiprawko[3], rowguiprawko[5], kategorie[5][2], falsefalseguiprawko[6] = guiCreateButton(10*width255*height122*width44*height"Anuluj"falseguiprawko[1]) 
guiprawko[7] = guiCreateButton(190*width255*height121*width44*height"Dalej"falseguiprawko[1]) 
guiSetVisible(guiprawko[1], falseaddEvent("showGUIPrawko"trueaddEventHandler("showGUIPrawko"getRootElement(), 
function(abcdeguiSetVisible(guiprawko[1], trueshowCursor(trueend) 

function onPrawkoZamknij() 
guiSetVisible(guiprawko[1], falseshowCursor(falseend 
addEventHandler ("onClientGUIClick"guiprawko[6], onPrawkoZamknijfalse) 

function onPrawkoDalej() 
local rowcolumn guiGridListGetSelectedItem(guiprawko[3]) 
if row ~= -1 then 
local text guiGridListGetItemText (guiprawko[3], rowguiprawko[4]) 
local cena guiGridListGetItemText (guiprawko[3], rowguiprawko[5]) 
if tonumber(cena) <= getPlayerMoney(localPlayerthen 
if text == "Kategoria A" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"A"cena) 
elseif text == "Kategoria B" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"B"cena) 
elseif text == "Kategoria C" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"C"cena) 
elseif text == "Kategoria C+E" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"C+E"cena) 
elseif text == "Kategoria D" then 
triggerServerEvent("egzaminPrawaJazdy"localPlayer"D"cenaend 
else 
outputChatBox("Nie posiadasz wystarczaj?co pieni?dzy."230230230trueend 
end 
end 
addEventHandler ("onClientGUIClick"guiprawko[7], onPrawkoDalejfalse) 


function stworzNowyCheckpoint()
local pkt getElementData(localPlayer"prawko:postep")
local hm trasa[pkt]

if not hm then
zakonczEgzamin()
  return
end

punkt createMarker(hm[1], hm[2], hm[3], "checkpoint",3,0,255,255,170)
setElementData punkt"prawko:zdajacy"getPlayerName(localPlayer) )

    if trasa[pkt+1then
        hm trasa[pkt+1]
        setMarkerTarget(punkthm[1], hm[2], hm[3])
    end
end

function onCheckpointHit(hitElement) 
if localPlayer == hitElement then 
checkpoint checkpoint if checkpoint #trasa then 
triggerServerEvent("egzaminZdany"localPlayerzakonczEgzamin() 
else 
stworzNowyCheckpoint() 
end 
end 
end 

function onVehicleCollision(elementloss) 
if loss 50 then 
triggerServerEvent("egzaminOblany"localPlayerzakonczEgzamin() 
end 
end 

function zakonczEgzamin() 
removeEventHandler("onClientVehicleCollision"SAVEVEHonVehicleCollision) 
--usunOstatniCheckpoint() 
checkpoint false 
SAVEVEH false 
end 

--egzamin 
addEvent("prawko:zdajacy"trueaddEventHandler("prawko:zdajacy"getRootElement(), 
function(vehonPrawkoZamknij() 

SAVEVEH veh --zapisuje sobie moj pojazd 
checkpoint 1 
stworzNowyCheckpoint() 


addEventHandler("onClientVehicleExit"resourceRoot, function(playerseat) 
if seat == 0 then 
if getElementData(source"kogo") == getPlayerName(localPlayerthen
triggerServerEvent("egzaminOblany"localPlayerusunOstatniCheckpoint() 
checkpoint false 
SAVEVEH false 
end
end 
end) 


--4. sek po respie auta mozna dopiero oblac dla bezpieczenstwa przy respawnie 
setTimer(function() 
fixVehicle(SAVEVEHaddEventHandler("onClientVehicleCollision"SAVEVEHonVehicleCollisionend40001end

tak o ? bo nie dzi?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-02, 15:23


maciek3286

LUA Developer






Wiek: 26
Na forum: 5201 dni
Posty: 230
Nick w MP: maciek00

Piwa: 3207

Respekt: 101,5
Respekt: 101,5

"polaczkos" napisał/a:

ten skrypt jest z?ozony z kilkunastu kt?re znajdowa?y sie na gta o


To dziwne. Poniewa? skrypt jest napisany literka w literk? tak jak m?j. ??cznie z komentarzami.

Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-02, 15:43


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

no to daj db3..

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-02, 16:52


polaczkos







Wiek: 25
Na forum: 4085 dni
Posty: 168
Nick w MP: polaczkos

Piwa: 3

Respekt: 45,3

W?a?nie w DB nic nie pokazuje

[ Dodano: 2017-03-03, 22:16 ]
Pomo?e kto? ?

[ Dodano: 2017-03-05, 14:35 ]
prosz? o pomoc

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