Jump to content

[Help]Screen effects On Bike


Recommended Posts

Hi there, i have another "challenge" for you guys but this time not so hard as the last one.

 

I was thinking to make widescreen and/or shake effect work when the player is in a bike, like a nrg. This can be usefull for stunters (for example) or just good FX.

 

i made the next code but it just work on foot.

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------wait 0 0A95: enable_thread_saving :NONAME_60A2B:   widescreen_option_enabled 0A48: enable_menu_access_in_widescreen_mode 1 wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @NONAME_6 if and82D8:   not actor $PLAYER_ACTOR current_weapon == 46 0818:   actor $PLAYER_ACTOR in_air else_jump @NONAME_6 wait 0 if and82D8:   not actor $PLAYER_ACTOR current_weapon == 46 0818:   actor $PLAYER_ACTOR in_air else_jump @NONAME_6 0819: 1@ = actor $PLAYER_ACTOR distance_from_ground if  1@ > 7.0 else_jump @NONAME_6 02A3: enable_widescreen 1 wait 2000 if   not 1@ >= 2.0 02A3: enable_widescreen 0 jump @NONAME_6 

 

 

and the same for shake screen, drunk vision and other effects.

I leave it in your hands boys.

 

thanks in advance.

Edited by IGreyFox
Link to comment
https://gtaforums.com/topic/459642-helpscreen-effects-on-bike/
Share on other sites

 

Hi there, i have another "challenge" for you guys but this time not so hard as the last one.

 

I was thinking to make widescreen and/or shake effect work when the player is in a bike, like a nrg. This can be usefull for stunters (for example) or just good FX.

 

i made the next code but it just work on foot.

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------wait 0 0A95: enable_thread_saving :NONAME_60A2B:   widescreen_option_enabled 0A48: enable_menu_access_in_widescreen_mode 1 wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @NONAME_6 if and82D8:   not actor $PLAYER_ACTOR current_weapon == 46 0818:   actor $PLAYER_ACTOR in_air else_jump @NONAME_6 wait 0 if and82D8:   not actor $PLAYER_ACTOR current_weapon == 46 0818:   actor $PLAYER_ACTOR in_air else_jump @NONAME_6 0819: 1@ = actor $PLAYER_ACTOR distance_from_ground if  1@ > 7.0 else_jump @NONAME_6 02A3: enable_widescreen 1 wait 2000 if   not 1@ >= 2.0 02A3: enable_widescreen 0 jump @NONAME_6 

 

 

and the same for shake screen, drunk vision and other effects.

I leave it in your hands boys.

 

thanks in advance.

Delete 0A95, its not needed in a script like this.

Wait 0 must be right under the name tag.

Use 047A: actor $PLAYER_ACTOR driving_bike to see if the player is driving a bike.

No need to do if twice.

Use jf instead of else_jump, saves precious bytes tounge.gif

Lemme fix it up for ya!

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------0000: NOP:NONAME_10A2B:   widescreen_option_enabled 0A48: enable_menu_access_in_widescreen_mode 1 jump @NONAME_2:NONAME_2wait 0 if and  Player.Defined($PLAYER_CHAR)047A:   actor $PLAYER_ACTOR driving_bike0818:   actor $PLAYER_ACTOR in_air jf @NONAME_2 02A3: enable_widescreen 10003: shake_camera 5.0015D: set_gamespeed 0.5jump @NONAME_3:NONAME_3wait 0if or not Player.Defined($PLAYER_CHAR)847A:   not actor $PLAYER_ACTOR driving_bike8818:   not actor $PLAYER_ACTOR in_air jf @NONAME_302A3: enable_widescreen 00003: shake_camera 0.0015D: set_gamespeed 1.0jump @NONAME_2

 

 

There ya go! Along with slow mo tounge.gif Tell me how it works ^^

Edited by Anurag_Anmol

0A2B is conditional opcode, can be used only in if's.

Also some jumps are useless.

 

 

if 1@ > 7.0 else_jump @NONAME_6 02A3: enable_widescreen 1 wait 2000 if  not 1@ >= 2.0 02A3: enable_widescreen 0 jump @NONAME_6

 

 

That won't work.

 

Fixed code a bit, kept low-level style:

 

 

{$CLEO}0000: SCRIPT:NONAME_2wait 0 if  Player.Defined($PLAYER_CHAR)else_jump @NONAME_2 if and82D8:   not actor $PLAYER_ACTOR current_weapon == 46 047A:   actor $PLAYER_ACTOR driving_bike 0818:   actor $PLAYER_ACTOR in_air else_jump @NONAME_2 03C0: 0@ = actor $PLAYER_ACTOR car if01F3:   car 0@ in_air else_jump @NONAME_2 0819: 1@ = actor $PLAYER_ACTOR distance_from_ground if 1@ > 7.0 else_jump @NONAME_2 02A3: enable_widescreen 1 0A48: enable_menu_access_in_widescreen_mode 1 32@ = 0:NONAME_LOOPwait 0if   32@ > 2000        // Replaced wait 2000else_jump @NONAME_LOOP0819: 1@ = actor $PLAYER_ACTOR distance_from_ground if  not 1@ >= 2.0 else_jump @NONAME_LOOP02A3: enable_widescreen 0 0A48: enable_menu_access_in_widescreen_mode 0jump @NONAME_2

 

Here, Slow motion and camera shake doesn't work in SA-MP. This makes an explosion, slow mo, camera shake and widescreen (I don't have a widescreen monitor so it's not working for me). I tried to make multiple explosions in air with the code of NONAME_2 but it didn't work though.

 

 

{$CLEO .cs}//-------------MAIN---------------0000: NOP:NONAME_1wait 0if047A:   actor $PLAYER_ACTOR driving_bikejf @NONAME_103C0: 0@ = actor $PLAYER_ACTOR car0819: 1@ = actor $PLAYER_ACTOR distance_from_groundif and Player.Defined($PLAYER_CHAR)047A:   actor $PLAYER_ACTOR driving_bike01F3:   car 0@ in_air1@ >= 5.0 jf @NONAME_1015D: set_gamespeed 0.504C4: store_coords_to 2@ 3@ 4@ from_actor $PLAYER_ACTOR with_offset 0.0 -10.0 0.0 02A3: enable_widescreen 1020C: create_explosion_with_radius 0 at 2@ 3@ 4@0003: shake_camera 5032@ = 0:NONAME_2wait 0if32@ == 125jf @NONAME_332@ = 004C4: store_coords_to 2@ 3@ 4@ from_actor $PLAYER_ACTOR with_offset 0.0 -10.0 0.0 020C: create_explosion_with_radius 0 at 2@ 3@ 4@0003: shake_camera 50:NONAME_3if ornot Player.Defined($PLAYER_CHAR)847A:   not actor $PLAYER_ACTOR driving_bike81F3:   not car 0@ in_air 1@ <= 3.0jf @NONAME_202A3: enable_widescreen 0015D: set_gamespeed 1.0jump @NONAME_1

 

wathever, im not actually doing this on sa-mp ._. i test it in single player, anyway explosions are possible in samp, i remember myself playing samp with the super cj mod, that mod makes explosions everywhere, eventually, i kill a lot of people in smp with that, up to when i was noticed if that's hack lol

 

i dont know why shadescreen dont work on a bike.... i dont trust in the player_on_bike line

tanks anyway you show me a lot of usefull stuff and corrections Lolz, a big hug to everyone gous see ya!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.