Wysłany: 2017-11-01, 14:40
damixus54
Wiek: 29 Na forum: 3520 dni Posty: 3
Wysłany: 2017-11-01, 14:44
=DC=
Wiek: 35 Na forum: 3944 dni Posty: 223
Nick w MP: =DC=
Piwa : 72
5 linijka zmien na:
local posx, posy, posz = 0,0,5
oraz 28 linijka:
setElementPosition(element, posx,posy,posz)
Podpis
Witaj
[you]
, jeśli Ci pomogłem postaw mi lub Dzięki!
Wysłany: 2017-11-01, 15:00
Eitho
Wiek: 24 Na forum: 3489 dni Posty: 330
Nick w MP: Eitho
Piwa : 746
Albo tak
local baza = createColCuboid ( 1524.70 , 1577.20 , 9.2 , 25.39 , 28.2 , 11 )
ZL_TIMER = { }
ZL_NAME = "ADMINY"
local limit = 6
local pozycjatepania = { 0 , 0 , 5 }
function target ( element , dim )
if dim == true then
setTimer ( target2 , 3000 , 1 , element , dim )
outputChatBox ( "Masz 3 sekund na opuszczenie tego terenu!" , element )
end
end
addEventHandler ( "onColShapeHit" , baza , target )
addEventHandler ( "onColShapeLeave" , baza , function( element , dim )
local gracz = ( getElementType ( element ) == "player" and element or getVehicleController ( element ))
if isTimer ( ZL_TIMER [ element ]) then killTimer ( ZL_TIMER [ element ]) end
end )
function ZL_killIntruder ( p )
setElementData ( p , "blood" , - 20 )
setTimer ( target2 , 100 , 1 , p , true )
end
function godpojazd ( element )
if getElementType ( element ) == "vehicle" then
if getElementsWithinColShape ( baza , "vehicle" ) >= limit then
setElementPosition ( element , unpack ( pozycjatepania ))
outputChatBox ( "Maksymalnie " .. limit .. " pojazd?w!" , getVehicleOccupant ( element ), 255 , 0 , 0 )
else
setVehicleDamageProof ( element , true )
fixVehicle ( element )
end
end
end
addEventHandler ( "onColShapeHit" , baza , godpojazd )
function godpojazdusun ( element )
if getElementType ( element ) == "vehicle" then
setVehicleDamageProof ( element , false )
end
end
addEventHandler ( "onColShapeLeave" , baza , godpojazdusun )
function target2 ( element , dim )
if isElementWithinColShape ( element , baza ) then
if getElementType ( element ) == "player" then
gracz = element
if getElementData ( gracz , "gang" ) ~= ZL_NAME then
ZL_TIMER [ element ] = setTimer ( ZL_killIntruder , 150 , 1 , gracz )
end
end
end
end
brama_state = 0
brama_obiekt = createObject ( 16773 , 1524.4000244141 , 1591.1999511719 , 13.800000190735 , 0 , 0 , 90 )
addCommandHandler ( "123" , function ( p , c )
if brama_state == 0 then
moveObject ( brama_obiekt , 1000 , 1524.4000244141 , 1591.1999511719 , 13.800000190735 , 0 , 0 , 0 )
brama_state = 1
else
moveObject ( brama_obiekt , 1000 , 1524.4000244141 , 1591.1999511719 , 5 , 0 , 0 , 0 )
brama_state = 0
end
end )
Ps. =DC= ostatnio mia?e? racj? z tym znakiem wi?kszo?ci, ja mia?em jakie? za?mienie chyba XD
Więcej szczegółów
Wystawiono 1 piw(a):damixus54
Wysłany: 2017-11-01, 15:01
damixus54
Wiek: 29 Na forum: 3520 dni Posty: 3
Po zmianie pokazuje taki b??d :
ERROR: BramaKleszcze/bramaKleszcze.lua:27: attempt to compare number with table
27 linijka to if getElementsWithinColShape (baza, "element") > limit then
Wysłany: 2017-11-01, 15:02
=DC=
Wiek: 35 Na forum: 3944 dni Posty: 223
Nick w MP: =DC=
Piwa : 72
if #getElementsWithinColShape (baza, "element") >= limit then
Podpis
Witaj
[you]
, jeśli Ci pomogłem postaw mi lub Dzięki!
Więcej szczegółów
Wystawiono 1 piw(a):damixus54
Wysłany: 2017-11-01, 15:15
damixus54
Wiek: 29 Na forum: 3520 dni Posty: 3
Supeer Wszystko dzia?a. Naprawd? wielkie dzi?ki dla was panowie Macie
Tagi: skrypt :: nie :: działa :: całości
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: