Wysłany: 2018-11-30, 00:59
Nelsonn
Wiek: 27 Na forum: 4949 dni Posty: 43
Nick w MP: Nelson
Piwa : 3
Witam, chcia?em rozdzielic pojazdy na 2 grupy.Pojazdy l?dowe i pojazdy wodne
i do ka?dej z tych grup osobny limit i osobna informacja na czacie. Pomo?e kto??
My?la?em o pogrupowaniu poprzez id ale nie wiem jak to zrobic.
local col = createColCuboid ( 1904.3916015625 , 676.16015625 , 10.8203125 , 48 , 56 , 17 ) --- x na wprost , y na lewo , z wysokosc
local zone = createRadarArea ( 1904.3916015625 , 676.16015625 , 220 , 220 , 0 , 0 , 255 , 20 )
setElementData ( zone , "zombieProof" , true )
function enterAdmin ( hitElement , matchingDimension )
if ( getElementType ( hitElement ) == "player" ) then
local accName = getAccountName ( getPlayerAccount ( hitElement ) )
if isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "TeddyBears" ) ) then
toggleControl ( hitElement , "fire" , true )
toggleControl ( hitElement , "aim_weapon" , true )
toggleControl ( hitElement , "vehicle_fire" , true )
else
outputChatBox ( "Nie mo?esz tutaj wej??!" , hitElement , 255 , 0 , 0 )
local hitElement = ( isPedInVehicle ( hitElement ) and getPedOccupiedVehicle ( hitElement ) or hitElement )
setElementPosition ( hitElement , 1989.205078125 , 702.9541015625 , 10.815298080444 )
end
end
end
addEventHandler ( "onColShapeHit" , col , enterAdmin )
function amountvehicle ( element )
local vehicleamount = getElementsWithinColShape ( source , "vehicle" )
if #vehicleamount >= 2 then
local veh = getPedOccupiedVehicle ( element )
setElementPosition ( veh , 1989.205078125 , 702.9541015625 , 10.815298080444 )
outputChatBox ( "Osi?gni?to maksimum pojazd?w!" , element )
end
end
addEventHandler ( "onColShapeHit" , col , amountvehicle )
Wysłany: 2018-11-30, 12:03
TeeNekk
Cienzaruwka :v
Wiek: 23 Na forum: 3210 dni Posty: 264
Nick w MP: TeeNekk.
Piwa : 919
po prostu, zr?b dwie tabele, z pojazdami l?dowymi, oraz ziemnymi, przy wej?ciu sprawdzaj kt?rego jest typu, po czym colshape, w kt?rym sprawdzasz ile pojazd?w tego typu jest w bazie.
Podpis
Pomogłem Ci
[you]
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Wysłany: 2018-11-30, 15:34
Nelsonn
Wiek: 27 Na forum: 4949 dni Posty: 43
Nick w MP: Nelson
Piwa : 3
Dobra mam porobione tabele, teraz jak to pod??czy??
local col = createColCuboid ( 1904.3916015625 , 676.16015625 , 10.8203125 , 48 , 56 , 17 ) --- x na wprost , y na lewo , z wysokosc
local zone = createRadarArea ( 1904.3916015625 , 676.16015625 , 220 , 220 , 0 , 0 , 255 , 20 )
setElementData ( zone , "zombieProof" , true )
function enterAdmin ( hitElement , matchingDimension )
if ( getElementType ( hitElement ) == "player" ) then
local accName = getAccountName ( getPlayerAccount ( hitElement ) )
if isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "TeddyBears" ) ) then
toggleControl ( hitElement , "fire" , true )
toggleControl ( hitElement , "aim_weapon" , true )
toggleControl ( hitElement , "vehicle_fire" , true )
else
outputChatBox ( "Nie mo?esz tutaj wej??!" , hitElement , 255 , 0 , 0 )
local hitElement = ( isPedInVehicle ( hitElement ) and getPedOccupiedVehicle ( hitElement ) or hitElement )
setElementPosition ( hitElement , 1989.205078125 , 702.9541015625 , 10.815298080444 )
end
end
end
addEventHandler ( "onColShapeHit" , col , enterAdmin )
moto = {
{ 461 },
{ 448 },
{ 468 },
{ 586 },
}
ziem = {
{ 559 },
{ 561 },
{ 477 },
{ 503 },
}
function amountvehicle ( element )
local vehicleamount = getElementsWithinColShape ( source , "vehicle" )
if #vehicleamount >= 2 then
local veh = getPedOccupiedVehicle ( element )
setElementPosition ( veh , 1989.205078125 , 702.9541015625 , 10.815298080444 )
outputChatBox ( "Osi?gni?to maksimum pojazd?w!" , element )
end
end
addEventHandler ( "onColShapeHit" , col , amountvehicle )
Wysłany: 2018-11-30, 16:04
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
Zamiast tabeli lepiej u?y?
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2018-11-30, 16:26
Nelsonn
Wiek: 27 Na forum: 4949 dni Posty: 43
Nick w MP: Nelson
Piwa : 3
Tak, tylko w tym wypadku lepiej i wygodniej jest chyba w formie tabel
Wysłany: 2018-11-30, 17:04
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
Kod leci od g?ry do do?u, wi?c je?li chcesz sprawdza? id pojazdu z tabeli z tym kt?ry wjecha? to tabele musisz da? nad zdarzenie wej?cia w colshape,a do sprawdzania musisz wykorzysta? instrukcje warunkow?
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2018-11-30, 17:10
Nelsonn
Wiek: 27 Na forum: 4949 dni Posty: 43
Nick w MP: Nelson
Piwa : 3
Mo?esz mi to pokaza??
[ Dodano : 2018-12-04, 16:18 ]
up
Tagi: cuboid
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: