Wysłany: 2017-12-07, 17:13
lukas60055
Wiek: 25 Na forum: 3917 dni Posty: 53
Nick w MP: Lukasino
Czesc ot?? mam sobie taki skrypt
function freezpoj ( element , hitElement )
if getElementType ( element ) == "player" and getElementType ( hitElement ) == "vehicle" then
if not getPedOccupiedVehicle ( element ) then
setElementFrozen ( hitElement , true )
end
end
end
addEventHandler ( "onColShapeHit" , cuboid , freezpoj )
Chodzi w tym skrypcie o to ze jak gracz wyjdzie z pojazdu to pojazd zostanie zamro?one.
I teraz mam taki b??d:
WARNING: ads\xx.lua:34: Bad argument @ 'getElementType' [Expected element at argument 1, got boolean]
Prosi?bym o pomoc. Stawiam and
Wysłany: 2017-12-07, 17:38
mistereq
Wiek: 22 Na forum: 3386 dni Posty: 28
Nick w MP: MisterPL/Mistereq
Piwa : 288
Kod: function freezpoj(veh,seat,jacker)
if isElementWithinColShape(veh,cuboid) then
setElementFrozen(veh, true)
end
end
addEventHandler("onPlayerVehicleExit", root, freezpoj)
powinno dzialac
edit: a jesli chcesz miec ten kod co masz to prosze: Kod:
function freezpoj(element,hitElement)
if getElementType(element) == "vehicle" then
if not getVehicleOccupant(element,0) then
setElementFrozen(element, true)
end
end
end
addEventHandler("onColShapeHit", cuboid, freezpoj)
Ostatnio zmieniony przez mistereq 2017-12-07, 17:42, w całości zmieniany 2 razy
Więcej szczegółów
Wystawiono 1 piw(a):lukas60055
Wysłany: 2017-12-07, 17:40
lukas60055
Wiek: 25 Na forum: 3917 dni Posty: 53
Nick w MP: Lukasino
"mistereq" napisał/a : Kod: function freezpoj(veh,seat,jacker)
if isElementWithinColShape(veh,cuboid) then
setElementFrozen(veh, true)
end
end
addEventHandler("onPlayerVehicleExit", root, freezpoj)
powinno dzialac
Wiem, my?la?em ?eby tak zrobi? ale jednak chcia?bym pozosta? przy
addEventHandler ( "onColShapeHit" , cuboid , freezpoj )
Ale dzi?ki za odpowiedz
[ Dodano : 2017-12-07, 19:52 ]
"mistereq" napisał/a :
edit: a jesli chcesz miec ten kod co masz to prosze: Kod:
function freezpoj(element,hitElement)
if getElementType(element) == "vehicle" then
if not getVehicleOccupant(element,0) then
setElementFrozen(element, true)
end
end
end
addEventHandler("onColShapeHit", cuboid, freezpoj)
Niestety dalej nie dzia?a. Probowa?em co? tam zmienia? i dalej ten b??d z argumentem.
[ Dodano : 2017-12-07, 20:04 ]
Dobra poradzi?em sobie mozna lock.
Tagi: frozen :: col
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: