Página 1 de 1

Open Doors (Abrir portas do carro)

Enviado: 30 Abr 2018, 17:57
por Israel
Um mod simples que eu fiz quando tava começando a aprender a criar scripts cleo.
Tem a finalidade de abrir as portas, porta-malas e capô dos carros apenas segurando a tecla M e pressionando as teclas de 1 a 6 do teclado numérico.
Imagem

DOWNLOAD
SourceAbrir

Código: Selecionar tudo

{$Cleo}
0000:

while true
    wait 0        
    for 8@ = 97 to 102
        if and
            Actor.Driving($Player_Actor)
            0AB0:   key_pressed 77
            0AB0:   key_pressed 8@
        jf continue
        0@ = Actor.CurrentCar($Player_Actor)
        
        if 8@ <= 100
        then 0A8F: 1@ = 8@ - 95
        else 0A8F: 1@ = 8@ - 101
        end
        
        if 2@(1@,1i) == 0.0
        then
            while 2@(1@,1i) < 1.0
                wait 0
                0079: 2@(1@,1i) += frame_delta_time * 0.05
                if 2@(1@,1i) > 1.0
                then 2@(1@,1i) = 1.0
                end
                08A6: set_car 0@ door 1@ rotation_to 2@(1@,1i)
            end
        else
            while 2@(1@,1i) > 0.0
                wait 0
                007F: 2@(1@,1i) -= frame_delta_time * 0.05
                if 2@(1@,1i) < 0.0
                then 2@(1@,1i) = 0.0
                end
                08A6: set_car 0@ door 1@ rotation_to 2@(1@,1i)    
            end
        end           
    end                    
end

Open Doors (Abrir portas do carro)

Enviado: 06 Mai 2018, 02:10
por TS_999
👌 👍 Awesome dude.

Re: Open Doors (Abrir portas do carro)

Enviado: 27 Out 2018, 03:58
por Junior_Djjr
Fiz melhorias (inclusive corrigido um potencial crash)
http://www.mixmods.com.br/2018/10/open- ... carro.html
Uma coisa que você devia ter feito é configurar as teclas conforme a posição da porta, fica muitíssimo melhor.

Re: Open Doors (Abrir portas do carro)

Enviado: 23 Jan 2019, 12:55
por Israel
TS_999 escreveu:
06 Mai 2018, 02:10
👌 👍 Awesome dude.
Thx.
Junior_Djjr escreveu:
27 Out 2018, 03:58
Fiz melhorias (inclusive corrigido um potencial crash)
http://www.mixmods.com.br/2018/10/open- ... carro.html
Uma coisa que você devia ter feito é configurar as teclas conforme a posição da porta, fica muitíssimo melhor.
:daora:
Só vi essa mensagem hoje. ​​​​​​