Wysłany: 2017-02-12, 19:27
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
mam taki problem ze je?li jeden gracz wyjdzie z pojazdu to wszystkim si? k?czy egzamin prosz? o pomoc
addEventHandler ( "onClientVehicleExit" , resourceRoot , function( player , seat )
if seat == 0 then
triggerServerEvent ( "egzaminOblany" , localPlayer )
usunOstatniCheckpoint ()
checkpoint = false
SAVEVEH = false
end
end )
oraz po wjechaniu w ostatni punkt nie zalicza go oraz nie da si? sk?czy? prawka
client
-- kolejne wspolrzedne punktow
local trasa = {
{ 2153.40 , 1657.54 ,- 24 },
{ 2086.02 , 1646.77 ,- 24 },
{ 2070.08 , 1658.95 ,- 24 },
{ 2102.94 , 1769.58 ,- 24 },
{ 2135.84 , 1771.76 ,- 24 },
{ 2319.09 , 1771.38 ,- 24 },
{ 2324.68 , 1715.58 ,- 24 },
{ 2324.94 , 1619.08 ,- 24 },
{ 2364.87 , 1610.64 ,- 24 },
{ 2423.14 , 1608.72 ,- 24 },
{ 2425.32 , 1530.12 ,- 24 },
{ 2420.69 , 1476.69 ,- 24 },
{ 2375.75 , 1475.26 ,- 24 },
{ 2364.86 , 1443.63 ,- 24 },
{ 2361.96 , 1377.73 ,- 24 },
{ 2242.83 , 1375.49 ,- 24 },
{ 2224.81 , 1358.10 ,- 24 },
{ 2225.17 , 1208.03 ,- 24 },
{ 2230.50 , 1192.52 ,- 24 },
{ 2336.95 , 1191.37 ,- 24 },
{ 2344.92 , 1061.70 ,- 24 },
{ 2342.70 , 978.59 ,- 22 },
{ 2267.40 , 975.43 ,- 24 },
{ 2141.10 , 976.28 ,- 24 },
{ 2071.49 , 982.21 ,- 24 },
{ 2074.53 , 1026.78 ,- 24 },
{ 2157.94 , 1096.99 ,- 24 },
{ 2189.63 , 1192.25 ,- 24 },
{ 2189.73 , 1361.30 ,- 24 },
{ 2160.40 , 1375.83 ,- 24 },
{ 2078.08 , 1376.38 ,- 24 },
{ 2069.42 , 1442.86 ,- 24 },
{ 2069.94 , 1548.09 ,- 24 },
{ 2073.35 , 1640.74 ,- 24 },
{ 2137.71 , 1652.74 ,- 24 },
{ 2158.08 , 1674.95 ,- 24 },
}--{ x , y , z }, prosze pamietac o przecinku , dziekuje
-- nasze kategorie oraz ceny
local kategorie = {
{ "A" , 100 },
{ "B" , 0 },
{ "C" , 150 },
{ "D" , 300 },
{ "D+E" , 500 },
}
-- gui
mojeW , mojeH = 640 , 480
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
local guiprawko = {}
guiprawko [ 1 ] = guiCreateWindow ( 150 * width , 65 * height , 321 * width , 309 * height , "Prawo Jazdy" , false )
guiWindowSetSizable ( guiprawko [ 1 ], false )
guiprawko [ 2 ] = guiCreateLabel ( 61 * width , 62 * height , 204 * width , 37 * height , "Zdawanie prawa jazdy\n Na serwerze San Andreas Life" , false , guiprawko [ 1 ])
guiLabelSetHorizontalAlign ( guiprawko [ 2 ], "left" , true )
guiprawko [ 3 ] = guiCreateGridList ( 45 * width , 113 * height , 236 * width , 132 * height , false , guiprawko [ 1 ])
guiprawko [ 4 ] = guiGridListAddColumn ( guiprawko [ 3 ], "Kategoria" , 0.5 )
guiprawko [ 5 ] = guiGridListAddColumn ( guiprawko [ 3 ], "Koszt (PLN)" , 0.5 )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria A" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 1 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria B" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 2 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria C" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 3 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria D" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 4 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria C+E" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 5 ][ 2 ], false , false )
guiprawko [ 6 ] = guiCreateButton ( 10 * width , 255 * height , 122 * width , 44 * height , "Anuluj" , false , guiprawko [ 1 ])
guiprawko [ 7 ] = guiCreateButton ( 190 * width , 255 * height , 121 * width , 44 * height , "Dalej" , false , guiprawko [ 1 ])
guiSetVisible ( guiprawko [ 1 ], false )
addEvent ( "showGUIPrawko" , true )
addEventHandler ( "showGUIPrawko" , getRootElement (),
function( a , b , c , d , de )
guiSetVisible ( guiprawko [ 1 ], true )
showCursor ( true )
end )
function onPrawkoZamknij ()
guiSetVisible ( guiprawko [ 1 ], false )
showCursor ( false )
end
addEventHandler ( "onClientGUIClick" , guiprawko [ 6 ], onPrawkoZamknij , false )
function onPrawkoDalej ()
local row , column = guiGridListGetSelectedItem ( guiprawko [ 3 ])
if row ~= - 1 then
local text = guiGridListGetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ])
local cena = guiGridListGetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ])
if tonumber ( cena ) <= getPlayerMoney ( localPlayer ) then
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" , cena )
end
else
outputChatBox ( "Nie posiadasz wystarczaj?co pieni?dzy." , 230 , 230 , 230 , true )
end
end
end
addEventHandler ( "onClientGUIClick" , guiprawko [ 7 ], onPrawkoDalej , false )
-- egzamin
addEvent ( "startEgzamin" , true )
addEventHandler ( "startEgzamin" , getRootElement (),
function( veh )
onPrawkoZamknij ()
SAVEVEH = veh -- zapisuje sobie moj pojazd
checkpoint = 1
stworzNowyCheckpoint ()
addEventHandler ( "onClientVehicleExit" , resourceRoot , function( player , seat )
if seat == 0 then
triggerServerEvent ( "egzaminOblany" , localPlayer )
usunOstatniCheckpoint ()
checkpoint = false
SAVEVEH = false
end
end )
-- 4. sek po respie auta mozna dopiero oblac - dla bezpieczenstwa przy respawnie
setTimer (function()
fixVehicle ( SAVEVEH )
addEventHandler ( "onClientVehicleCollision" , SAVEVEH , onVehicleCollision )
end , 4000 , 1 )
end )
function stworzNowyCheckpoint ( source )
if isElement ( punkt ) then
removeEventHandler ( "onClientMarkerHit" , punkt , onCheckpointHit )
destroyElement ( punkt )
destroyElement ( blip )
end
punkt = createMarker ( trasa [ checkpoint ][ 1 ], trasa [ checkpoint ][ 2 ], trasa [ checkpoint ][ 3 ] + 33 , "checkpoint" , 3 , 0 , 255 , 255 , 150 )
setMarkerTarget ( punkt , trasa [ checkpoint + 1 ][ 1 ], trasa [ checkpoint + 1 ][ 2 ], trasa [ checkpoint + 1 ][ 3 ] + 33 )
blip = createBlipAttachedTo ( punkt , 12 )
addEventHandler ( "onClientMarkerHit" , punkt , onCheckpointHit )
end
function usunOstatniCheckpoint ()
if isElement ( punkt ) then
removeEventHandler ( "onClientMarkerHit" , punkt , blip , onCheckpointHit )
destroyElement ( punkt )
destroyElement ( blip )
end
end
function onCheckpointHit ( hitElement )
if localPlayer == hitElement then
checkpoint = checkpoint + 1
if checkpoint > #trasa then
triggerServerEvent ( "egzaminZdany" , localPlayer )
zakonczEgzamin ()
else
stworzNowyCheckpoint ()
end
end
end
function onVehicleCollision ( element , loss )
if loss > 50 then
triggerServerEvent ( "egzaminOblany" , localPlayer )
zakonczEgzamin ()
end
end
function zakonczEgzamin ()
removeEventHandler ( "onClientVehicleCollision" , SAVEVEH , onVehicleCollision )
usunOstatniCheckpoint ()
checkpoint = false
SAVEVEH = false
end
prosz? o pomoc
Wysłany: 2017-02-13, 10:15
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
polaczkos , resourceRoot dzia?a na wszystkie elementy kt?re zosta?y stworzone w ca?ym zasobie.
Wysłany: 2017-02-13, 10:36
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
to na co to zamieni? na samo root ?
oraz czemu nie da sie zak?czy? egzaminu po wjechaniu w ostatni punkt nic sie nie dzieje a po wejchceniu w przed ostatni wyskakuje;
Wysłany: 2017-02-13, 10:48
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
polaczkos , musisz zrobi? ten skrypt na tablice, ?eby ka?dy gracz mia? przypisany samoch?d i wtedy zamiast resourceRoot element tabeli gracza. Spr?buj if checkpoint >= #trasa then
Wysłany: 2017-02-13, 11:03
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
teraz po wjechaniu w przed ostatni punkt prawko si? kaczy
Wysłany: 2017-02-13, 11:05
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
polaczkos , if checkpoint == #trasa + 1 then
Wysłany: 2017-02-13, 11:11
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
powr?ci? ten sam b?ad w debugscript 3
Wysłany: 2017-02-13, 14:45
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
zrob elementdate postepu prawa jazdy i potem
function show ()
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 + 1 ] then
hm = trasa [ pkt + 1 ]
setMarkerTarget ( punkt , hm [ 1 ], hm [ 2 ], hm [ 3 ])
end
end Po wjechaniu w marker jesli nie ma nastepnego to konczy egzamin. Co do wsiadania:
addEventHandler ( "onClientVehicleExit" , root , function( player , seat )
if seat == 0 then
triggerServerEvent ( "egzaminOblany" , localPlayer )
usunOstatniCheckpoint ()
checkpoint = false
SAVEVEH = false
end
end )
Je?li nie zadzia?a to nadawaj elementdate nicku gracza ktory rozpoczal prawko
i potem
addEventHandler ( "onClientVehicleExit" , resourceRoot , function( player , seat )
if seat == 0 then
if getElementData ( source , "kogo" ) == getPlayerName ( localPlayer ) then
triggerServerEvent ( "egzaminOblany" , localPlayer )
usunOstatniCheckpoint ()
checkpoint = false
SAVEVEH = false
end
end
end )
Wysłany: 2017-02-13, 15:00
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
gdzie to mam wstawi?
function show ()
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 + 1 ] then
hm = trasa [ pkt + 1 ]
setMarkerTarget ( punkt , hm [ 1 ], hm [ 2 ], hm [ 3 ])
end
end
bo nie rozumiem
Wysłany: 2017-02-13, 16:01
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Zamieni? funkcj? stworzNowyCheckpoint na to co poda?em.
Wysłany: 2017-02-13, 18:05
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
no i teraz po rozpocze?ni pojawia sie pojazd i nic po za tym nie ma
Wysłany: 2017-02-14, 13:43
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Zamie? nazw? funkcji zamiast 'show' daj tam t? swoj? nazwe stworzNowyCheckPoint czy jak tam by?o.
Wysłany: 2017-02-14, 14:42
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
dalej nie dzia?a teraz wyglada to tak
-- 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 },
}--{ x , y , z }, prosze pamietac o przecinku , dziekuje
-- nasze kategorie oraz ceny
local kategorie = {
{ "A" , 100 },
{ "B" , 0 },
{ "C" , 150 },
{ "D" , 300 },
{ "D+E" , 500 },
}
-- gui
mojeW , mojeH = 640 , 480
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
local guiprawko = {}
guiprawko [ 1 ] = guiCreateWindow ( 150 * width , 65 * height , 321 * width , 309 * height , "Prawo Jazdy" , false )
guiWindowSetSizable ( guiprawko [ 1 ], false )
guiprawko [ 2 ] = guiCreateLabel ( 61 * width , 62 * height , 204 * width , 37 * height , "Zdawanie prawa jazdy\n Na serwerze IPlayGaming" , false , guiprawko [ 1 ])
guiLabelSetHorizontalAlign ( guiprawko [ 2 ], "left" , true )
guiprawko [ 3 ] = guiCreateGridList ( 45 * width , 113 * height , 236 * width , 132 * height , false , guiprawko [ 1 ])
guiprawko [ 4 ] = guiGridListAddColumn ( guiprawko [ 3 ], "Kategoria" , 0.5 )
guiprawko [ 5 ] = guiGridListAddColumn ( guiprawko [ 3 ], "Koszt (PLN)" , 0.5 )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria A" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 1 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria B" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 2 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria C" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 3 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria D" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 4 ][ 2 ], false , false )
local row = guiGridListAddRow ( guiprawko [ 3 ])
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ], "Kategoria C+E" , false , false )
guiGridListSetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ], kategorie [ 5 ][ 2 ], false , false )
guiprawko [ 6 ] = guiCreateButton ( 10 * width , 255 * height , 122 * width , 44 * height , "Anuluj" , false , guiprawko [ 1 ])
guiprawko [ 7 ] = guiCreateButton ( 190 * width , 255 * height , 121 * width , 44 * height , "Dalej" , false , guiprawko [ 1 ])
guiSetVisible ( guiprawko [ 1 ], false )
addEvent ( "showGUIPrawko" , true )
addEventHandler ( "showGUIPrawko" , getRootElement (),
function( a , b , c , d , de )
guiSetVisible ( guiprawko [ 1 ], true )
showCursor ( true )
end )
function onPrawkoZamknij ()
guiSetVisible ( guiprawko [ 1 ], false )
showCursor ( false )
end
addEventHandler ( "onClientGUIClick" , guiprawko [ 6 ], onPrawkoZamknij , false )
function onPrawkoDalej ()
local row , column = guiGridListGetSelectedItem ( guiprawko [ 3 ])
if row ~= - 1 then
local text = guiGridListGetItemText ( guiprawko [ 3 ], row , guiprawko [ 4 ])
local cena = guiGridListGetItemText ( guiprawko [ 3 ], row , guiprawko [ 5 ])
if tonumber ( cena ) <= getPlayerMoney ( localPlayer ) then
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" , cena )
end
else
outputChatBox ( "Nie posiadasz wystarczaj?co pieni?dzy." , 230 , 230 , 230 , true )
end
end
end
addEventHandler ( "onClientGUIClick" , guiprawko [ 7 ], onPrawkoDalej , false )
-- egzamin
addEvent ( "startEgzamin" , true )
addEventHandler ( "startEgzamin" , getRootElement (),
function( veh )
onPrawkoZamknij ()
SAVEVEH = veh -- zapisuje sobie moj pojazd
checkpoint = 1
stworzNowyCheckpoint ()
addEventHandler ( "onClientVehicleExit" , resourceRoot , function( player , seat )
if seat == 0 then
triggerServerEvent ( "egzaminOblany" , localPlayer )
usunOstatniCheckpoint ()
checkpoint = false
SAVEVEH = false
end
end )
-- 4. sek po respie auta mozna dopiero oblac - dla bezpieczenstwa przy respawnie
setTimer (function()
fixVehicle ( SAVEVEH )
addEventHandler ( "onClientVehicleCollision" , SAVEVEH , onVehicleCollision )
end , 4000 , 1 )
end )
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 + 1 ] then
hm = trasa [ pkt + 1 ]
setMarkerTarget ( punkt , hm [ 1 ], hm [ 2 ], hm [ 3 ])
end
end
function onCheckpointHit ( hitElement )
if localPlayer == hitElement then
checkpoint = checkpoint + 1
if checkpoint > #trasa then
triggerServerEvent ( "egzaminZdany" , localPlayer )
zakonczEgzamin ()
else
stworzNowyCheckpoint ()
end
end
end
function onVehicleCollision ( element , loss )
if loss > 50 then
triggerServerEvent ( "egzaminOblany" , localPlayer )
zakonczEgzamin ()
end
end
function zakonczEgzamin ()
removeEventHandler ( "onClientVehicleCollision" , SAVEVEH , onVehicleCollision )
usunOstatniCheckpoint ()
checkpoint = false
SAVEVEH = false
end
Wysłany: 2017-02-14, 16:34
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Bo nie nadajesz elementdaty prawko:postep
Wysłany: 2017-02-14, 16:42
polaczkos
Wiek: 25 Na forum: 4085 dni Posty: 168
Nick w MP: polaczkos
Piwa : 3
Tagi: prawko
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: