Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: pacholki
1. pacholki
Jak zrobi? by stawia? pacho?ki mog?y tylko frakcje a gracze nie i ?eby usuwa?y sie tylko pacholki kt?re sam postawi?em a nie wszystkich


pacholki 
= {} 

function 
createPacholek(player
local frakcje=getElementData(player'Frakcja' )
local xygetElementPosition(player
r1r2r3 getElementRotation(player)
local obiekt createObject 1238xyz-0.7
setElementRotation obiektr1r2r3)
setElementFrozen(obiekttrue)
table.insert(pacholkiobiekt
triggerClientEvent("rozwalanie",player,obiekt)
setElementCollisionsEnabled (obiekttrue)
end 
addCommandHandler
("ustawpacholek"createPacholek)

function 
destroyPacholki(player)
local frakcje=getElementData(player'Frakcja' )
for 
i,v in pairs(pacholki) do 
if 
isElement(vthen 
destroyElement
(v
end 
end 
pacholki 
= {} 
end 
addCommandHandler 
"usunpacholek"destroyPacholki)
2. Pacholki na ACL
Witam, ot?? przerabiam skrypt na pacholki aby byl pod acl. Wszystko ladnie pieknie, pacholki sie tworza sa na acl, tylko usunac sie juz nieda

Podcczas wpisania komendy na usuniecie

DB3:
ERROR:pacholki/pacholek.lua::12: attempt to contacenate local 'accName' (a boleean value)

local pacholki = {}

function 
createPacholek(player)
local xygetElementPosition(player)
local obiekt createObject(1238xy0.5)
table.insert(pacholkiobiekt)
end
addCommandHandler
("pacholek"createPacholek)

function 
destroyPacholki(player)
    
local accName getAccountName getPlayerAccount thePlayer ) )
    if 
isObjectInACLGroup ("user."..accNameaclGetGroup "PSP" ) ) then
        
elseif isObjectInACLGroup ("user."..accNameaclGetGroup "OSP" ) ) then
      
for i,v in pairs(pacholki) do
            if 
isElement(vthen
            destroyElement
(v)
            
end
      end
  end
pacholki 
= {}
end
addCommandHandler
("usunpacholek"destroyPacholki)