Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-07-12, 18:04


mrmay4141

KOR Gaming Innovator






Wiek: 28
Na forum: 4860 dni
Posty: 86
Nick w MP: Sexyvise

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
Witam, ?ci?gn??em skrypt z community na to by pojazdy nie wybucha?y ale wy??cza? si? w nich silnik. Ujawni? si? w skrypcie b??d gdy? pojazd gdy mo?e normalnie je?dzi?, nie mo?na w nim wy??czy? silnika a gdy wy??cze ten skrypt to mo?na.
setTimer(
function ( )
    for _vehicle in ipairs getElementsByType "vehicle" ) ) do
     if getElementHealth(vehicle) < 300 then
     setVehicleDamageProofvehicletrue)
     setVehicleEngineStatevehiclefalse)
 else
     if getElementHealth(vehicle) > 301 then
     setVehicleDamageProofvehiclefalse)
     setVehicleEngineStatevehicletrue)
   end
  end
 end
end,
1000
)


Pomoc = :piwo: :piwo: :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-16, 17:08


GumiS0000







Wiek: 29
Na forum: 4555 dni
Posty: 98
Nick w MP: After

Piwa: 227

Respekt: 40

Ostrzeżeń: 20%
Zamie? na to:

  setTimer(
function ( )
    for _vehicle in ipairs getElementsByType "vehicle" ) ) do
     if getElementHealth(vehicle) < 300 then
     setVehicleDamageProofvehicletrue)
 else
     if getElementHealth(vehicle) > 301 then
     setVehicleDamageProofvehiclefalse)
   end
  end
 end
end,
1000
)

Licze na piwko ;)

Podpis
Jeśli pomogłem liczę na :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-16, 17:31


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4782 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1798

Respekt: 117,3
Respekt: 117,3

"GumiS0000" napisał/a:

Zamie? na to:

  setTimer(
function ( )
    for _vehicle in ipairs getElementsByType "vehicle" ) ) do
     if getElementHealth(vehicle) < 300 then
     setVehicleDamageProofvehicletrue)
 else
     if getElementHealth(vehicle) > 301 then
     setVehicleDamageProofvehiclefalse)
   end
  end
 end
end,
1000
)

Licze na piwko ;)


Kieruje na powr?t do wiki a nie na piwa liczy? timer co 100ms ma powtarza? si? ci?gle?...
Do czego to dochodzi... taka funkcja to zab?jstwo dla serwera

[ Dodano: 2014-07-16, 18:02 ]
 
function sprawdzwozy ( )
    for _vehicle in ipairs getElementsByType "vehicle" ) ) do
     if (getElementHealth(vehicle) < 300then
     setVehicleDamageProofvehicletrue)
     setVehicleEngineState(vehiclefalse)
 else
     if (getElementHealth(vehicle) > 301then
     setVehicleDamageProofvehiclefalse)
   end
  end
 end
end
addEventHandler('onResourceStart',getResourceRootElement(getThisResource()),sprawdzwozy)
addEventHandler('onVehicleDamage',getRootElement(),sprawdzwozy)


Nie chce mi si? pisa? tu ca?ego skryptu na system pojazd?w... bo trzeba wielu funkcji tu jeszcze (wsiadanie wysiadanie z auta, naprawienie auta)

Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Tagi: silnika :: nie :: zgasza
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Silnika nie zgasza Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku