Jump to content

Small question


Jack

Recommended Posts

I need opcode that is opossite then this one:

 

031E: vehicle 1@ hit_by_weapon 30

 

For example something like this:

 

...NOT  vehicle 1@ hit_by_weapon 30

 

I searched the opcode database and I didn't find it. Is this opcode exist?

Link to comment
Share on other sites

use some creativity

 

 

0224: set_car 1@ health_to 2000 :NOP_1wait 00227: 2@ = car 1@ health wait 0if2@ < 2000jf @NOP_1 

 

Link to comment
Share on other sites

Replace the very first 0 with 8 to negate opcode.

Link to comment
Share on other sites

i think 8 at the starting doesn't work with all opcodes, not for me at-lest,

like cleo key opcode,

 

@JACK JONES

bad_boy is right,

or

you can use this method also

 

 

:1wait 0if031E: vehicle 1@ hit_by_weapon 30jf @2jump @1:2

 

Link to comment
Share on other sites

I want to thank you all for the ideas. But when I would use this method:

 

:1  wait 0  if  031E: vehicle 1@ hit_by_weapon 30  jf @2  jump @1    :2

 

I wouldn't know how to proced. I mean, I want to force heli to explode when I hit him with the RPG projectile (no matter how many health heli had). If it's not true that the heli is hit with weapon 30 (RPG) then I don't know what to write in :2 label.

Link to comment
Share on other sites

To force the Heli to explode when you shoot it with an RPG you dont need to negate the opcode!

 

Here is the correct code:

 

 

:1wait 0if 031E:  car 1@ hit_by_weapon 35jf @1020B: explode_car 1@01C3: remove_references_to_car 1@end_thread

 

 

OR

 

get creative and simulate a crash landing:

 

 

:1wait 0if 031E:  car 1@ hit_by_weapon 35jf @10564: heli 1@ simulate_crash_landing wait 5000020B: explode_car 1@01C3: remove_references_to_car 1@end_thread

 

Edited by The_Sorrow
Link to comment
Share on other sites

i think 8 at the starting doesn't work with all opcodes

Yes it does.

Link to comment
Share on other sites

As Silent said

831E: not vehicle 1@ hit_by_weapon 30

Link to comment
Share on other sites

What exactly is the OP going to achieve with:

 

 

831E: not vehicle 1@ hit_by_weapon 30

 

 

Seriously?

Link to comment
Share on other sites

Hey guys, it's me again. I wanted to talk to you before but I cought a flue so I was in bad for almost the whole two days. I'm hoping you are still here because some of you said weapon 30, and others said weapon 35, so which is it? And I didn't have a chance to test all this ideas in my scrypt until now (because I was sick). It seems that non of this works in my scrypt which is very strange because all of this ideas look so logical. The chopper just don't want to explode when I hit him with the RPG. Here's the scrypt:

 

:H1  thread 'H1'   wait 250   Model.Load(#HUNTER)  Model.Load(#ARMY)  Model.Load(#M4)  Model.Load(#ROCKETLA)  038B: load_requested_models     :H1_36  wait 0   if and  Model.Available(#HUNTER)  Model.Available(#ARMY)  Model.Available(#M4)  Model.Available(#ROCKETLA)else_jump @H1_36   04C4: create_coordinate 13@ 14@ 15@ from_actor $PLAYER_ACTOR offset 0 100.0 50.0   1@ = Car.Create(#HUNTER, 13@, 14@, 15@)  Car.Health(1@) = 150000  0129: 3@ = create_actor 4 #ARMY in_car 1@ driverseat   Actor.Health(3@) = 10  9@ = Actor.Create(CivMale, #ARMY, 13@, 14@, 15@)  10@ = Actor.Create(CivMale, #ARMY, 13@, 14@, 15@)  02E2: set_actor 9@ weapon_accuracy_to 75   02E2: set_actor 10@ weapon_accuracy_to 75   0464: put_actor 9@ into_turret_on_car 1@ at_car_offset 0.8 0 0.5 position 3 angle 180.0 with_weapon 26   0464: put_actor 10@ into_turret_on_car 1@ at_car_offset -0.8 0 0.5 position 3 angle 180.0 with_weapon 26   01CA: actor 9@ kill_player $PLAYER_CHAR   01CA: actor 10@ kill_player $PLAYER_CHAR   Marker.TieToCar(4@, 1@, 4, 2)  Marker.SetColor(4@, 1)  Model.Destroy(#HUNTER)  Model.Destroy(#ARMY)  Model.Destroy(#M4)  Model.Destroy(#ROCKETLA)  gosub @H1_311     :H1_311  04C4: create_coordinate 13@ 14@ 15@ from_actor $PLAYER_ACTOR offset 0.0 40.0 20.9   04A2: heli 1@ fly_to 13@ 14@ 15@ speed 100   0170: 8@ = player $PLAYER_CHAR z_angle   8@ -= 180.0 // floating-point values   04D0: heli 1@ turn_to_angle 8@   if   8443:   not player $PLAYER_CHAR in_a_car   else_jump @H1_454   if   0449:   actor 3@ in_a_car   else_jump @H1_553   if   831E:   not vehicle 1@ hit_by_weapon 35   else_jump @H1_570   if      $307 == 1 // integer values   else_jump @H1_721   return   05DC: end_custom_thread :H1_454  wait 0   04C4: create_coordinate 13@ 14@ 15@ from_actor $PLAYER_ACTOR offset 0.0 -25.0 75.0   04A2: heli 1@ fly_to 13@ 14@ 15@ speed 100   04D1: reset_heli 1@ looking_angle  if      $307 == 1 // integer values   else_jump @H1_721   if   8443:   not player $PLAYER_CHAR in_a_car   else_jump @H1_454   wait 0   jump @H1_311     :H1_553  0564: set_vehicle 1@ helicopter_simulate_crash_landing   wait 4000   jump @H1_570     :H1_570  04C4: create_coordinate 5@ 6@ 7@ from_actor $PLAYER_ACTOR offset 0.0 40.0 0   02D4: car 1@ turn_off_engine   020B: explode_car 1@   Car.StorePos(1@, 5@, 6@, 7@)  020C: create_explosion_with_radius 2 at 5@ 6@ 7@   020C: create_explosion_with_radius 11 at 5@ 6@ 7@   020C: create_explosion_with_radius 1 at 5@ 6@ 7@   020C: create_explosion_with_radius 6 at 5@ 6@ 7@   039D: scatter_particles 17 0.8 0 0 0 11000 at 5@ 6@ 7@ 0.1 0.0 0.2   jump @H1_800     :H1_721  wait 0   if      $ONMISSION == 0 // integer values   else_jump @H1_311   04C4: create_coordinate 13@ 14@ 15@ from_actor $PLAYER_ACTOR offset 0.0 400.0 500.0   04A2: heli 1@ fly_to 13@ 14@ 15@ speed 100   wait 4000   jump @H1_800     :H1_800  Marker.Disable(4@)  Actor.DestroyInstantly(3@)  Actor.DestroyInstantly(9@)  Actor.DestroyInstantly(10@)  Car.Destroy(1@)

 

And I was having some serious problems with this opcode: "NOT player $PLAYER_CHAR in_a_car". I think I solve that problem but if you see some errors in scrypt related to this opcode please tell me about it. Thank you for your time.

Link to comment
Share on other sites

RPG works with 35,

press F12 while in SannyBuilder & goto SCM Documentation: GTA SA: Weapon numbers,

to see which integer is for which weapon,

 

put something after

 

Car.Destroy(1@)

 

like

 

05DC: end_custom_thread

 

if it is a cleo script

&

 

004E: end_thread 

 

if it is in Main.scm

 

otherwise game will crash after it,

Link to comment
Share on other sites

Actually I'm building a scrypt for Vice City and I found this text somewhere:

 

30 7  RocketLauncher   #rocketla  (returns nothing)  31 7  FlameThrower     #flame       32 7  M60              #M60         33 7  Minigun          #minigun     35 7  HeliCannon

 

And I tried with 30 and 35 and non of this is working.

Link to comment
Share on other sites

Do you mean Rocket launcher by RPG ?

its 's 30.

lots of problem in you script!

---------------------------------------------

 

04C4: create_coordinate 13@ 14@ 15@ from_actor $PLAYER_ACTOR offset 0 100.0 50.0  // 0.0 instead of 0$307 == 1       //what is this ???04A2: heli 1@ fly_to 13@ 14@ 15@ speed 100    // the speed is must be in float, like 100.004C4: create_coordinate 5@ 6@ 7@ from_actor $PLAYER_ACTOR offset 0.0 40.0 0   //here also 0.09@ = Actor.Create(CivMale, #ARMY, 13@, 14@, 15@)    //civmale ???? integer instead of it

 

---------------------------------------------

not crashing anymore!!

but chooper disapperr

i am making a new script for you

---------------------------------------------

something like this ???

 

// This file was decompiled using vicescm.ini published by GtaForums.com on 27.7.07{$VERSION 2.2.0000}{$CLEO .cs} thread 'Ashwin' Model.Load(#HUNTER)  Model.Load(#ARMY)   038B: load_requested_models     :0 wait 0   if and00E1:   key_pressed 0 18 Model.Available(#HUNTER)Model.Available(#ARMY)jf @004C4: create_coordinate 1@ 2@ 3@ from_actor $player_actor offset 0.0 50.2 50.0 00A5: 0@ = create_car 155 at 1@ 2@ 3@0224: set_car 0@ health_to 99999 04BA: set_car 0@ speed_instantly 0.0 0129: 4@ = create_actor 4 #ARMY in_car 0@ driverseat :1wait 004BA: set_car 0@ speed_instantly 0.0if or031E:   vehicle 0@ hit_by_weapon 30031E:   vehicle 0@ hit_by_weapon 26  jf @1   0564: set_vehicle 0@ helicopter_simulate_crash_landing wait 25000407: create_coordinate 1@ 2@ 3@ from_car 0@ 2.0 2.5 1.0           020C: create_explosion_with_radius 2 at 1@ 2@ 3@wait 50 0407: create_coordinate 1@ 2@ 3@ from_car 0@ -2.5 -2.0 0.0020C: create_explosion_with_radius 7 at 1@ 2@ 3@wait 1500407: create_coordinate 1@ 2@ 3@ from_car 0@ -2.5 -2.0 2.0020C: create_explosion_with_radius 6 at 1@ 2@ 3@wait 350            0407: create_coordinate 1@ 2@ 3@ from_car 0@ 2.0 2.5 1.0           020C: create_explosion_with_radius 2 at 1@ 2@ 3@wait 50 0407: create_coordinate 1@ 2@ 3@ from_car 0@ -2.5 -2.0 0.0020C: create_explosion_with_radius 7 at 1@ 2@ 3@wait 6500407: create_coordinate 1@ 2@ 3@ from_car 0@ -2.5 -2.0 2.0020C: create_explosion_with_radius 16 at 1@ 2@ 3@wait 5001C3: remove_references_to_car 0@ // Like turning a car into any random car jump @0  

 

Edited by Ashwin the new boy
Link to comment
Share on other sites

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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