Jump to content

Opcodes heeeeeeelp!


Recommended Posts

hello there...

well .. where i can find explicit info about San Andreas opcodes?

i mean opcode + "human" description

if not.. could you tell me how can I use 06BC correctly ?

please help...thanks :hi:


im not very sure but.... http://www.gtaforums.com/index.php?showtopic=222397 and http://www.gtaforums.com/index.php?showtopic=194990 :lolbounce:

and others on google just type San Andreas opcodes simple :clapping:

if you dont mind can you answear me on the topic Traffic Help ? (that i cant find on google)


Edited by cr4k3r
Link to comment
Share on other sites

There are no simple answers for opcodes. The quickest way to see how an opcode works is to search the original main.scm. This opcode is first used in the drugs mission and later on some other missions.

04C4: store_coords_to $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD from_actor $PLAYER_ACTOR with_offset $TEMPVAR_FLOAT_1 -10.0 $TEMPVAR_FLOAT_3 
06BC: create_M4_shoot_from 1269.668 -778.8566 94.9557 target $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD energy 0

The code above is from the invasion of MD's mansion. 04C4 is used to get the player's position. Then the player's position is fed into 06BC to create M4 gunfire at the player's position from the X Y Z (1269.668 -778.8566 94.9557) position with an energy of 0. I can only guess that raising the energy will make the gun fire more intense. The use of such an opcode could be used for making tank gun turrets or gun fire from unseen attackers.

However I would use this code to make an actor fire an M4 at the player:

41@ = Actor.Create(Gang10, #CWFYHB, -1016.771, -2626.34, 96.769)
01B2: give_actor 41@ weapon 31 ammo 99999
Actor.WeaponAccuracy(41@) = 70 //This number gives your 70% chance of hitting.
//This will define the actors actions you can assign up to 8 actions per pack
0615: define_AS_pack_begin 1@ 
0638: AS_actor -1 stay_put 1 
07A5: AS_actor -1 attack_actor $PLAYER_ACTOR 1500 ms 
0638: AS_actor -1 stay_put 0 
0605: actor -1 perform_animation_sequence "GUN_STAND" IFP_file "PED" 8.0 loop 0 1 1 0 time 1500 
0643: set_AS_pack 1@ loop 1 
0616: define_AS_pack_end 1@ 
0618: assign_actor 41@ to_AS_pack 1@ 
061B: remove_references_to_AS_pack 1@

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...