Wysłany: 2018-04-22, 21:49
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
Witam robie prawo jazdy i stworzylem egzaminatora ale jak koncze prawko lub uszkodze auto to wszystko sie usuwa ale ped nie daje wam kod i nie wiem jak to zrobic pomoze ktos
function createPrawkoVehB ()
local ped = createPed ( 59 , 0 , 0 , 0 )
local veh = createVehicle ( 516 , 1404.17 , - 1781.93 , 13.55 , 0 , 0 , 90 )
setElementData ( ped , "name" , "[Egzaminator kategorii B]" )
warpPedIntoVehicle ( ped , veh , 1 )
setElementData ( source , "pj:veh" , veh )
setElementData ( veh , "pj:user" , source )
warpPedIntoVehicle ( source , veh )
setElementInterior ( source , 0 )
setElementDimension ( source , 0 )
addEventHandler ( "onVehicleStartExit" , veh , przerwijEgzamin1 )
addEventHandler ( "onVehicleExit" , veh , przerwijEgzamin1 )
addEventHandler ( "onVehicleDamage" , veh , przerwijEgzamin2 )
setElementParent ( veh , source )
end
addEvent ( "createPrawkoVehB" , true )
addEventHandler ( "createPrawkoVehB" , getRootElement (), createPrawkoVehB )
function destroyPrawkoVehB ()
local veh = getElementData ( source , "pj:veh" )
if isElement ( veh ) then
removeEventHandler ( "onVehicleExit" , veh , przerwijEgzamin1 )
removePedFromVehicle ( source )
destroyElement ( veh )
end
end
addEvent ( "destroyPrawkoVehB" , true )
addEventHandler ( "destroyPrawkoVehB" , getRootElement (), destroyPrawkoVehB )
Wysłany: 2018-04-22, 23:07
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
Polskitester156 , Usu? local z createPed.
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Wysłany: 2018-04-23, 08:09
Qwertick
Coming soon...
Wiek: 23 Na forum: 3577 dni Posty: 472
Nick w MP: Qwertick
Piwa : 2726
Zobacz to function createPrawkoVehB ()
local ped = createPed ( 59 , 0 , 0 , 0 )
local veh = createVehicle ( 516 , 1404.17 , - 1781.93 , 13.55 , 0 , 0 , 90 )
setElementData ( ped , "name" , "[Egzaminator kategorii B]" )
warpPedIntoVehicle ( ped , veh , 1 )
setElementData ( source , "pj:veh" , veh )
setElementData ( veh , "pj:user" , source )
warpPedIntoVehicle ( source , veh )
setElementInterior ( source , 0 )
setElementDimension ( source , 0 )
addEventHandler ( "onVehicleStartExit" , veh , przerwijEgzamin1 )
addEventHandler ( "onVehicleExit" , veh , przerwijEgzamin1 )
addEventHandler ( "onVehicleDamage" , veh , przerwijEgzamin2 )
setElementParent ( veh , source )
end
addEvent ( "createPrawkoVehB" , true )
addEventHandler ( "createPrawkoVehB" , getRootElement (), createPrawkoVehB )
function destroyPrawkoVehB ()
local veh = getElementData ( source , "pj:veh" )
if isElement ( veh ) then
removeEventHandler ( "onVehicleExit" , veh , przerwijEgzamin1 )
removePedFromVehicle ( source )
destroyElement ( veh )
if ped then
if isElement ( ped ) then destroyElement ( ped ) end
end
end
end
addEvent ( "destroyPrawkoVehB" , true )
addEventHandler ( "destroyPrawkoVehB" , getRootElement (), destroyPrawkoVehB )
Podpis
Kontakt
Discord: Qwertick#1210
Wysłany: 2018-04-23, 15:21
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
Wysłany: 2018-04-23, 15:21
Qwertick
Coming soon...
Wiek: 23 Na forum: 3577 dni Posty: 472
Nick w MP: Qwertick
Piwa : 2726
Wysłany: 2018-04-23, 15:34
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
?adnych b?ed?w po prostu ped sie nie usuwa
Wysłany: 2018-04-23, 16:16
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
Polskitester156 ,
1. W kodzie widz? kilka b??d?w m.in. u?ywaj?c triggerServerEvent, w evencie gracz jest jako client.
function destroyPrawkoVehB ()
local veh = getElementData ( client , "pj:veh" )
if isElement ( veh ) then
removeEventHandler ( "onVehicleExit" , veh , przerwijEgzamin1 )
removePedFromVehicle ( client )
destroyElement ( veh )
if ped then
if isElement ( ped ) then destroyElement ( ped ) end
end
end
end
addEvent ( "destroyPrawkoVehB" , true )
addEventHandler ( "destroyPrawkoVehB" , getRootElement (), destroyPrawkoVehB )
2. Czy zrobi?e? to co napisa?em wcze?niej?
Cytat: Polskitester156, Usu? local z createPed.
3. Tworz?c pojazd po stronie serwera, najlepiej jest to zrobi? na tablic?, gdy? wtedy mog? wyst?pi? bugi.
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Wysłany: 2018-04-23, 18:03
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
Zrobiles wszystko co mowiles i nic nie dziala
[ Dodano : 2018-04-23, 21:28 ]
@REF
Pomo?e kto? bo pr?bowa?em ju? r??nych rzeczy i za ka?dym razem jak sko?cze prawko czyli wyjde lub uszkodze auto to ped zostaje ale wszystko znika?!
Wysłany: 2018-04-24, 14:44
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"Polskitester156" napisał/a :Zrobiles wszystko co mowiles i nic nie dziala
[ Dodano : 2018-04-23, 21:28 ]
@REF
Pomo?e kto? bo pr?bowa?em ju? r??nych rzeczy i za ka?dym razem jak sko?cze prawko czyli wyjde lub uszkodze auto to ped zostaje ale wszystko znika?!
Co znika? Bo nie rozumiem niczego pod fraz? 'znika' i nie przytoczy?e? w pozosta?ych b??dach, ?adnych rzeczy kt?re znikaj?
Wysłany: 2018-04-24, 21:27
Polskitester156
Amazing World
Wiek: 23 Na forum: 3596 dni Posty: 79
Nick w MP: Radziu
Piwa : 2646
"Ciastuu?" napisał/a : "Polskitester156" napisał/a :Zrobiles wszystko co mowiles i nic nie dziala
[ Dodano : 2018-04-23, 21:28 ]
@REF
Pomo?e kto? bo pr?bowa?em ju? r??nych rzeczy i za ka?dym razem jak sko?cze prawko czyli wyjde lub uszkodze auto to ped zostaje ale wszystko znika?!
Co znika? Bo nie rozumiem niczego pod fraz? 'znika' i nie przytoczy?e? w pozosta?ych b??dach, ?adnych rzeczy kt?re znikaj?
Samoch?d znika ko?czy sie caly kurs prawka ale ped nie znika
Wysłany: 2018-04-24, 21:52
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Ja bym zrobi? to tak... Stworzy? peda,
local egzaminatorPed = createPed ( 0 , x , y , z )
Nada? mu elementData,
setElementData ( plr , "egzaminatorData" , egzaminatorPed )
Pobra? ped'owi, kt?ry zwie si? egzaminatorem elementData po czym j? pobra? po elemencie oraz usun?? go. Na koniec usun?? ca?? elementData,
if getElementData ( plr , "egzaminatorData" ) then
if isElement ( getElementData ( plr , "egzaminatorData" )) then
destroyElement ( getElementData ( plr , "egzaminatorData" ))
end
removeElementData ( plr , "egzaminatorData" )
end
Tagi: ped :: nie :: usuwa :: sie :: zakonczeniu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: