Quantcast

Jump to content

» «
Photo

[HELP] Cleo mod

Best Answer Sanmodder, 21 March 2018 - 07:00 PM

add this it checks if the player shoots from ak 47

Actor.Animation($PLAYER_ACTOR) == "RIFLE_FIRE"

Go to the full post


6 replies to this topic
Magnun
  • Magnun

    Player Hater

  • Members
  • Joined: 21 Mar 2018
  • Brazil

#1

Posted 21 March 2018 - 04:28 PM Edited by Magnun, 21 March 2018 - 04:44 PM.

Hi, i'm editing a script  code like iron sight, but i need when shot it simulate a recoil.

WellmadeUnevenDingo-max-1mb.gif

 

{$CLEO .cs}


//-------------MAIN---------------
thread 'RPGS' 
wait 10 
0A95: enable_thread_saving 
wait 100 


:RPGS_21
wait 10 
if 
   Player.Defined($PLAYER_CHAR)
jf @RPGS_21 
if 
02D8:   actor $PLAYER_ACTOR current_weapon == 30 
jf @RPGS_21 
if and
8965:   not actor $PLAYER_ACTOR swimming 
09E7:   player $PLAYER_CHAR not_frozen 
00E1:   player 0 pressed_key 6 
jf @RPGS_21 
0390: load_txd_dictionary "ISak" 
038F: load_texture "Scope" as 1 // Load dictionary with 0390 first 
03E3: set_texture_to_be_drawn_antialiased 1
038D: draw_texture 1 position 330.0 190.0 size 310.0 550.0 RGBA 255 255 255 255
:RPGS_140
wait 1 
if 
00E1:   player 0 pressed_key 6 
jf @RPGS_168 
jump @RPGS_140 


:RPGS_168
wait 1 
03F0: enable_text_draw 0 
wait 10 
0391: release_textures 
wait 30 
jump @RPGS_21 

 


Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#2

Posted 21 March 2018 - 05:06 PM Edited by Sanmodder, 21 March 2018 - 05:09 PM.

you still need to check if you have an exact path for the texture
 

{$CLEO .cs}

//-------------MAIN---------------
thread 'RPGS'
 
0390: load_txd_dictionary "ISak" 
038F: load_texture "Scope" as 1 // Load dictionary with 0390 first 

while true
    repeat
    wait 0 
    until if Player.Defined(0)
    if 02D8:   actor $PLAYER_ACTOR current_weapon == 30 
    then
        if and
            8965:   not actor $PLAYER_ACTOR swimming 
            09E7:   player $PLAYER_CHAR not_frozen 
            00E1:   player 0 pressed_key 6 
        then
            03F0: enable_text_draw 0 
            03E3: set_texture_to_be_drawn_antialiased 1
            038D: draw_texture 1 position 330.0 190.0 size 310.0 550.0 RGBA 255 255 255 255
        end
    end
end


Magnun
  • Magnun

    Player Hater

  • Members
  • Joined: 21 Mar 2018
  • Brazil

#3

Posted 21 March 2018 - 05:20 PM

 

you still need to check if you have an exact path for the texture
 

{$CLEO .cs}

//-------------MAIN---------------
thread 'RPGS'
 
0390: load_txd_dictionary "ISak" 
038F: load_texture "Scope" as 1 // Load dictionary with 0390 first 

while true
    repeat
    wait 0 
    until if Player.Defined(0)
    if 02D8:   actor $PLAYER_ACTOR current_weapon == 30 
    then
        if and
            8965:   not actor $PLAYER_ACTOR swimming 
            09E7:   player $PLAYER_CHAR not_frozen 
            00E1:   player 0 pressed_key 6 
        then
            03F0: enable_text_draw 0 
            03E3: set_texture_to_be_drawn_antialiased 1
            038D: draw_texture 1 position 330.0 190.0 size 310.0 550.0 RGBA 255 255 255 255
        end
    end
end

 

Did not work, recoil.


Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#4

Posted 21 March 2018 - 05:30 PM

and how are you going to check the recoil you do
you know this opcode
02E0: actor $ PLAYER_ACTOR firing_weapon


Magnun
  • Magnun

    Player Hater

  • Members
  • Joined: 21 Mar 2018
  • Brazil

#5

Posted 21 March 2018 - 06:31 PM

and how are you going to check the recoil you do
you know this opcode
02E0: actor $ PLAYER_ACTOR firing_weapon

It work right now, but when i shot 1x without spread it does not work.

{$CLEO .cs}

//-------------MAIN---------------
thread 'RPGS'
 
0390: load_txd_dictionary "ISak" 
038F: load_texture "Scope" as 1 // Load dictionary with 0390 first 

while true
    repeat
    wait 0 
    until if Player.Defined(0)
    if 02D8:   actor $PLAYER_ACTOR current_weapon == 30 
    then
        if and
            8965:   not actor $PLAYER_ACTOR swimming 
            09E7:   player $PLAYER_CHAR not_frozen 
            00E1:   player 0 pressed_key 6 
        then
            03F0: enable_text_draw 0 
            03E3: set_texture_to_be_drawn_antialiased 1
            038D: draw_texture 1 position 330.0 190.0 size 310.0 550.0 RGBA 255 255 255 255
        end
    end
        if and  
            02D8:  actor $PLAYER_ACTOR current_weapon == 30 
            02E0:  actor $PLAYER_ACTOR firing_weapon
            8965:  not actor $PLAYER_ACTOR swimming 
            09E7:  player $PLAYER_CHAR not_frozen 
            00E1:  player 0 pressed_key 6 
        then       
            03F0: enable_text_draw 0 
            03E3: set_texture_to_be_drawn_antialiased 1
            038D: draw_texture 1 position 330.0 190.0 size 340.0 590.0 RGBA 255 255 255 255
    end
end

Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#6

Posted 21 March 2018 - 07:00 PM   Best Answer

add this it checks if the player shoots from ak 47

Actor.Animation($PLAYER_ACTOR) == "RIFLE_FIRE"

  • Magnun likes this

Magnun
  • Magnun

    Player Hater

  • Members
  • Joined: 21 Mar 2018
  • Brazil

#7

Posted 21 March 2018 - 07:24 PM

Yeh it works right now, ty!

  • Sanmodder likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users