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

Wysłany: 2017-07-18, 16:07


Hiroszekk







Wiek: 24
Na forum: 3312 dni
Posty: 113
Nick w MP: Hiroszek

Piwa: 845

Respekt: -84,3

Ostrzeżeń: 20%
Witam ,mam taki problem z GodMode pojazd?w na DAYZ:

cuboid createColCuboid 1111.151270.749.8035.256328)
ZL_TIMER = { }
ZL_NAME "DayZBoyZ"

function target(elementdim)
    if dim == true then
        setTimer(target230001elementdim)
        outputChatBox("Masz 3 sekund na opuszczenie tego terenu!"element)
        outputChatBox("Ta Baza jest na Grupe: DayZBoyZ"element)
        local v getPedOccupiedVehicle localPlayer )
        setElementHealth v20000000 )
    end
end
addEventHandler("onColShapeHit"cuboidtarget)

addEventHandler("onColShapeLeave"cuboid, function(elementdim)
    local gracz = (getElementType(element) == "player" and element or getVehicleController(element))
    setElementHealth(v100)
    if isTimer(ZL_TIMER[element]) then killTimer(ZL_TIMER[element]) end
end)

function ZL_killIntruder(p)
    setElementData(p"blood", -18)
    setTimer(target21001ptrue)
end

function target2(elementdim)
    if isElementWithinColShape(elementcuboidthen    
        if getElementType(element) == "player" then
            gracz element
            if getElementData(gracz"gang") ~= ZL_NAME then
                ZL_TIMER[element] = setTimer(ZL_killIntruder1501gracz)
            end
        end
    end
end


Brama=createObject(108281128.59997558591345.522.10000038147000)
function OtworzBrame ()
moveObject Brama20001128.59997558591345.5)
end
addCommandHandler("123321123"OtworzBrame )

function ZamknijBrame ()
moveObject Brama20001128.59997558591345.522.10000038147 )
end
addCommandHandler("123321123"ZamknijBrame )


DB3:

Bad Argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1,got nil]



oraz

Bad Argument @ 'setElementHealth' [Expected element at argument 1, got boolean]

Daje piwo i repe

[ Dodano: 2017-07-18, 16:07 ]
Wersja RAWPASTE:

https://pastebin.com/zCUtShyK

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 16:36


Szydlo

Stance Works






Wiek: 25
Na forum: 3585 dni
Posty: 343
Nick w MP: Szydlo

Piwa: 4

Respekt: 105,3
Respekt: 105,3

Z tym "setElementHealth" maksymalnie jest chyba 200 a nie 200000000000000000

[ Dodano: 2017-07-18, 16:39 ]
I pojazdowi nie da si? chyba da? hp o ile si? nie myl?. Da si? go chyba jedynie naprawi? albo da? mu godmoda

[ Dodano: 2017-07-18, 16:41 ]
Tutaj kod z neta wzi?ty na szybko. (Na god mdoa dla pojazdu)


function vehicleGodMod(player) 
    if not (hasObjectPermissionTo(player,"general.adminpanel",false)) then 
    outputChatBox("You dont have permission for this command!",player,255) return end 
    if (isVehicleDamageProof(getPedOccupiedVehicle(player))) then 
    setVehicleDamageProof(getPedOccupiedVehicle(player),false) 
    outputChatBox("Vehicle god mode disabled",player,255) 
else 
    setVehicleDamageProof(getPedOccupiedVehicle(player),true) 
    outputChatBox("Vehicle god mode enabled",player,0,255) 
    end 
end 
addCommandHandler("vgod",vehicleGodModaddCommandHandler("vehiclegod",vehicleGodMod


[ Dodano: 2017-07-18, 16:42 ]
https://wiki.multitheftauto.com/wiki/SetVehicleDamageProof
Tutaj mo?esz ustawi? w?a?ciwie czy pojazdowi mo?na "zabra? hp".

Podpis
Aktualny najlepszy kontakt do mnie: Szydlo#8134 (Discord)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 16:55


Hiroszekk







Wiek: 24
Na forum: 3312 dni
Posty: 113
Nick w MP: Hiroszek

Piwa: 845

Respekt: -84,3

Ostrzeżeń: 20%
Podepniesz mi to pod ten skrypt :
https://pastebin.com/zCUtShyK
Bo pr?buje i ci?gle errory...
(Chodzi mi ,ze jak wjade w cuboida to mi ustawi goda na auto ,jak wyjade usunie.)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 17:03


Szydlo

Stance Works






Wiek: 25
Na forum: 3585 dni
Posty: 343
Nick w MP: Szydlo

Piwa: 4

Respekt: 105,3
Respekt: 105,3

Spr?buje.

[ Dodano: 2017-07-18, 17:06 ]
https://pastebin.com/zGGtxdkk
Nie wiem czy dzia?a robione na szybko.

Podpis
Aktualny najlepszy kontakt do mnie: Szydlo#8134 (Discord)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 17:17


Hiroszekk







Wiek: 24
Na forum: 3312 dni
Posty: 113
Nick w MP: Hiroszek

Piwa: 845

Respekt: -84,3

Ostrzeżeń: 20%
Bad argument @ 'setVehicleDamageProof' [Expected element at argument 1,got boolean]



Bad Argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1,got nil]



Takie b??dy w db3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 17:35


Szydlo

Stance Works






Wiek: 25
Na forum: 3585 dni
Posty: 343
Nick w MP: Szydlo

Piwa: 4

Respekt: 105,3
Respekt: 105,3

A tak?
https://pastebin.com/H6a7RPjU

[ Dodano: 2017-07-18, 17:35 ]
I opis mi co ten kod robi.

Podpis
Aktualny najlepszy kontakt do mnie: Szydlo#8134 (Discord)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 18:14


Szymczu

Programista bo tak






Wiek: 27
Na forum: 3434 dni
Posty: 194
Nick w MP: Szymczu

Piwa: 36

Respekt: 120
Respekt: 120

Mo?esz nada? hp pojazdowi. Tutaj masz warto?ci z wiki i opisy tych warto?ci.

650: white steam 0%, black smoke 0%
450: white steam 100%, black smoke 50%
250: white steam 0%, black smoke 100%
249: fire with big black smoke

"Bad Argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1,got nil] " - Ten b??d Ci si? pokazuje bo u?y?e? "localPlayer" po stronie serwera. Zamie? to na "thePlayer".

"Bad Argument @ 'setElementHealth' [Expected element at argument 1, got boolean] " - Ten b??d Ci sie pokazuje bo nie dostarczy?e? elementu w pierwszym parametrze. Jest tylko "v". Wy?ej chyba mia?a by? p?tla, kt?rej zabrak?o.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 19:26


Hiroszekk







Wiek: 24
Na forum: 3312 dni
Posty: 113
Nick w MP: Hiroszek

Piwa: 845

Respekt: -84,3

Ostrzeżeń: 20%
'end' expected (to close 'function' at line 5 ) near '<eof>'

Szyd?o taki b??d. Bawi?em si? tym end na lewo prawo i nadal ten sam b??d.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 19:28


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

function vehicleGodMod(player) 
    if not (hasObjectPermissionTo(player,"general.adminpanel",false)) then 
    outputChatBox("You dont have permission for this command!",player,255) return end 
    if (isVehicleDamageProof(getPedOccupiedVehicle(player))) then 
    setVehicleDamageProof(getPedOccupiedVehicle(player),false) 
    outputChatBox("Vehicle god mode disabled",player,255) 
else 
    setVehicleDamageProof(getPedOccupiedVehicle(player),true) 
    outputChatBox("Vehicle god mode enabled",player,0,255) 
    end 
end 
end
addCommandHandler("vgod",vehicleGodModaddCommandHandler("vehiclegod",vehicleGodMod


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 20:09


Hiroszekk







Wiek: 24
Na forum: 3312 dni
Posty: 113
Nick w MP: Hiroszek

Piwa: 845

Respekt: -84,3

Ostrzeżeń: 20%
Marcin ,mi chodzi oto ?e jak si? wjedzie do cuboida to wtedy daje goda dla auta ,jak si? wyjedzie zabiera.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-18, 20:16


Szydlo

Stance Works






Wiek: 25
Na forum: 3585 dni
Posty: 343
Nick w MP: Szydlo

Piwa: 4

Respekt: 105,3
Respekt: 105,3

Ale i tak Szymczu, wyja?ni? co i jak.

Podpis
Aktualny najlepszy kontakt do mnie: Szydlo#8134 (Discord)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-21, 21:16


Quin







Wiek: 25
Na forum: 4537 dni
Posty: 79

Piwa: 3

Respekt: 38

Siemka, tu masz gotowy kod:
To:
Kod:

function target(element, dim)
if dim == true then
setTimer(target2, 3000, 1, element, dim)
outputChatBox("Masz 3 sekund na opuszczenie tego terenu!", element)
outputChatBox("Ta Baza jest na Grupe: DayZBoyZ", element)
local v = getPedOccupiedVehicle ( localPlayer )
setElementHealth ( v, 20000000 )
end
end
addEventHandler("onColShapeHit", cuboid, target)

addEventHandler("onColShapeLeave", cuboid, function(element, dim)
local gracz = (getElementType(element) == "player" and element or getVehicleController(element))
setElementHealth(v, 100)
if isTimer(ZL_TIMER[element]) then killTimer(ZL_TIMER[element]) end
end)


Zamie? na:

Kod:

function target(element, dim)
if dim == true then
setTimer(target2, 5000, 1, element, dim)
if getElementData(element, "gang") ~= ZL_NAME then
outputChatBox("Masz 5 sekund na opuszczenie tego terenu!", element)
outputChatBox("You have 5 second to leave this area!", element)
else
local vehicle = getPedOccupiedVehicle (element)
setVehicleDamageProof(vehicle, true)
fixVehicle(vehicle)
end
end
end
--end
addEventHandler("onColShapeHit", cuboid, target)

addEventHandler("onColShapeLeave", cuboid, function(element, dim)
local gracz = (getElementType(element) == "player" and element or getVehicleController(element))
local vehicle = getPedOccupiedVehicle (element)
setVehicleDamageProof( vehicle, false)
--setVehicleDamageProof( element, false)
if isTimer(ZL_TIMER[element]) then killTimer(ZL_TIMER[element]) end
end)


Powinno dzia?a? :)

Postaw piwo autorowi tego posta
 

 
Tagi: godmode :: dayz
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » GodMode DayZ Odpowiedz do tematu

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