Coding

 Reply to this postStart new topic

Break poles/fences

chaterbox0
post May 5 2013, 04:25 AM
Post #1


The New Guy!

Posts: 4
Joined: 25-April 13



Looking for an opcode to break poles/fences and some instruction on implementation...
Go to the top of the page
 
+Quote Post
Deji
post May 7 2013, 09:16 AM
Post #2


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Have you created these objects? Or have stored a handle for one? If so the regular break object command should work. If not, you could try creating a tiny explosion near it instead... enough to break it and not damaging nearby entities.


--------------------
Go to the top of the page
 
+Quote Post
chaterbox0
post May 10 2013, 12:43 AM
Post #3


The New Guy!

Posts: 4
Joined: 25-April 13



I have not created these objects, I do know of the break opcode though. But I guess what I really need is something to detect the nearest pole/fence... Any ideas?
Go to the top of the page
 
+Quote Post
liamnrory
post Jun 8 2013, 02:07 PM
Post #4


The New Guy!

Posts: 2
Joined: 8-June 13



QUOTE (chaterbox0 @ May 5 2013, 04:25 AM) *
Looking for an opcode to break poles/fences and some instruction on implementation...


What codes should I try?


--------------------
"Life is simple, it's just not easy." choosehottubsdirect
Go to the top of the page
 
+Quote Post
xzytro
post Jun 9 2013, 10:13 AM
Post #5


The New Guy!

Posts: 2
Joined: 9-June 13



This works in single player, makes the street poles invisible so that you can pass thru. However not in samp. You should find a way to make it work in samp.


CODE
// 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---------------
thread 'GHOSTPOLES'
0662: NOP "XZYTRO SAYS HI"

:GHOSTPOLES_01
wait 0
if
0ADC: test_cheat "NOPOLES"
else_jump @GHOSTPOLES_01
0ACD: show_text_highpriority "~W~STREET POLES ARE ~G~GHOST" time 1500
jump @GHOSTPOLES_02

:GHOSTPOLES_02
wait 0
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1215 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1223 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1226 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1231 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1232 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1283 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1284 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1290 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1294 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1295 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1296 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1297 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1298 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1306 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1307 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1308 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1312 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1315 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1350 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1540 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 1568 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3459 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3460 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3463 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3472 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3513 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3516 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3754 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3757 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3853 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3854 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 3875 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 4518 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 6422 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 6524 collision_detection 0
088D: set_objects_in_sphere 1@ 2@ 3@ radius 10.0 with_model 16101 collision_detection 0
if
0ADC: test_cheat "NOPOLES"
else_jump @GHOSTPOLES_02
0ACD: show_text_highpriority "~W~STREET POLES ARE ~B~BACK TO NORMAL" time 1500
jump @GHOSTPOLES_01



Maybe you can do what you want by using one of the opcodes below :
CODE
0188: 123@(214@,5i) = create_marker_above_object 109@(214@,5i)
01BB: store_object 0@ position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3
0400: store_coords_to 20@ 21@ 22@ from_object 9@ with_offset 17@ 18@ 19@
01BC: put_object 0@ at $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3
03CA:   object $2727 exists
04E6:   object 0@ near_point 1@ 2@ 3@ radius 0.1 0.1 0.1 flag 0
0566: link_object $2703 to_interior 1
05A7: set_object 82@ velocity_in_direction_X 253@ direction_Y 254@ direction_Z 0.0
0750: set_object $GIRLDOORS[6] visibility 0
0984: 15@ = object 9@ model
09A2: destroy_object_with_fade 17@
09CC:   object 0@ model_is #CJ_COIN_OP_2
0AE3: $object = random_object_near_point 0@ 1@ 2@ in_radius 10.0 find_next 1 //IF and SET
8474:   not actor $PLAYER_ACTOR near_object_in_cube 51@ radius 5.0 5.0 4.0 flag 0


I believe you will manage to do it on your own by using the opcodes above. Good luck.
Go to the top of the page
 
+Quote Post
baileychalse
post Oct 13 2013, 12:43 AM
Post #6


The New Guy!

Posts: 2
Joined: 8-October 13



QUOTE (Deji @ May 7 2013, 09:16 AM) *
Have you created these objects? Or have stored a handle for one? If so the regular break object command should work. If not, you could try creating a tiny explosion near it instead... enough to break it and not damaging nearby entities.


I think that is the best and easiest way to go for.


--------------------
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

6 User(s) are reading this topic (6 Guests and 0 Anonymous Users)
0 Members: