Wszystko dzia?a poprawnie bez b??d?w w DB3, natomiast gdy >2 umrze od np. granatu ustawiaja si? skiny jednego z graczy(chyba ofiary) no i wrzuca attacker'a na speca, jak to poprawi??
addEventHandler('onVehicleStartEnter',resourceRoot,function(player)
if source == self.dummy_car then
cancelEvent()
elseif source == vehicles[player] then
cancelEvent()
end
end)
addEventHandler('onVehicleStartExit',resourceRoot,function(player)
if source == vehicles[player] then
cancelEvent()
end
end)
end
function praca1surowiec:onQuit()
if vehicles[source] and isElement(vehicles[source]) then destroyElement(vehicles[source]); end
if Chest2s[source] and isElement(Chest2s[source]) then destroyElement(Chest2s[source]); end
end
Witam ot??, jak zdedam to dalej mam punkt, pr?bowa?em co? z funkcj? onPlayerWasted lecz nic
kod
s.lua
[lua]
addEvent( "koniecPracusi", true )
addEventHandler( "koniecPracusi", resourceRoot, function( plr )
if pojazd[plr] then
destroyElement( pojazd[plr] )
pojazd[plr] = nil
end
end )
addEvent( "startujPrace", true )
addEventHandler( "startujPrace", resourceRoot, function( plr, typ )
if not pojazd[plr] then
L = math.random( 1, #miejscaSpawnu )
m = miejscaSpawnu[L]
if typ == "1lvl" then
pojazd[plr] = createVehicle( 462, m[1], m[2], m[3], m[4], m[5], m[6] )
end
if typ == "2lvl" then
pojazd[plr] = createVehicle( 561, m[1], m[2], m[3], m[4], m[5], m[6] )
end
if typ == "3lvl" then
pojazd[plr] = createVehicle( 482, m[1], m[2], m[3], m[4], m[5], m[6] )
end
setVehicleColor(pojazd[plr], 255, 70, 0, 255, 255, 255 )
setElementData(pojazd[plr], "plr", plr )
setElementFrozen(pojazd[plr], true )
warpPedIntoVehicle( plr, pojazd[plr], 0 )
setVehicleHandling(pojazd[plr], "engineAcceleration", 15)
setElementData (pojazd[plr], "Pojemnosc:silnika", "1.6cm3")
setElementData (pojazd[plr], "licznik:kolor", "Pomaranczowy")
deleteColisionsWithVehicles( pojazd[plr] )
triggerClientEvent( plr, "startPracy", plr, pojazd, typ )
end
end)