CLEO Help [SAMP] Check if path start and when end path

CLEO related
Status
Not open for further replies.

Natdi

Member
Joined
May 5, 2015
Messages
6
Reaction score
0
This my simple code , but i want to know when Hydra begin path then show 'chatmsg : "Hydra start path recording" , when end path 'chatmsg : "Hydra end path" how i can check???

Because when end path car will stop and do nothing , i want it delete when end path
@monday







Code:
{$CLEO}
0000:
while true   
wait 0
11@ = 900
07C0: load_path 11@
07C1:   path 11@ available
    if
      0AB0:  key_pressed 8
    then
Model.Load(#HYDRA)
Model.Available(#HYDRA)
Model.Load(#SWAT)
Model.Available(#SWAT)
       Car.Create(1@, #HYDRA, 2293.3713 -1297.2511 24.0)
0129: 2@ = create_actor_pedtype 4 model #SWAT in_car 1@ driverseat
wait 200
05EB:  assign_car 1@ to path 11@
    end
end
 

Shakira

Active member
Joined
Jul 11, 2014
Messages
191
Reaction score
0
Hi , try my code

Code:
{$CLEO .cs}
:DrvCarrec_1
03A4: name_thread 'DRVCARC'


:ava
wait 10
if
Model.Available(#HYDRA)
jf @load
wait 10
if
Model.Available(#SWAT)
jf @load1
jump @DRVCARC_11
 
:load
Model.Load(#HYDRA)
wait 10
jump @ava
 
:load1
Model.Load(#SWAT)
wait 10
jump @ava


:DRVCARC_11
0001: wait 0 ms 
00D6: if 
0256:   player $PLAYER_ACTOR defined 
004D: jump_if_false @DRVCARC_11 
00D6: if 
0AB0:   key_pressed 8
004D: jump_if_false @DRVCARC_11 
jump @1

 :1
 Car.Create(0@, #HYDRA, 2295.1738 -1302.0791 24.0)
0129: 2@ = create_actor_pedtype 4 model #SWAT in_car 0@ driverseat
0006: 8@ = 900
07C0: load_path 8@ 

:DRVCARC_85
0001: wait 0 ms 
00D6: if 
07C1:   path 8@ available 
004D: jump_if_false @DRVCARC_85 
00D6: if 
8119:   not car 0@ wrecked 
004D: jump_if_false @DRVCARC_218 
0001: wait 0 ms 
05EB: assign_car 0@ to_path 8@ 

:DRVCARC_148
0001: wait 0 ms 
00D6: if 
0256:   player $PLAYER_ACTOR defined 
004D: jump_if_false @DRVCARC_218 
00D6: if or
01AD:   car 0@ sphere 0 near_point 0.0 0.0 0.0 radius 6.0 6.0 // add you point here it will check where you want delete and will jump to DRVCARC_218
0119:   car 0@ wrecked 
004D: jump_if_false @DRVCARC_195 
0002: jump @DRVCARC_218 

:DRVCARC_195
00D6: if 
0256:   player $PLAYER_ACTOR defined 
004D: jump_if_false @DRVCARC_218 
0002: jump @DRVCARC_148 

:DRVCARC_218
0001: wait 0 ms 
00D6: if 
0256:   player $PLAYER_ACTOR defined 
004D: jump_if_false @DRVCARC_218 
05EC: release_car 0@ from_path 
0873: release_path 8@
Car.Destroy(0@)
Actor.DestroyInstantly(2@)
0002: jump @1
 
Status
Not open for further replies.
Top