Wysłany: 2021-05-04, 22:54
Norbert1234
Nie umiem w LUA
Wiek: 22 Na forum: 3987 dni Posty: 319
Nick w MP: Gusterowskyy
Piwa : 242
Witam, co zrobi?, ?e je?li wyjdzie si? z pojazdu to on znika. Stawiam zimnie piwo.
addEvent ( "JazdaProbna" , true )
addEventHandler ( "JazdaProbna" , root , function( gracz , p )
local shape = cuboid ( gracz )
if not shape then return end
local veh = getElementData ( shape , "salon" )
if not veh then return end
local model = getElementModel ( veh )
pojazdd = createVehicle ( model , 1338.43 , - 858.84 , 39.03 , 0.0 , 2.3 , 180.0 )
exports [ "w_noti" ]: noti ( "Rozpocz?…?‚e?› jazde prĂłbn?…." , source )
warpPedIntoVehicle ( gracz , pojazdd )
setTimer (function( gracz )
destroyElement ( pojazdd )
setElementPosition ( gracz , 1338.43 , - 858.84 , 39.03 )
end , 35000 , 1 , gracz )
end )
edit: r?wnie? jak kto? by pom?g?, ?eby by?y one bez kolizji.
Wysłany: 2021-05-04, 23:42
0nly6
Support-Team
Wiek: 23 Na forum: 2437 dni Posty: 54
Nick w MP: duhack
Piwa : 1040
Przy utworzeniu pojazdu testowego nadaj mu elementdat?:
setElementData ( pojazdd , "jazda-testowa" , true )
Ni?ej dodaj t? funkcj?:
function testDriveExit ( vehicle , seat )
if getElementData ( vehicle , "jazda-testowa" ) then
if seat == 0 then
destroyElement ( vehicle )
end
end
end
addEventHandler ( "onPlayerVehicleExit" , root , testDriveExit )
A co do kolizji, to musisz u?y? funkcji
Tagi: jeśli :: wyjdę :: pojazdu :: znika
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: