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

Wysłany: 2014-06-12, 21:33


RezoT







Wiek: 30
Na forum: 4416 dni
Posty: 126
Nick w MP: RezoT

Piwa: 306

Respekt: 51

Ostrzeżeń: 40%
Witam.
Mam taki kodzik mianowicie on dzia?? lecz jest 1 problem:
Jak wchodze kamera sie wylacza wciskam guzik to wylacza lecz jak spowrotem wchodze to juz nie wlacza wie ktos czemu? jak tak to pomoze ?

Kod:

local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil


local function camRender ()
local x1, y1, z1 = getElementPosition ( sm.object1 )
local x2, y2, z2 = getElementPosition ( sm.object2 )
setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
end

function smoothMoveCameraa ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
if(sm.moov == 1) then return false end
sm.object1 = createObject ( 1337, x1, y1, z1 )
sm.object2 = createObject ( 1337, x1t, y1t, z1t )
setElementAlpha ( sm.object1, 0 )
setElementAlpha ( sm.object2, 0 )
setObjectScale(sm.object1, 0.01)
setObjectScale(sm.object2, 0.01)
moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )

addEventHandler ( "onClientPreRender", getRootElement(), camRender )
sm.moov = 1
setTimer ( removeCamHandler, time, 1 )
setTimer ( destroyElement, time, 1, sm.object1 )
setTimer ( destroyElement, time, 1, sm.object2 )
return true
end

local function removeCamHandler ()
if(sm.moov == 1) then
sm.moov = 0
removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
end
end

addEventHandler ("onClientMarkerHit", okno,
function (hitElement)
if hitElement == getLocalPlayer() then
smoothMoveCameraa( 2150.2204589844, -1125.6097412109, 32.075695037842, 2131.2121582031, -1151.0263671875, 24.085910797119, 2117.2219238281, -1119.1082763672, 33.198322296143, 2131.2121582031, -1151.0263671875, 24.085910797119, 10000 )
setTimer ( function()
addEventHandler ("onClientRender", root, salongui)
guiSetVisible (B_bkup, true)
guiSetVisible (B_bwyjsice, true)
guiSetVisible (autor, true)
guiSetVisible (G_Auta, true)
showCursor (true)
end, 10000, 1 )
end
end
)

addEventHandler ("onClientGUIClick", B_bwyjsice,
function()
guiSetVisible (B_bkup, false)
guiSetVisible (B_bwyjsice, false)
guiSetVisible (autor, false)
guiSetVisible (G_Auta, false)
showCursor (false)
removeEventHandler ("onClientRender", root, salongui)
setCameraTarget(localPlayer)
end
)
[/code]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-19, 09:56


Vini

Piszący...






Wiek: 27
Na forum: 4556 dni
Posty: 23
Nick w MP: Vini

Piwa: 2

Respekt: 50

Opisz to jako? dok?adniej, bo np. ja nic z tego nie zrozumia?em

Podpis
Lubię pomagać
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-19, 10:23


RezoT







Wiek: 30
Na forum: 4416 dni
Posty: 126
Nick w MP: RezoT

Piwa: 306

Respekt: 51

Ostrzeżeń: 40%
wchodzisz w marker kamera dziala zaczyna sie krecic itp klikasz w button to normalnie sie wylacza, lecz jak wchodzisz 2 raz w marker to sie nie wlacza.

Podpis
:) :)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-19, 13:25


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

B??dy db3 jakie? ?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: smoothmovecamera
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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