Wysłany: 2015-12-06, 16:27
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
local tablica = {
{},
{},
{},
{},
{},
{},
{},
{},
{},
{}
}
function WMarker ( he , md )
if not md then return edn
if he ~= localPlayer then return end
if not getElementData ( source , "Egzamin" ) then return end
if not getPedOccupiedVehicle ( localPlayer ) then return end
if postep == #tablica then
if getElementType ( he ) == "vehicle" then
destroyElement ( he )
end
destroyElement ( marker )
return end
destroyElement ( source )
postep = postep + 1
local x , y , z = tablica [ postep1 ][ 1 ], tablica [ postep ][ 2 ], tablica [ postep ][ 3 ]
local marker = createMarker ( x , y , z , "checkpoint" , 3 , 255 , 0 , 0 )
setElementData ( marker , "Egzamin" , true )
end )
function start ()
local x , y , z = tablica [ 1 ][ 1 ], tablica [ 1 ][ 2 ], tablica [ 1 ][ 3 ]
local marker = createMarker ( x , y , z , "checkpoint" , 3 , 255 , 0 , 0 )
setElementData ( marker , "Egzamin" , true )
postep = 1
addEventHandler ( "onClientMarkerHit" , resourceRoot , WMarker )
end
addEvent ( "start" , true )
addEventHandler ( "start" , getRootElement (), start )
Wysłany: 2015-12-06, 16:31
serek123
Lua, MySql, Sql
Wiek: 27 Na forum: 4334 dni Posty: 217
Nick w MP: Serek.
Piwa : 374
do tej linijki
jest db
Bad argument @ 'destoryElement' [Expected element at argument 1, got nil]
Wysłany: 2015-12-06, 16:33
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
serek123 , podmie? marker na source.
Wysłany: 2015-12-06, 16:35
serek123
Lua, MySql, Sql
Wiek: 27 Na forum: 4334 dni Posty: 217
Nick w MP: Serek.
Piwa : 374
Marker znika ale pojazd nie db czyste
Wysłany: 2015-12-06, 16:37
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
if postep == #tablica then
if getElementType ( he ) == "player" then
destroyElement ( getPedOccupiedVehicle ( he ))
end
destroyElement ( source )
return end
Wysłany: 2015-12-06, 16:40
serek123
Lua, MySql, Sql
Wiek: 27 Na forum: 4334 dni Posty: 217
Nick w MP: Serek.
Piwa : 374
Nadal nie znika
[ Dodano : 2015-12-07, 15:07 ]
Jak zrobi? to ?eby auto znika?o po wje?dzie w ostatni marker
Tagi: tablice
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: