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: getelementhealth
1. getElementHealth
Witam, testuje sobie ostatnim czasem event vehicle damage.Tylko nie wiem czemu db wywala.
kod:
local vehicle getPedOccupiedVehicle(client)
  function new ()
    
local hp getElementHealth(vehicle)
    if 
hp<500 then
        outputChatBox
("co? tam")
    
end
end
addEventHandler
("onVehicleDamage"root, new)

DB 3:
[20-08-26 22] ERROR: [skrypciory]/Silniki/s.lua:4: attempt to compare boolean with number
2. getElementHealth
Witam, mam taki problem ?e chcem zrobi? ?e je?li auto ma mniej ni? 500 hp to si? powinien attachowa? marker do niego.Pr?bowa?em zrobi? lecz nie wiem czemu mi nie dzia?a.
local marker createMarker (-1753.71,885.03,295.88-1"cylinder"1.502550255)
local auto getPedOccupiedVehicle(localPlayer)
if 
auto then 
local hp 
=  getElementHealth(auto)
if 
hp<500 then 
    attachElements 
(markerauto000)
end
   end
3. 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")