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: rozwalanie
1. Rozwalanie auta bez kierowcy
Witam mam skrypt na to ,?e jak nikogo nie ma w poj?dzie auto si? nie rozwala
i co? mi nie dzia??

local 
function pojazdPusty(veh)
if 
not veh then return end
    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") and getPedOccupiedVehicleSeat(occupant) == i 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 
source then
    
if getElementData(source,"damageproof"then setVehicleDamageProof(sourcetrue) return end
    setVehicleDamageProof
(sourcefalse)
    
end
end
)

addEventHandler "onVehicleExit"root, function()
    if 
source then
    
if (pojazdPusty(source)) then
        setVehicleDamageProof
(sourcetrue)
    else
        if 
getElementData(source,"damageproof"then setVehicleDamageProof(sourcetrue) return end
        setVehicleDamageProof
(sourcefalse)
    
end
    end
end
)
2. Rozwalanie auta poraż 3
Witam pisze to pora? 3 mo?e kto? mi pomo?e teraz.Mam taki problem z rozwalaniem auta bez kierowcy.
for _,v in pairs(getElementsByType("vehicle")) do
    if 
getElementData(v"damageproof")==1 then
        setVehicleDamageProof
(sourcetrue)
    else
        
setVehicleDamageProof(sourcefalse)
    
end
end

addEventHandler
("onVehicleExit"root,
function(
plrs)
    if 
s==0 then
        setVehicleDamageProof
(sourcetrue)
        
setElementData(source"damageproof"1)
    
end
end
)

addEventHandler("onVehicleEnter"root,
function(
plrs)
    if 
s==0 then
        setVehicleDamageProof
(sourcefalse)
        
setElementData(source"damageproof"0)
    
end
end
)

Meta:
<meta>
    <
script src="dmauta.lua" />
</
meta>

Za pomoc :piwo:
3. Rozwalanie auta
Witam mam taki problem ze mam skrypt na nie rozwalanie aut bez kierowcy jak go wgram na serwer i uruchomi? to dalej mo?na te auta rozwala?
for _,v in pairs(getElementsByType("vehicle")) do
    if 
getElementData(v"damageproof")==1 then
        setVehicleDamageProof
(sourcetrue)
    else
        
setVehicleDamageProof(sourcefalse)
    
end
end

addEventHandler
("onVehicleExit"root,
function(
plrs)
    if 
s==0 then
        setVehicleDamageProof
(sourcetrue)
        
setElementData(source"damageproof"1)
    
end
end
)

addEventHandler("onVehicleEnter"root,
function(
plrs)
    if 
s==0 then
        setVehicleDamageProof
(sourcefalse)
        
setElementData(source"damageproof"0)
    
end
end
)
4. Nie rozwalanie sie aut i wchodzenie na "G"
Witam, chc? ?eby nikt nie m?g? rozwali? auta kiedy nie ma kierowcy w nim i ?eby nie da?o si? wchodzi? na "G" bez kierowcy.