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: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

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

function barierka (thePlayercommand,objectModel)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("poli")) then 
    createObject (2000)
    local x,y,getElementPosition(thePlayer) -- pobierz pozycjgracza
    x -- 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: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Polecam:
local barierki = {}

function Barierka(thePlayer)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("poli")) then 
local xygetElementPosition(player)
local obiekt createObject(ID Barierkixy0.5)
table.insert(barierkiobiekt)
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(vthen
            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: 3810 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: 4334 dni
Posty: 217
Nick w MP: Serek.

Piwa: 374

Respekt: 70


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

function barierka (thePlayercmd)
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: 3810 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: 4334 dni
Posty: 217
Nick w MP: Serek.

Piwa: 374

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: 3810 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