Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: wybuchają
1. Auta graczom wybuchają ( dmvehicles)
Cze??, posiadam skrypt na community-dmvehicle

I auta graczom wybuchaj? jak sie pali, jak to zablokowa??

 function pojazdPusty(veh)
    
local occupants getVehicleOccupants(veh)
    
local seats getVehicleMaxPassengers(veh)
    if (
not seatsthen return true end
    
for i=0,seats do
    
local occupant occupants[seat]
    if 
occupant and (getElementType(occupant)=="player" or getElementType(occupant)=="ped"then
        
return false
    end
    end
    
return true
end


for i,v in ipairs(getElementsByType("vehicle")) do
    if (
pojazdPusty(v)) then
        setVehicleDamageProof
(v,true)
    else
    if 
getElementData(v,"damageproof"then setVehicleDamageProof(vtrue) return end
    setVehicleDamageProof
(v,false)
    
end
end

addEventHandler 
"onVehicleEnter"root, function()
    if 
getElementData(source,"damageproof"then setVehicleDamageProof(sourcetrue) return end
    setVehicleDamageProof
(sourcefalse)
end)

addEventHandler "onVehicleExit"root, function()
    if (
pojazdPusty(source)) then
        setVehicleDamageProof
(sourcetrue)
    else
        if 
getElementData(source,"damageproof"then setVehicleDamageProof(sourcetrue) return end
        setVehicleDamageProof
(sourcefalse)
    
end
end
)