Wysłany: 2018-05-10, 15:58
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
Witam mam problem mam taki b??d po wejsciu na pojazd publiczny.
8-05-10 09:55:16] WARNING: [MXL-GLOWNE]/MXL_vehicles/s_vehbuy.lua:222: Bad argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1, got vehicle]
[2018-05-10 09:55] WARNING: [MXL-GLOWNE]/MXL_vehicles/s_vehbuy.lua:223: Bad argument @ 'getElementData' [Expected element at argument 1, got boolean]
addEventHandler ( "onVehicleExit" , root , function( plr , seat )
if seat ~= 0 then return end
local veh = getPedOccupiedVehicle ( source )
if getElementData ( veh , "vehicle:id" ) then
onSaveVehicle ( source )
setVehicleEngineState ( source , false )
setVehicleDamageProof ( source , true )
unbindKey ( plr , 'h' , 'down' , bindHoron4 )
end
end )
Wysłany: 2018-05-10, 16:03
Toffiaaak.
Wiek: 23 Na forum: 4410 dni Posty: 128
Nick w MP: Toffy.
Piwa : 1836
addEventHandler ( "onVehicleExit" , getRootElement (), function( plr , seat )
if seat ~= 0 then return end
if getElementData ( source , "vehicle:id" ) then
onSaveVehicle ( source )
setVehicleEngineState ( source , false )
setVehicleDamageProof ( source , true )
unbindKey ( plr , 'h' , 'down' , bindHoron4 )
end
end )
Podpis
Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18
Wysłany: 2018-05-10, 16:03
jagoreq
Wiek: 24 Na forum: 3221 dni Posty: 221
Nick w MP: dwd
Piwa : 18
Source tutaj oznacza pojazd, czyli nie potrzebnie doda?e? local veh = getPedOccupiedVehicle ( source )
Powinno dzia?a?:
addEventHandler ( "onVehicleExit" , root , function( plr , seat )
if seat ~= 0 then return end
if getElementData ( source , "vehicle:id" ) then
onSaveVehicle ( source )
setVehicleEngineState ( source , false )
setVehicleDamageProof ( source , true )
unbindKey ( plr , 'h' , 'down' , bindHoron4 )
end
end )
Tagi: pojazdy :: publiczne :: system :: pojazdów.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: