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

Wysłany: 2016-01-27, 16:16


Axmell

E-Commerce






Wiek: 24
Na forum: 3951 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Witam, chodzi mi o barierki na komende /barierka1 /usunbarierke1

function barierka (thePlayer, command,objectModel)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("poli")) then 
    createObject (2000)
    local x,y,z = getElementPosition(thePlayer) -- pobierz pozycj? gracza
    x = x + 5 -- dodaj 5 jednostek do pozycji
end
end
end
addCommandHandler("barierka1", barierka)

jak by ktos poprawi? i zostawi? puste pole na id barierki to by?bym wdzi?czny oraz stawie DUUU?E :piwo: :D

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-27, 16:24


marcin778

Krytyk serwerów MTA






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

Piwa: 4661

Respekt: 1436,8
Respekt: 1436,8

Polecam:
local barierki = {}

function Barierka(thePlayer)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("poli")) then 
local x, y, z = getElementPosition(player)
local obiekt = createObject(ID Barierki, x, y, z - 0.5)
table.insert(barierki, obiekt)
end
addCommandHandler("barierka", Barierka)

function destroyBar(thePlayer)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("poli")) then 
      for i,v in pairs(barierki) do
            if isElement(v) then
            destroyElement(v)
            end
      end
barierki = {}
end
addCommandHandler("usunbarierka", destroyBar)


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

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

 
Wysłany: 2016-01-27, 16:58


Axmell

E-Commerce






Wiek: 24
Na forum: 3951 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Nie dzia?a

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-27, 17:27


serek123

Lua, MySql, Sql






Wiek: 27
Na forum: 4475 dni
Posty: 217
Nick w MP: Serek.

Piwa: 375

Respekt: 70


function barierka (thePlayer, cmd)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("poli")) then 
    local x,y,z = getElementPosition(thePlayer)
    local rx,ry,rz = getElementRotation(thePlayer)
    Barierka = createObject (2000, x, y ,z, rx, ry, rz)
    outputChatBox("Stworzy?e? barierke", thePlayer)
end
end
addCommandHandler("b", barierka)

function barierka (thePlayer, cmd)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("poli")) then 
    destroyElement(Barierka)
    outputChatBox("Usune?e? barierke", thePlayer)
end
end
addCommandHandler("ub", barierka)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-27, 17:31


Axmell

E-Commerce






Wiek: 24
Na forum: 3951 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

serek123, Dzi?ki, leci :piwo:

[ Dodano: 2016-01-27, 17:36 ]
a zeby ograniczyc do 2?

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-27, 17:40


serek123

Lua, MySql, Sql






Wiek: 27
Na forum: 4475 dni
Posty: 217
Nick w MP: Serek.

Piwa: 375

Respekt: 70

?eby tylko 1 mo?na by?o postawi??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-27, 17:43


Axmell

E-Commerce






Wiek: 24
Na forum: 3951 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

2 jak sie da

[ Dodano: 2016-01-27, 17:45 ]
i ?eby byly niezniszczalne

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: barierki
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Barierki Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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