Wysłany: 2015-04-28, 20:28
pawel998
Wiek: 35 Na forum: 4261 dni Posty: 29
Nick w MP: Piotrek101
Witam mam taki Kod :
barierki = {}
Kod: addCommandHandler ( "b", function(plr)
team = getPlayerTeam ( plr )
if getTeamName ( team ) ~= "Policja" then return end
x,y,z = getElementPosition ( plr )
r1,r2,r3 = getElementRotation ( plr )
barierka = createObject ( 1459, x, y, z, r1, r2, r3 )
table.insert ( barierki, barierka )
end)
addCommandHandler ( "busun", function(plr)
team = getPlayerTeam ( plr )
if getTeamName ( team ) ~= "Policja" then return end
for k,v in ipairs ( barierki ) do
destroyElement ( v )
end
end)
Chcem pod ACL
Wysłany: 2015-04-28, 22:10
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
Prosz? powinno dzia?a?
addCommandHandler ( "b" , function( plr )
local acc = getAccountName ( getPlayerAccount ( plr ) )
if isObjectInACLGroup ( "user." .. acc , aclGetGroup ( "Policja" ) ) then -- je ? eli kto ? jest w policji
x , y , z = getElementPosition ( plr )
r1 , r2 , r3 = getElementRotation ( plr )
barierka = createObject ( 1459 , x , y , z , r1 , r2 , r3 )
table . insert ( barierki , barierka )
end
end )
addCommandHandler ( "busun" , function( plr )
local acc = getAccountName ( getPlayerAccount ( plr ) )
if isObjectInACLGroup ( "user." .. acc , aclGetGroup ( "Policja" ) ) then -- je ? eli kto ? jest w policji
for k , v in ipairs ( barierki ) do
destroyElement ( v )
end
end
end )
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Tagi: create :: object
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: