Wysłany: 2018-09-22, 12:04
AkossPL
Wiek: 25 Na forum: 4079 dni Posty: 140
Nick w MP: AkossPL
Piwa : 3
Siema mam problem bo nie wiem jak tutaj doda? lawety mo?ecie i pod innom frakcje sara pom?c postawie piwo
addEventHandler ( "onMarkerHit" , oddanie ,function( el , md )
if getElementType ( el ) ~= "player" then return end
local veh = getPedOccupiedVehicle ( el )
if not veh then return end
if veh and getElementModel ( veh ) ~= 525 then return end
local duty = getElementData ( el , "player:faction" )
if not duty or ( duty and duty ~= "SAPD" ) then return end
local tow = getVehicleTowedByVehicle ( veh )
if not tow then return end
triggerClientEvent ( el , "glownyparking:refresh" , root , tow )
end )
addEventHandler ( "onMarkerLeave" , oddanie ,function( el , md )
if getElementType ( el ) ~= "player" then return end
local veh = getPedOccupiedVehicle ( el )
if not veh then return end
if veh and getElementModel ( veh ) ~= 525 then return end
local duty = getElementData ( el , "player:faction" )
if not duty or ( duty and duty ~= "SAPD" ) then return end
local tow = getVehicleTowedByVehicle ( veh )
if not tow then return end
triggerClientEvent ( el , "glownyparking:chowaj" , root )
end )
Wysłany: 2018-09-22, 12:30
Qwertick
Coming soon...
Wiek: 23 Na forum: 3577 dni Posty: 472
Nick w MP: Qwertick
Piwa : 2726
Masz tutaj id pojazdu 525 if veh and getElementModel ( veh ) ~= 525 then return end i musisz j? zmieni? na id lawety.
Podpis
Kontakt
Discord: Qwertick#1210
Wysłany: 2018-09-22, 12:59
Kuks*
Wiek: 15 Na forum: 3030 dni Posty: 246
Nick w MP: Kuks*
Piwa : 2208
Du?o roboty, ?eby to dzia?a?o na lawet?, trzeba dopisa? troch? kodu, poniewa?:
getVehicleTowedByVehicle ( veh )
nie dzia?a na lawety, jedynie na Towtruck'a, mo?esz zamieni? to na getElementAttachedTo (), je?eli masz attachowany pojazd do lawety(Tylko ten pojazd, bez innych element?w), ewentualnie, je?eli posiadasz inne elementy przymocowane do pojazdu, mo?esz zrobi?
if getElementType ( getElementAttachedTo ( element )) ~= "vehicle" then return end
Dalej mo?esz doda?, ?e je?eli liczba przymocowanych element?w do lawety jest wi?ksza ni? 1 to return end. Je?eli zero pojazd?w to r?wnie?.
Czyli mo?esz zrobi?
if #pojazdy ~= 1 then return end
?eby? nie mia? b??d?w w DB3.
Jeszcze musisz wcze?niej zrobi? komend? lub cokolwiek, ?eby przymocowywa? te pojazdy do lawety, ale chyba kiedy? widzia?em taki skrypt na gtao.pl.
Je?eli pomog?em, licz? na i
Tagi: jak :: dodać :: tutaj :: inny :: pojazd :: niż :: holownik
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: