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: setelementhealth
1. setElementHealth
Nie do ko?ca rozumiem dlaczego w tym kodzie :

function createHeliCrashSite()
    if 
cargoCol then
        destroyElement
(getElementData(cargoCol,"parent"))
        
destroyElement(cargoCol)
    
end
    local item_id 
math.random(table.size(heliCrashSites))
    
local x,y,heliCrashSites[item_id][1],heliCrashSites[item_id][2],heliCrashSites[item_id][3]
    
cargobob createVehicle(548,x,y,z,nil,nil,nil)
    
cargobob createBlip(x,y,z,5)
    
setElementHealth(cargobob,-100)
    
setElementFrozen(cargobob,true)
    
setVehicleLocked(cargobob,true)
    
cargoCol createColSphere(x,y,z,3)
    
setElementData(cargoCol,"parent",cargobob)
    
setElementData(cargoCol,"helicrash",true)
    
setElementData(cargoCol,"MAX_Slots",0)
    
setElementData(cargoCol"M4"15)
    
setTimer(createHeliCrashSite,3600000,1)
end
createHeliCrashSite
()


Nie wybucha owy helicrash jak i zar?wno nie ma freez i lock drzwi ..

Prosz? o wyt?umaczenie o co chodzi ...
2. setElementHealth i getElementHealth
Witam, robie zapis stanu auta i mam proble poniewa? jak zapisuje dane auta do sqlite to po restarcie skryptu pojazdy wybuchaj? db3 czyste

Ustawianie

setElementHealth
(auto"hppojazd"v["hpauta"])

Sprawdzanie

local autohp 
getElementHealth(v"hppojazd")