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

Wysłany: 2018-12-05, 22:42


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Dziwny b??d po wej?ciu do samochodu

SS DB3: https://imgur.com/a/lbmprMm



addEventHandler("onClientRender",root,function ()
if isPedInVehicle(localPlayerthen
  local veh getPedOccupiedVehicle(localPlayer)
  if getVehicleController(veh)==localPlayer and vehicleSiren[getElementModel(veh)] then
  if getKeyState("j"then
  if activeSirens[vehthen
  setElementData(veh,"og.sirenspeed",true)
  end
  else
  setElementData(veh,"og.sirenspeed",false)
  end
  end
  
  end
  end)


Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-05, 23:08


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Spr?buj z ciekawo?ci taki kod:

addEventHandler("onClientRender"root, function()
    if isPedInVehicle(localPlayerthen
        if getVehicleOccupant(getPedOccupiedVehicle(localPlayer), 0) == localPlayer and vehicleSiren[getElementModel(getPedOccupiedVehicle(localPlayer))] then
            if getKeyState("j"then
                if activeSirens[getPedOccupiedVehicle(localPlayer)] then
                    setElementData(getPedOccupiedVehicle(localPlayer), "og.sirenspeed"true)
                end
            else
                setElementData(getPedOccupiedVehicle(localPlayer), "og.sirenspeed"false)
            end
        end 
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-05, 23:12


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Jak zrobi? tak jak ty m?wi?e? to jest

DB3: Bad argument @ 'getVehicleOccupant' [Expected vehicle at argument 1, got boolean]

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-06, 15:57


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

U?yj tego kodu, getPedOccupiedVehicle dzia?a kiedy gracz ju? jest za kierownic?, isPedInVehicle nawet kiedy ju? wsiada co powoduje p??niejsze b??dy.

addEventHandler("onClientRender"root, function()
    if getPedOccupiedVehicle(localPlayerthen
        if getVehicleOccupant(getPedOccupiedVehicle(localPlayer), 0) == localPlayer and vehicleSiren[getElementModel(getPedOccupiedVehicle(localPlayer))] then
            if getKeyState("j"then
                if activeSirens[getPedOccupiedVehicle(localPlayer)] then
                    setElementData(getPedOccupiedVehicle(localPlayer), "og.sirenspeed"true)
                end
            else
                setElementData(getPedOccupiedVehicle(localPlayer), "og.sirenspeed"false)
            end
        end 
    end
end)


Kod zosta? przetestowany, brak error?w.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-06, 21:08


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Dzi?ki faktycznie ,?e ja tego nie zauwa?y?em leci piwko do zamkni?cia.

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Tagi: syreny
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » syreny 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