Quantcast

Jump to content

» «
Photo

how to use opcode get random car retangle corner?

5 replies to this topic
Anthony ok
  • Anthony ok

    Player Hater

  • Members
  • Joined: 25 Jun 2012

#1

Posted 22 April 2013 - 12:44 PM

I want to use opcode
053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]
0327: $TEMPVAR_ACTOR_CAR = get_random_car_with_model -1 in_rectangle_cornerA $111 $112 cornerB $114 $115
i have try it but the car is not get defined sad.gif, the car is located in the top of player. So How to configuring the retangle corner A and B?
code:
CODE

{$CLEO .cs}
thread 'enter ufo'

:1
wait 0
if
0AB0:  key_pressed 85
jf @1
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 4.0 4.0 20.0
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -4.0 -4.0 -20.0
053E: [email protected] = get_random_car_with_model #SPARROW in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]
if
056E:   car [email protected] defined
jf @1
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0
06C1: create_searchlight [email protected] on_car [email protected] with_offset 0.0 0.0 -0.5 radius 5.0 target [email protected] [email protected] [email protected] radius 5.0
01B4: set_player $PLAYER_CHAR can_move 0
wait 1500
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 1.0
wait 500
072A: put_actor $PLAYER_ACTOR into_car [email protected] driverseat
06B2: destroy_searchlight [email protected]
06C1: create_searchlight [email protected] on_car [email protected] with_offset 0.0 0.0 -0.5 radius 4.0 target [email protected] [email protected] [email protected] radius 4.0
06B2: destroy_searchlight [email protected]
06C1: create_searchlight [email protected] on_car [email protected] with_offset 0.0 0.0 -0.5 radius 3.0 target [email protected] [email protected] [email protected] radius 3.0
06B2: destroy_searchlight [email protected]
06C1: create_searchlight [email protected] on_car [email protected] with_offset 0.0 0.0 -0.5 radius 2.0 target [email protected] [email protected] [email protected] radius 2.0
06B2: destroy_searchlight [email protected]
06C1: create_searchlight [email protected] on_car [email protected] with_offset 0.0 0.0 -0.5 radius 1.0 target [email protected] [email protected] [email protected] radius 1.0
06B2: destroy_searchlight [email protected]
wait 1000
01B4: set_player $PLAYER_CHAR can_move 1
jump @1

check please ....

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#2

Posted 23 April 2013 - 04:53 PM

The opcodes 053E and 09C0 only find cars which appears random in traffic or spawned by parked_car_generators,
but not these which has been created by script as long they didn't got 01C3: remove_references_to_car
and also not the car which is driven by Player_actor
CODE
{$CLEO .cs}
:Get_Random_Car_Test
thread 'RANDCAR'
//The opcodes 053E and 09C0 only find cars which appears random in traffic or spawned by parked_car_generators,
//but not these which has been created by script as long they didn't got 01C3: remove_references_to_car
//and also not the car which is driven by Player_actor

:RANDCAR_1
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @RANDCAR_1
if
0AB0:   key_pressed 8// ---- key  Backspace
jf @RANDCAR_1
04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset  10.0  -1.0  0.0
04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset -10.0  15.0  0.0
053E: [email protected] = get_random_car_with_model -1 in_area [email protected] [email protected] [email protected] [email protected]
//053E: [email protected] = get_random_car_with_model #TAXI in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]
//09C0: [email protected] = get_random_car_in_area [email protected] [email protected] [email protected] [email protected] 20.0 with_actors -1
wait  50
if
8039:   NOT   [email protected] ==  -1
jf @RANDCAR_1
00AD: set_car [email protected] max_speed_to  0.0
0186: [email protected] = create_marker_above_car [email protected]
0325: [email protected] = create_car [email protected] fire
wait 3000
0164: disable_marker [email protected]
02D1: remove_fire [email protected]
01C3: remove_references_to_car [email protected]
wait 1000
jump @RANDCAR_1


Cleo4 Opcode 0AE2 can find every car
CODE
{$CLEO .cs}
:Get_Random_Car_Test
thread 'RANDCAR'
//Cleo4 Opcode 0AE2 can find every car

:RANDCAR_1
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @RANDCAR_1
if
0AB0:   key_pressed 8// ---- key  Backspace
jf @RANDCAR_1
04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset  0.0  3.0  0.0
if
0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 10.0 find_next 0 pass_wrecked 0 //IF and SET
jf @RANDCAR_1
if
8039:   NOT   [email protected] ==  -1
jf @RANDCAR_1
00AD: set_car [email protected] max_speed_to  0.0
0186: [email protected] = create_marker_above_car [email protected]
0325: [email protected] = create_car [email protected] fire
wait 3000
0164: disable_marker [email protected]
02D1: remove_fire [email protected]
01C3: remove_references_to_car [email protected]
wait 1000
jump @RANDCAR_1

Anthony ok
  • Anthony ok

    Player Hater

  • Members
  • Joined: 25 Jun 2012

#3

Posted 24 April 2013 - 03:29 AM

QUOTE (ZAZ @ Tuesday, Apr 23 2013, 16:53)
The opcodes 053E and 09C0 only find cars which appears random in traffic or spawned by parked_car_generators,
but not these which has been created by script as long they didn't got 01C3: remove_references_to_car
and also not the car which is driven by Player_actor

Can we use this opcode to get car above the player?
073E: get_car_in_sphere -1577.942 52.6333 16.3281 radius 4.0 model #INFO handle_as $TEMPVAR_ACTOR_CAR

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#4

Posted 24 April 2013 - 02:12 PM

073E works like 053E and 09C0, it just requires xyz instead 2 xy corners of a cube
all the 3 opcodes can find a car below or above of player if you set the coords in a propper way
the point is that it won't find every car as i explained and furthermore, cop vehicles often(not always) seems to be ignored
and especially the polmav, i'm shure, it never will be found with these codes

Anthony ok
  • Anthony ok

    Player Hater

  • Members
  • Joined: 25 Jun 2012

#5

Posted 24 April 2013 - 11:57 PM

Can we define vehicle Sparrow as Taxi, what opcode to do that?
i think only this way to find random Sparrow.. ..

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#6

Posted 25 April 2013 - 03:55 PM

QUOTE (Anthony ok @ Thursday, Apr 25 2013, 00:57)
Can we define vehicle Sparrow as Taxi, what opcode to do that?
i think only this way to find random Sparrow.. ..

you could also catch fishes by using a lamppost
when does the sparrow appear in traffic?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users