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: usuwająca
1. Pętla usuwająca
Mam problem z systemem pacho?k?w, mam taki kod:


function najblizszadel( playerSource, commandName )
       
local najblizsze = 3
       local iddousuniecia 
= 9999
       x2
,y2,z2 = getElementPosition(playerSource)
       for 
k,v in ipairs ( getElementsByType ( "object" )) do
              if 
getElementModel(v) == 4032 then
                     x1
,y1,z1 = getElementPosition(v)
                     
odleglosc = getDistanceBetweenPoints3D(x1,y1,z1,x2,y2,z2)
                     if 
odleglosc < najblizsze then
                            iddousuniecia 
= v
                            najblizsze 
= odleglosc
                     end
              end
       end
       destroyElement
(iddousuniecia) -- ta linijka nie dziala
end
addCommandHandler 
( "usun", najblizszadel)


B??d:

Kod:


Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean]


:piwo: + R*