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: attachelement
1. attachElement
Czesc, jak zrobic zeby przedmiot by? x+2 od pojazdu a nie od gracza ?


function attach(source,commandName)
        
local x,y,getElementPosition(source)
        
local r1,r2,r3 getElementRotation(source)
      
local pojazd createVehicle(411 ,x+2yzr1r2r3
      
local przedmiot createObject(1222,x+2yz)
      
attachElements (pojazdprzedmiot)
end
addCommandHandler 
("test"attach)
2. attachElement
B??d w db3:
WARNING: p_policjaGUIscript.lua:6: Bad arguments @ 'attachElements' [Expected element at argument 2, got string 'Cholewka']

Kod:

wszyscyMarker 
createMarker(-2098.6425855.9877235.32031"cylinder"100255)

addEventHandler("onResourceStart"getRootElement( ), function()
for 
k,v in ipairs getElementsByType "player" )) do
    
attachElements(wszyscyMarkergetPlayerName), 00)
end
end
)
3. AttachElement
Witam mam taki kodzik - Element tworzy si? na aucie lecz auto tak jakby si? freezuje co jeszcze musze doda? aby auto mog?o jecha? z tym elementem ?

Kod:

local vehicle = getPedOccupiedVehicle(getLocalPlayer())
local x, y, z = getElementPosition ( vehicle )
local theObject = createObject ( 1454, x + 2, y + 2, z, 0, 0, 0, true )
attachElements ( vehicle, theObject, 0, 0, 0 )