IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

This is for the discussion and releasing of tutorials for modifying GTA. Anything that isn't a tutorial will be deleted without notification.

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (31) 1 2 [3] 4 5 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [GTA SA] ~ CLEO Script Tutorial ~

 
Rapier  
Posted: Saturday, Sep 12 2009, 17:00
Quote Post


Retired scripter
Group Icon
Group: Members
Joined: Aug 14, 2005

ba.gif

XXXXX



Important information (I think...):
Memory address to check if exist a target on the map (red mark) for SA 1.01: 0x00BA8DF7.

This post has been edited by Rapier on Saturday, Sep 12 2009, 17:04
PM
  Top
 

 
markbaker  
Posted: Saturday, Sep 12 2009, 17:43
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 26, 2009

XXXXX



ZAZ

Much thanks! I am making great progress on my project! icon14.gif


I'm wondering if it is possible to assign a vehicle directly to a path contained in an rrr file - without having to close GTA:SA & open the R3D tool and add it to carrec.img?

It would be a HUGE timesaver if I could record a path, and then immediately playback my recorded paths with a simple keypress to see how it looks
PM
  Top
 

 
ZAZ  
Posted: Saturday, Sep 12 2009, 17:56
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (markbaker @ Sep 12 2009, 17:43)

I'm wondering if it is possible to assign a vehicle directly to a path contained in an rrr file -  without having to close GTA:SA &  open the R3D tool and add it to carrec.img?

Not possible i think but what is R3D tool?
IMG is loaded by startup
Start game with menue button of sannybuilder is faster

This post has been edited by ZAZ on Saturday, Sep 12 2009, 18:00
Users WebsitePM
  Top
 

 
Xforceman  
Posted: Saturday, Sep 12 2009, 19:50
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Sep 12, 2009

eu.gif

XXXXX



Hi all.
I need help with my small anim.
I have this anim in file dancing.ifp
And i want use this anim in air.
And idk how.
Here is my cleo code.
CODE
...   Player.Defined($PLAYER_CHAR)
else_jump @RASK14_MOD_21
04ED: load_animation "DANCING"

:RASK14_MOD_52
wait 10
if and
0AB0:   key_pressed 49
8818:   not actor $PLAYER_ACTOR in_air
84AD:   not actor $PLAYER_ACTOR in_water
8449:   not actor $PLAYER_ACTOR in_a_car
847A:   not actor $PLAYER_ACTOR driving_bike
84A7:   not actor $PLAYER_ACTOR driving_boat
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle
84A9:   not actor $PLAYER_ACTOR driving_heli
else_jump @RASK14_MOD_150
0605: actor $PLAYER_ACTOR perform_animation_sequence "BD_CLAP" IFP_file "DANCING" 4.0 loop 1 1 1 0 time 700 // versionA
wait 1500 ...

What i need edit or add ?
With this player use anim on earth.
Thanks.
(sorry when i write this post to bad topic.i am new on this forum.)
Users WebsitePMMSN
  Top
 

 
ZAZ  
Posted: Monday, Sep 14 2009, 05:03
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (Xforceman @ Sep 12 2009, 19:50)
(sorry when i write this post to bad topic.i am new on this forum.)

No problem but the forum to post such question is here

QUOTE
I need help with my small anim.
I have this anim in file dancing.ifp
And i want use this anim in air.
And idk how.
Here is my cleo code.


What i need edit or add ?
With this player use anim on earth.
Thanks.


What means in air? While falling or should the actor fly?
Have you seen the Airswim script in chapter CLEO Script Tutorial/Additional Themes : Animations ?

press Backspace to dance in air
CODE
{$CLEO .cs}
:Airdance
03A4: name_thread 'AirDnce'

:AirDance_01
0001: wait  0 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @AirDance_01
00D6: if 0
0AB0:   key_pressed 8
004D: jump_if_false @AirDance_01

04ED: load_animation "DANCING"

:AirDance_03
0001: wait  0 ms
if
04EE:   animation "DANCING" loaded
004D: jump_if_false @AirDance_03
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 20.0
0001: wait  1000 ms
0812: unknown_action_sequence $PLAYER_ACTOR "BD_CLAP" from_file "DANCING"  1.0  1  1  1  1 -2

:AirDance_05
0001: wait  0 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @AirDance_05
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 2.0 2.0
if  and
8AB0:   not key_pressed 8
0611:  actor $PLAYER_ACTOR animation == "BD_CLAP"
004D: jump_if_false @AirDance_07
0002: jump @AirDance_05

:AirDance_07
0792: disembark_instantly_actor $PLAYER_ACTOR
04EF: release_animation "DANCING"
0001: wait  1000 ms
0002: jump @AirDance_01


This post has been edited by ZAZ on Monday, Sep 14 2009, 16:37
Users WebsitePM
  Top
 

 
bull.04  
Posted: Friday, Sep 18 2009, 22:37
Quote Post


:D
Group Icon
Group: Members
Joined: Apr 11, 2008

us.gif

Member Award




How do you make a timer?
Users WebsitePMMSNPlayStation Network
  Top
 

 
ZAZ  
Posted: Saturday, Sep 19 2009, 05:41
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (bull.04 @ Sep 18 2009, 22:37)
How do you make a timer?

Look at CLEO Script Tutorial/Give access with math coding : Time check for milliseconds in real time
Users WebsitePM
  Top
 

 
bull.04  
Posted: Saturday, Sep 19 2009, 22:48
Quote Post


:D
Group Icon
Group: Members
Joined: Apr 11, 2008

us.gif

Member Award




I mean one that counts down on screen like in the mission where you steal weapons from Colonel Fuhrberger's house.
Users WebsitePMMSNPlayStation Network
  Top
 

 
Glenstorm  
Posted: Sunday, Sep 20 2009, 04:44
Quote Post


Strive to be different
Group Icon
Group: Members
Joined: Sep 19, 2009

XXXXX



sorry if this was covered earlier in the tutorial... but pls help..

how to create a script which uses a parked car generator, which does not save the car if the game is saved?

in other words, i want the car to be there, if the .cs script is in the CLEO folder, and not to be there when it is removed, regardless of the user saving his game in between...

currently im trying with enable_thread_saving thing.... i removed the line and it still gets saved in the savegame... how to remove this stupid functionality?
PMMSN
  Top
 

 
ZAZ  
Posted: Sunday, Sep 20 2009, 10:56
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (Glenstorm @ Sep 20 2009, 04:44)
sorry if this was covered earlier in the tutorial... but pls help..

how to create a script which uses a parked car generator, which does not save the car if the game is saved?

in other words, i want the car to be there, if the .cs script is in the CLEO folder, and not to be there when it is removed, regardless of the user saving his game in between...

currently im trying with enable_thread_saving thing.... i removed the line and it still gets saved in the savegame... how to remove this stupid functionality?

This function is a parked_car_generator and not a car.
The savegame don't stores a placed car. It stores a parked_car_generator funktion
You can set that the generator don't places cars with ciro as last parameter in opcode 014C:
CODE
014C: set_parked_car_generator $PARKED_BMX_GLEN_PARK cars_to_generate_to 0

but it's not possible to remove the generator funktion


Also enable_thread_saving can not prevent that.
The opcode 0A95: enable_thread_saving should prevent duplicates of parked_car_generators, pickups or placed objects by making savgames, load that save, save it again and so on.

This post has been edited by ZAZ on Sunday, Sep 20 2009, 11:14
Users WebsitePM
  Top
 

 
bull.04  
Posted: Monday, Sep 21 2009, 00:25
Quote Post


:D
Group Icon
Group: Members
Joined: Apr 11, 2008

us.gif

Member Award




can you make an example script that shows how to make a timer to show up on the screen?
Users WebsitePMMSNPlayStation Network
  Top
 

 
ZAZ  
Posted: Tuesday, Sep 22 2009, 16:58
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (bull.04 @ Sep 21 2009, 00:25)
can you make an example script that shows how to make a timer to show up on the screen?


The game supports opcodes to show automatic timers but it needs to insert global variables
and because global can cause bugs and crashes in Cleo I will show first how to display
timers in scripted variation.
This needs to calculate the values of 33@ or 32@ to show minutes and seconds,
for the text number display can be used text_draw opcodes, text_high_priority opcodes or text_style opcodes

I made a little script which invite you to run with your player_actor around the SF-garage in Doherty
Go into the red marker (not that to start the mission) then run to the next red marker and so on
A yellow blip on radar shows you where to run
The first script shows the simple value of 33@
text_draw opcodes are used to show the value
CODE

{$CLEO .cs}
:Timeout_1// --- 32@ and 33@ are allways running as script timer in ms and you can catch its value
thread 'Timeout'
018A: 1@ = create_checkpoint_at -2026.2032 139.4361 28.8

:Timeout_3//------------------------------------------------------- first loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Timeout_3
03F0: enable_text_draw 1
045A: text_draw_1number  500.0  200.0 'NUMBER' 33@
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2026.2032 139.4361 28.83 radius  2.5  2.5  5.5
jf @Timeout_3
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2057.0911 139.3797 28.83
33@ = 0// set the timer to 0

:Timeout_5//------------------------------------------------------- second loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Timeout_repeat
03F0: enable_text_draw 1
045A: text_draw_1number  500.0  200.0 'NUMBER' 33@
if
33@ >  4000// check if timer is bigger than 4000ms
jf @Timeout_7
jump @Timeout_repeat

:Timeout_7
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2057.0911 139.3797 28.83 radius  2.5  2.5  5.5
jf @Timeout_5
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2063.8882 184.6683 28.843
33@ = 0// set the timer to 0


:Timeout_9//------------------------------------------------------- third loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Timeout_repeat
03F0: enable_text_draw 1
045A: text_draw_1number  500.0  200.0 'NUMBER' 33@
if
33@ >  5000// check if timer is bigger than 4000ms
jf @Timeout_11
jump @Timeout_repeat

:Timeout_11
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2063.8882 184.6683 28.843 radius  2.5  2.5  5.5
jf @Timeout_9
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2024.1184 180.6013 28.8359
33@ = 0// set the timer to 0

:Timeout_13//------------------------------------------------------- fourth loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Timeout_repeat
03F0: enable_text_draw 1
045A: text_draw_1number  500.0  200.0 'NUMBER' 33@
if
33@ >  5000// check if timer is bigger than 5000ms
jf @Timeout_15
jump @Timeout_repeat

:Timeout_15
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2024.1184 180.6013 28.8359 radius  2.5  2.5  5.5
jf @Timeout_13
00BA: show_text_styled GXT 'M_PASSD' time 5000 style 1
Marker.Disable(1@)
03F0: enable_text_draw 0
0A93: end_custom_thread//- end by success

:Timeout_repeat//-----------------------refresh
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
03F0: enable_text_draw 0
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2026.2032 139.4361 28.8
0002: jump @Timeout_3

The next script shows the calculated values of 33@ as seconds and 1/100 of a second
text_draw opcodes are used to show the time
Use the fxt below and insert it into your fxt file
CODE
Showt01 SHOWTime: ~1~:~1~

Run again around the SF-garage in Doherty
CODE
{$CLEO .cs}
:Showtime_1
thread 'Showtime'
018A: 1@ = create_checkpoint_at -2026.2032 139.4361 28.8

:Showtime_3//------------------------------------------------------- first loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Showtime_3
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2026.2032 139.4361 28.83 radius  2.5  2.5  5.5
jf @Showtime_3
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2057.0911 139.3797 28.83
33@ = 0
26@ = 4000//----countdownt start value in ms

:Showtime_5//------------------------------------------------------- second loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Showtime_repeat
gosub @Showtime_text_draw//---------- gosub to the display setting
if
33@ >  4000//-- must be equal to the previous countdownt start value
jf @Showtime_7
jump @Showtime_repeat

:Showtime_7
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2057.0911 139.3797 28.83 radius  2.5  2.5  5.5
jf @Showtime_5
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2063.8882 184.6683 28.843
33@ = 0
26@ = 5000//----countdownt start value in ms

:Showtime_9//------------------------------------------------------- third loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Showtime_repeat
gosub @Showtime_text_draw//---------- gosub to the display setting
if
33@ >  5000//-- must be equal to the previous countdownt start value
jf @Showtime_11
jump @Showtime_repeat

:Showtime_11
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2063.8882 184.6683 28.843 radius  2.5  2.5  5.5
jf @Showtime_9
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2024.1184 180.6013 28.8359
33@ = 0
26@ = 5000//----countdownt start value in ms

:Showtime_13//------------------------------------------------------- fourth loop
wait 0
if
0256:   player $PLAYER_CHAR defined
jf @Showtime_repeat
gosub @Showtime_text_draw//---------- gosub to the display setting
if
33@ >  5000//-- must be equal to the previous countdownt start value
jf @Showtime_15
jump @Showtime_repeat

:Showtime_15
if
00FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point -2024.1184 180.6013 28.8359 radius  2.5  2.5  5.5
jf @Showtime_13
00BA: show_text_styled GXT 'M_PASSD' time 5000 style 1
Marker.Disable(1@)
03F0: enable_text_draw 0
0A93: end_custom_thread//- end by success

:Showtime_repeat//-----------------------refresh
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
03F0: enable_text_draw 0
Marker.Disable(1@)
018A: 1@ = create_checkpoint_at -2026.2032 139.4361 28.8
0002: jump @Showtime_3





:Showtime_text_draw//------------------------------- subscript
0085: 31@ = 33@ // make a local equal to the timer 33@
0085: 30@ = 33@ // make one more local equal to the timer 33@  

0085: 28@ = 26@ // make a local equal to the countdownt start value which show the seconds
28@ /= 1000
31@ /= 1000
0062: 28@ -= 31@

0085: 27@ = 26@ // make one more local equal to the countdownt start value which show parts of seconds
27@ /= 10
30@ /= 10
0062: 27@ -= 30@

03F0: enable_text_draw 1
0340: set_text_draw_RGBA 0 64 255 255
033F: set_text_draw_letter_size 0.5 3.0
0343: set_text_draw_linewidth 640.0
045B: draw_text_2numbers 450.0 200.0 GXT 'SHOWT01' numbers 28@ 27@

return

Instead text_draw opcodes can also be used text_high_priority opcodes
replace
CODE
03F0: enable_text_draw 1
0340: set_text_draw_RGBA 0 64 255 255
033F: set_text_draw_letter_size 0.5 3.0
0343: set_text_draw_linewidth 640.0
045B: draw_text_2numbers 450.0 200.0 GXT 'SHOWT01' numbers 28@ 27@

with
CODE
02FD: show_text_2numbers_lowpriority GXT 'Showt01' numbers 28@ 27@ time 10 flag 1

or use text_style opcodes and replace it with
CODE
036D: show_text_2numbers_styled GXT 'Showt01' numbers 28@ 27@ time 5 style 6



As I said above can also be used an automatic timer but it needs to use global variables
You need first to declare the value then start the timer.
Use stop timer at the end to remove the reference of the timer and of the variable
type 1 counts in descending order and type 0 counts in ascending order
CODE
{$CLEO .cs}
:Timer_1
thread 'TIMER'
0004: $time2 =  90000  // integer values
014E: set_timer_to $time2 type  1

:Timer_2
wait 0
if
$time2 == 0
jf @Timer_2
014F: stop_timer $time2
00BA: show_text_styled GXT 'fem_off' time 1000 style 1
0A93: end_custom_thread

For the timer exist also a version which show a text
replace
CODE
014E: set_timer_to $time2 type  1

with
CODE
03C3: set_timer_to $time2 type 1 GXT 'Showt01' // global_variable  // Time



To make it complete I show also how to use the StatusText or StatusBar opcode
But it needs also to use global variables
At first the StatusText opcode which displays only a value as numbers
It displays not the time but it displays automaticly the value of the global variable
CODE
{$CLEO .cs}
:Status_1
thread 'STATUS'
0004: $time2 =  1000  // integer values
03C4: set_status_text $time2 type 0 GXT 'Showt01' // global_variable  // Score ~1~

:Status_2
wait 0
$time2 -= 1
if
$time2 == 0
jf @Status_2
0151: remove_status_text $time2
00BA: show_text_styled GXT 'fem_off' time 1000 style 1
0A93: end_custom_thread

type 0 shows the value as numbers
type 1 shows the value as an bar

also there exist other opcodes to displays more StatusTexts or StatusBars
in more rows among each other

for the statusBar you must consider that a full bar have allways the value 100
and to show the correct bar needs to calculate the value relativ to 100
in other words: the bar shows percents
CODE
{$CLEO .cs}
:Status2_1
thread 'STATUS2'
0004: $time1 =  100  // integer values
0004: $time2 =  1000  // integer values
04F7: status_text $time1 type 1 line 1 GXT 'Showt01' // global_variable  // Score
04F7: status_text $time2 type 0 line 2 GXT 'Showt01' // global_variable  // Score

:Status2_2
wait 0
$time2 -= 1
0084: $time1 = $time2
$time1 /= 10
if
$time2 == 0
jf @Status2_2
0151: remove_status_text $time1
0151: remove_status_text $time2
00BA: show_text_styled GXT 'fem_off' time 1000 style 1
0A93: end_custom_thread
Users WebsitePM
  Top
 

 
larvaz  
Posted: Wednesday, Oct 28 2009, 17:59
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 17, 2009

mx.gif

XXXXX



Wusup!

hello 2 Everyone...

well im new here, at the forum, i think ive been coding from the last month XD..

i was reading ZAZ car drive tut..
i took the examle code, the one that uses

CODE
07E7: AS_assign_scmpath_to_actor


im planing a race script around the city, NFS style jojo..

but ive troubles with my code... everythings fine when makin the cars, the "oponent" perfectly follows my desired path...

then i decide to make a winnin condition, cheking if any of the cars reached the final race chekpoint, near the train station.. heres the whole code
CODE

{$CLEO .cs}
:scmpath_1
03A4: name_thread 'SCMP'

:scmpath_3
0001: wait 0 ms
if
0256: player $PLAYER_CHAR defined
jf @scmpath_3
077E: 0@ = active_interior
if  and
0038:   0@ ==  0  // integer values
0AB0:   key_pressed 8//----------------------------------------Backspace  
jf @scmpath_3
016A: fade  0 ()  250 ms
0001: wait 250 ms
01B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at -1338.5  -408.1  14.1
0173: set_actor $PLAYER_ACTOR z_angle_to  90.8
0001: wait  500 ms
0247: request_model #INFERNUS
0247: request_model #MAFFA

:scmpath_5
0001: wait  0 ms
if  and
0248:   model #INFERNUS available                    
0248:   model #MAFFA available
jf @scmpath_5
00C0: set_current_time_hours_to 1 minutes_to 0    // i prefer raciin at nite jojo
00A5: 1@ = create_car #INFERNUS at 2639.6252 2097.3906 10.6558 //put car racestart
0175: set_car 1@ z_angle_to  191.0
0224: set_car 1@ health_to  2000
00A5: 7@ = create_car #INFERNUS at 2634.3599 2097.4692 10.6499  //put opponent racestart
0175: set_car 7@ z_angle_to  191.0
0224: set_car 7@ health_to  2000
020A: set_car  7@ door_status_to 4
02AC: set_car 7@ immunities  1  1  1  1  1
01EC: make_car 7@ very_heavy  1
0129: 9@ = create_actor  24 #MAFFA in_car 7@ driverseat
0223: set_actor 9@ health_to  3000
04E4: unknown_refresh_game_renderer_at  2639.6252 2097.3906
03CB: set_camera  2639.6252 2097.3906 10.6558
029B: 23@ = init_object 1655 at -1576.02  -202.34  13.76
0177: set_object 23@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 23@
0382: set_object 23@ collision_detection  1
029B: 24@ = init_object 1655 at -1597.9  -506.5  21.7
0177: set_object 24@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 24@
0382: set_object 24@ collision_detection  1
029B: 25@ = init_object 1655 at -1375.9  -581.5  13.69
0177: set_object 25@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 25@
0382: set_object 25@ collision_detection  1
029B: 26@ = init_object 1655 at -1374.9  -585.5  13.69
0177: set_object 26@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 26@

0382: set_object 26@ collision_detection  1
0177: set_object 23@ z_angle_to  135.0
0177: set_object 24@ z_angle_to  225.0
0177: set_object 25@ z_angle_to  280.0
0177: set_object 26@ z_angle_to  280.0
0186: 29@ = create_marker_above_car 7@
07E0: set_marker 29@ type_to 1

0249: release_model #INFERNUS
0249: release_model #MAFFA
Car.LockInCurrentPosition(7@) = True
Car.LockInCurrentPosition(1@) = True
04e0: car 7@ abandon_path_radius 200
00AD: set_car 7@ max_speed_to  100.0
04BA: set_car 7@ speed_instantly  30.0
00AF: set_car 7@ driver_behaviour_to  1
00AE: unknown_set_car 7@ to_ignore_traffic_lights  2
0001: wait  250 ms
036A: put_actor $PLAYER_ACTOR in_car 1@
0001: wait  250 ms
016A: fade  1 ()  1000 ms
0001: wait  1000 ms
0373: set_camera_directly_behind_player
02EB: restore_camera_with_jumpcut
01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)
0006: 15@ =  0  // integer values
0006: 16@ =  0  // integer values
0006: 20@ =  20000  // floating-point values
0006: 19@ =  0  // integer values                                
0007: 11@ =  2647.3511  // floating-point values
0007: 12@ =  2069.1543  // floating-point values       2647.8835 2068.5312 9.7085
0007: 13@ =  10.1373  // floating-point values
0006: $win =  0
0006: $lose =  0
wait  3000 ms
Car.LockInCurrentPosition(1@) = False
Car.LockInCurrentPosition(7@) = False
00A7: car 7@ drive_to  11@ 12@ 13@
00AD: set_car 7@ max_speed_to  100.0
04e0: car 7@ abandon_path_radius 250
08C6: set_actor 9@  stay_on_bike 1
06D5: $check = create_racing_checkpoint_at 2866.5557 1279.0804 15.0 point_to 2866.5557 1279.0804 10.763 type 1 radius 15.0
                                 //heres the checkpoint coords



:scmpath_7
0001: wait 0 ms
if
0256: player $PLAYER_CHAR defined
jf @scmpath_7

0050: gosub @scmpath_sub_3

if  and
8119:   NOT   car 1@ wrecked
8119:   NOT   car 7@ wrecked
8118:   NOT   actor 9@ dead
jf @scmpath_7
if
00FE:   actor $PLAYER_ACTOR  0 ()near_point 2639.6252 2097.3906 10.6558 radius  1000.5  1000.5  50.5
jf @scmpath_12
//
//    heres where i put the $PLAYER_ACTOR´s car winnin condition...
//
//
:checkwin
wait 0
if
80EC:  actor $PLAYER_ACTOR 0 near_point 2866.5557 1279.0804 10.763 radius 8.0 8.0  //check if youve reach tha finish line
jf @scmpath_7
:putwin          //true?  winnin gets 1 value
0006: $win =  1
jump @chekloop    //and jumps to make the check, otherwise it continues with normal script

//  end of winnin condition

jump @scmpath_7

:scmpath_12
0164: disable_marker 29@
01C3: remove_references_to_car 1@  // Like turning a car into any random car
01C3: remove_references_to_car 7@  // Like turning a car into any random car
01C2: remove_references_to_actor 9@  // Like turning an actor into a random pedestrian
0108: destroy_object 23@
0108: destroy_object 24@
0108: destroy_object 25@
0108: destroy_object 26@
jump @scmpath_3


:scmpath_sub_3
if
8119:   NOT   car 7@ wrecked
jf @scmpath_sub_109
if
00DB:   actor 9@ in_car 7@
jf @scmpath_sub_99
if
0039:   19@ ==  1  // integer values
jf @scmpath_sub_10
0006: 19@ =  0  // integer values
jump @scmpath_sub_100

:scmpath_sub_10
if
0039:   15@ ==  0  // integer values
jf @scmpath_sub_11
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  5.2  5.2  5.0
jf @scmpath_sub_11
0006: 15@ =  1  // integer values
05D6: clear_scmpath
0007: 11@ =  2690.3149  // floating-point values
0007: 12@ =  2003.0887  // floating-point values
0007: 13@ =  6.6397  // floating-point values
000A: 16@ +=  0  // integer values                      
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100

:scmpath_sub_11
if
0039:   15@ ==  1  // integer values
jf @scmpath_sub_12
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_12
00AD: set_car 7@ max_speed_to  10.0
0006: 15@ =  2  // integer values
05D6: clear_scmpath
0007: 11@ =  2705.8157  // floating-point values
0007: 12@ =  1937.0188  // floating-point values      
0007: 13@ =  6.6761  // floating-point values
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100


:scmpath_sub_12
if
0039:   15@ ==  2  // integer values
jf @scmpath_sub_13
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_13
00AD: set_car 7@ max_speed_to  25.0
0006: 15@ =  3  // integer values
05D6: clear_scmpath
0007: 11@ =  2726.5459  // floating-point values
0007: 12@ =  1887.1978  // floating-point values            
0007: 13@ =  6.6737  // floating-point values
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100

:scmpath_sub_13
if
0039:   15@ ==  3  // integer values
jf @scmpath_sub_14
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  8.2  8.2  5.0
jf @scmpath_sub_14
00AD: set_car 7@ max_speed_to  25.0
0006: 15@ =  4  // integer values
05D6: clear_scmpath
0007: 11@ =  2737.7283  // floating-point values
0007: 12@ =  1763.1494  // floating-point values
0007: 13@ =  6.8209  // floating-point values        
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100



:scmpath_sub_14
if
0039:   15@ ==  4  // integer values
jf @scmpath_sub_15
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  5.2  5.2  5.0
jf @scmpath_sub_15
0006: 15@ =  5  // integer values
05D6: clear_scmpath
0007: 11@ =  2747.7874  // floating-point values
0007: 12@ =  1691.6516  // floating-point values
0007: 13@ =  8.8271  // floating-point values          
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100

:scmpath_sub_15
if
0039:   15@ ==  5  // integer values
jf @scmpath_sub_16
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_16
00AD: set_car 7@ max_speed_to  10.0
0006: 15@ =  6  // integer values
05D6: clear_scmpath
0007: 11@ =  2844.8591  // floating-point values
0007: 12@ =  1537.704  // floating-point values
0007: 13@ =  10.7916  // floating-point values
000A: 16@ +=  0  // integer values
0007: 17@ =  40.0  // floating-point values                
0007: 18@ =  10.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
00AE: unknown_set_car 7@ to_ignore_traffic_lights  2
jump @scmpath_sub_100

:scmpath_sub_16
if
0039:   15@ ==  6  // integer values
jf @scmpath_sub_17
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  8.2  8.2  5.0
jf @scmpath_sub_17
00AD: set_car 7@ max_speed_to  0.0
0006: 15@ =  7  // integer values
05D6: clear_scmpath
0007: 11@ =  2867.3679  // floating-point values
0007: 12@ =  1490.7612  // floating-point values
0007: 13@ =  10.7581  // floating-point values
000A: 16@ +=  0  // integer values                      
0007: 17@ =  100.0  // floating-point values      
0007: 18@ =  0.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
00AE: unknown_set_car 7@ to_ignore_traffic_lights  2
jump @scmpath_sub_100

:scmpath_sub_17
if
0039:   15@ ==  7  // integer values
jf @scmpath_sub_18
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_18
00AD: set_car 7@ max_speed_to  5.0
01EB: set_car_density_to  0.0
0006: 15@ =  8  // integer values
05D6: clear_scmpath
0007: 11@ =  2862.9255  // floating-point values
0007: 12@ =  1298.3546  // floating-point values
0007: 13@ =  10.5398  // floating-point values                 last checkpoint!!!!!
000A: 16@ +=  0  // integer values                  
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100


:scmpath_sub_18
if
0039:   15@ ==  8  // integer values
jf @scmpath_sub_109
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  25.2  25.2  5.0

jf @scmpath_sub_109
     // aand heres the oponnent´s car winnin condition
if
01AF:   car 7@  0 ()near_point 2866.5557 1279.0804 10.763 radius  8.2  8.2  5.0
jf @scmpath_sub_109  // if 7@ reached tha finish line, $lose becomes 1
0006: $lose =  1
:chekloop
wait 0
if
0039: $win ==  1   //checkin if $PLAYER_ACTOR´s car already reached finish line
jump @winner        //so make me the winner
                   //if false checks if oponents reached finish
if
0039: $lose ==  1
jump @loserace     //if true, youre a loser ha-hA


:winner
00AD: set_car 7@ max_speed_to  0.0
0006: 15@ =  1  // integer values             //winnin text
00BC: text_highpriority 'BJ_WIN'  5000 ms  1
jump @scmpath_12

:loserace
00AD: set_car 7@ max_speed_to  0.0
0006: 15@ =  1  // integer values                   //loser text
00BC: text_highpriority 'BJ_LOSE'  5000 ms  1

// end of condition

jump @scmpath_12
000A: 16@ +=  1  // integer values
05D6: clear_scmpath
0007: 11@ =  -1181.78  // floating-point values
0007: 12@ =  -331.30  // floating-point values
0007: 13@ =  13.76  // floating-point values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@

if
0039:   16@ ==  2  // integer values
jf @scmpath_sub_100
00BC: text_highpriority 'BJ_LOSE'  5000 ms  1
jump @scmpath_sub_100


:scmpath_sub_99
if
0039:   19@ ==  0  // integer values
jf @scmpath_sub_109
00AD: set_car 7@ max_speed_to  0.0
05CB: actor_goto_and_enter_car 9@ 7@  5000
0006: 19@ =  1  // integer values
jump @scmpath_sub_109

:scmpath_sub_100
07E7: AS_assign_scmpath_to_actor 9@ in_car 7@ speed 17@ flags 2 0 3
03F0: text_draw_toggle  0
0006: 33@ =  0  // integer values
jump @scmpath_sub_109



:scmpath_sub_102
if
01F3:   car 7@ airborne
jf @scmpath_sub_103
0007: 18@ =  0.0  // floating-point values
04BA: set_car 7@ speed_instantly  18@
07E7: AS_assign_scmpath_to_actor 9@ in_car 7@ speed 17@ flags 2 0 3
jump @scmpath_sub_103

:scmpath_sub_103
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  30.2  30.2  5.0
jf @scmpath_sub_104
jump @scmpath_sub_105

:scmpath_sub_104
02E3: 20@ = car 7@ speed
if
81F3:   NOT   car 7@ airborne
jf @scmpath_sub_106
if  and
0021:   20@ >  30.0  // floating-point values
0019:   33@ >  700  // integer values
jf @scmpath_sub_105
04BA: set_car 7@ speed_instantly  50.0

:scmpath_sub_105
if
0019:   33@ >  2000  // integer values
jf @scmpath_sub_109

:scmpath_sub_106
0006: 33@ =  0  // integer values


:scmpath_sub_109
0051: return


let me remember u, i used ZAZ example script

the F@kin prob is that when i press backspace to start tha race, the cars are placed as normal
but it seems the winnin condition is broken, and the text You win is showed since the
beginning of the race... it nevers check if the car´s at finish line...

i dunno whers my code error haha...


heres my code without the winnin checks, runs perfectly...

CODE
{$CLEO .cs}
:scmpath_1
03A4: name_thread 'SCMP'

:scmpath_3
0001: wait 0 ms
if
0256: player $PLAYER_CHAR defined
jf @scmpath_3
077E: 0@ = active_interior
if  and
0038:   0@ ==  0  // integer values
0AB0:   key_pressed 8//----------------------------------------Backspace  
jf @scmpath_3
016A: fade  0 ()  250 ms
0001: wait 250 ms
01B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at -1338.5  -408.1  14.1
0173: set_actor $PLAYER_ACTOR z_angle_to  90.8
0001: wait  500 ms
0247: request_model #INFERNUS
0247: request_model #MAFFA

:scmpath_5
0001: wait  0 ms
if  and
0248:   model #INFERNUS available                    
0248:   model #MAFFA available
jf @scmpath_5
00C0: set_current_time_hours_to 1 minutes_to 0    // i prefer raciin at nite jojo
00A5: 1@ = create_car #INFERNUS at 2639.6252 2097.3906 10.6558 //put car racestart
0175: set_car 1@ z_angle_to  191.0
0224: set_car 1@ health_to  2000
00A5: 7@ = create_car #INFERNUS at 2634.3599 2097.4692 10.6499  //put opponent racestart
0175: set_car 7@ z_angle_to  191.0
0224: set_car 7@ health_to  2000
020A: set_car  7@ door_status_to 4
02AC: set_car 7@ immunities  1  1  1  1  1
01EC: make_car 7@ very_heavy  1
0129: 9@ = create_actor  24 #MAFFA in_car 7@ driverseat
0223: set_actor 9@ health_to  3000
04E4: unknown_refresh_game_renderer_at  2639.6252 2097.3906
03CB: set_camera  2639.6252 2097.3906 10.6558
029B: 23@ = init_object 1655 at -1576.02  -202.34  13.76
0177: set_object 23@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 23@
0382: set_object 23@ collision_detection  1
029B: 24@ = init_object 1655 at -1597.9  -506.5  21.7
0177: set_object 24@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 24@
0382: set_object 24@ collision_detection  1
029B: 25@ = init_object 1655 at -1375.9  -581.5  13.69
0177: set_object 25@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 25@
0382: set_object 25@ collision_detection  1
029B: 26@ = init_object 1655 at -1374.9  -585.5  13.69
0177: set_object 26@ z_angle_to  270.0
01C7: remove_object_from_mission_cleanup_list 26@

0382: set_object 26@ collision_detection  1
0177: set_object 23@ z_angle_to  135.0
0177: set_object 24@ z_angle_to  225.0
0177: set_object 25@ z_angle_to  280.0
0177: set_object 26@ z_angle_to  280.0
0186: 29@ = create_marker_above_car 7@
07E0: set_marker 29@ type_to 1

0249: release_model #INFERNUS
0249: release_model #MAFFA
Car.LockInCurrentPosition(7@) = True
Car.LockInCurrentPosition(1@) = True
04e0: car 7@ abandon_path_radius 200
00AD: set_car 7@ max_speed_to  100.0
04BA: set_car 7@ speed_instantly  30.0
00AF: set_car 7@ driver_behaviour_to  1
00AE: unknown_set_car 7@ to_ignore_traffic_lights  2
0001: wait  250 ms
036A: put_actor $PLAYER_ACTOR in_car 1@
0001: wait  250 ms
016A: fade  1 ()  1000 ms
0001: wait  1000 ms
0373: set_camera_directly_behind_player
02EB: restore_camera_with_jumpcut
01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)
0006: 15@ =  0  // integer values
0006: 16@ =  0  // integer values
0006: 20@ =  20000  // floating-point values
0006: 19@ =  0  // integer values                                
0007: 11@ =  2647.3511  // floating-point values
0007: 12@ =  2069.1543  // floating-point values       2647.8835 2068.5312 9.7085
0007: 13@ =  10.1373  // floating-point values
0006: $win =  0
0006: $lose =  0
wait  3000 ms
Car.LockInCurrentPosition(1@) = False
Car.LockInCurrentPosition(7@) = False
00A7: car 7@ drive_to  11@ 12@ 13@
00AD: set_car 7@ max_speed_to  100.0
04e0: car 7@ abandon_path_radius 250
08C6: set_actor 9@  stay_on_bike 1
06D5: $check = create_racing_checkpoint_at 2866.5557 1279.0804 15.0 point_to 2866.5557 1279.0804 10.763 type 1 radius 15.0
                                 //heres the checkpoint coords



:scmpath_7
0001: wait 0 ms
if
0256: player $PLAYER_CHAR defined
jf @scmpath_7

0050: gosub @scmpath_sub_3

if  and
8119:   NOT   car 1@ wrecked
8119:   NOT   car 7@ wrecked
8118:   NOT   actor 9@ dead
jf @scmpath_7
if
00FE:   actor $PLAYER_ACTOR  0 ()near_point 2639.6252 2097.3906 10.6558 radius  1000.5  1000.5  50.5
jf @scmpath_12

jump @scmpath_7

:scmpath_12
0164: disable_marker 29@
01C3: remove_references_to_car 1@  // Like turning a car into any random car
01C3: remove_references_to_car 7@  // Like turning a car into any random car
01C2: remove_references_to_actor 9@  // Like turning an actor into a random pedestrian
0108: destroy_object 23@
0108: destroy_object 24@
0108: destroy_object 25@
0108: destroy_object 26@
jump @scmpath_3


:scmpath_sub_3
if
8119:   NOT   car 7@ wrecked
jf @scmpath_sub_109
if
00DB:   actor 9@ in_car 7@
jf @scmpath_sub_99
if
0039:   19@ ==  1  // integer values
jf @scmpath_sub_10
0006: 19@ =  0  // integer values
jump @scmpath_sub_100

:scmpath_sub_10
if
0039:   15@ ==  0  // integer values
jf @scmpath_sub_11
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  5.2  5.2  5.0
jf @scmpath_sub_11
0006: 15@ =  1  // integer values
05D6: clear_scmpath
0007: 11@ =  2690.3149  // floating-point values
0007: 12@ =  2003.0887  // floating-point values
0007: 13@ =  6.6397  // floating-point values
000A: 16@ +=  0  // integer values                      
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100

:scmpath_sub_11
if
0039:   15@ ==  1  // integer values
jf @scmpath_sub_12
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_12
00AD: set_car 7@ max_speed_to  10.0
0006: 15@ =  2  // integer values
05D6: clear_scmpath
0007: 11@ =  2705.8157  // floating-point values
0007: 12@ =  1937.0188  // floating-point values      
0007: 13@ =  6.6761  // floating-point values
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100


:scmpath_sub_12
if
0039:   15@ ==  2  // integer values
jf @scmpath_sub_13
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_13
00AD: set_car 7@ max_speed_to  25.0
0006: 15@ =  3  // integer values
05D6: clear_scmpath
0007: 11@ =  2726.5459  // floating-point values
0007: 12@ =  1887.1978  // floating-point values            
0007: 13@ =  6.6737  // floating-point values
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100

:scmpath_sub_13
if
0039:   15@ ==  3  // integer values
jf @scmpath_sub_14
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  8.2  8.2  5.0
jf @scmpath_sub_14
00AD: set_car 7@ max_speed_to  25.0
0006: 15@ =  4  // integer values
05D6: clear_scmpath
0007: 11@ =  2737.7283  // floating-point values
0007: 12@ =  1763.1494  // floating-point values
0007: 13@ =  6.8209  // floating-point values        
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100



:scmpath_sub_14
if
0039:   15@ ==  4  // integer values
jf @scmpath_sub_15
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  5.2  5.2  5.0
jf @scmpath_sub_15
0006: 15@ =  5  // integer values
05D6: clear_scmpath
0007: 11@ =  2747.7874  // floating-point values
0007: 12@ =  1691.6516  // floating-point values
0007: 13@ =  8.8271  // floating-point values          
000A: 16@ +=  0  // integer values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100

:scmpath_sub_15
if
0039:   15@ ==  5  // integer values
jf @scmpath_sub_16
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_16
00AD: set_car 7@ max_speed_to  10.0
0006: 15@ =  6  // integer values
05D6: clear_scmpath
0007: 11@ =  2844.8591  // floating-point values
0007: 12@ =  1537.704  // floating-point values
0007: 13@ =  10.7916  // floating-point values
000A: 16@ +=  0  // integer values
0007: 17@ =  40.0  // floating-point values                
0007: 18@ =  10.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
00AE: unknown_set_car 7@ to_ignore_traffic_lights  2
jump @scmpath_sub_100

:scmpath_sub_16
if
0039:   15@ ==  6  // integer values
jf @scmpath_sub_17
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  8.2  8.2  5.0
jf @scmpath_sub_17
00AD: set_car 7@ max_speed_to  0.0
0006: 15@ =  7  // integer values
05D6: clear_scmpath
0007: 11@ =  2867.3679  // floating-point values
0007: 12@ =  1490.7612  // floating-point values
0007: 13@ =  10.7581  // floating-point values
000A: 16@ +=  0  // integer values                      
0007: 17@ =  100.0  // floating-point values      
0007: 18@ =  0.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
00AE: unknown_set_car 7@ to_ignore_traffic_lights  2
jump @scmpath_sub_100

:scmpath_sub_17
if
0039:   15@ ==  7  // integer values
jf @scmpath_sub_18
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  15.2  15.2  5.0
jf @scmpath_sub_18
00AD: set_car 7@ max_speed_to  5.0
01EB: set_car_density_to  0.0
0006: 15@ =  8  // integer values
05D6: clear_scmpath
0007: 11@ =  2862.9255  // floating-point values
0007: 12@ =  1298.3546  // floating-point values
0007: 13@ =  10.5398  // floating-point values                 last checkpoint!!!!!
000A: 16@ +=  0  // integer values                  
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@
jump @scmpath_sub_100


:scmpath_sub_18
if
0039:   15@ ==  8  // integer values
jf @scmpath_sub_109
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  25.2  25.2  5.0

jf @scmpath_sub_109


00AD: set_car 7@ max_speed_to  0.0
0006: 15@ =  1  // integer values                   //loser text
00BC: text_highpriority 'BJ_LOSE'  5000 ms  1

// end of condition

jump @scmpath_12
000A: 16@ +=  1  // integer values
05D6: clear_scmpath
0007: 11@ =  -1181.78  // floating-point values
0007: 12@ =  -331.30  // floating-point values
0007: 13@ =  13.76  // floating-point values
0007: 17@ =  100.0  // floating-point values
0007: 18@ =  20.0  // floating-point values
05D7: add_point_to_scmpath 11@ 12@ 13@

if
0039:   16@ ==  2  // integer values
jf @scmpath_sub_100
00BC: text_highpriority 'BJ_LOSE'  5000 ms  1
jump @scmpath_sub_100


:scmpath_sub_99
if
0039:   19@ ==  0  // integer values
jf @scmpath_sub_109
00AD: set_car 7@ max_speed_to  0.0
05CB: actor_goto_and_enter_car 9@ 7@  5000
0006: 19@ =  1  // integer values
jump @scmpath_sub_109

:scmpath_sub_100
07E7: AS_assign_scmpath_to_actor 9@ in_car 7@ speed 17@ flags 2 0 3
03F0: text_draw_toggle  0
0006: 33@ =  0  // integer values
jump @scmpath_sub_109



:scmpath_sub_102
if
01F3:   car 7@ airborne
jf @scmpath_sub_103
0007: 18@ =  0.0  // floating-point values
04BA: set_car 7@ speed_instantly  18@
07E7: AS_assign_scmpath_to_actor 9@ in_car 7@ speed 17@ flags 2 0 3
jump @scmpath_sub_103

:scmpath_sub_103
if
01AF:   car 7@  0 ()near_point 11@ 12@ 13@ radius  30.2  30.2  5.0
jf @scmpath_sub_104
jump @scmpath_sub_105

:scmpath_sub_104
02E3: 20@ = car 7@ speed
if
81F3:   NOT   car 7@ airborne
jf @scmpath_sub_106
if  and
0021:   20@ >  30.0  // floating-point values
0019:   33@ >  700  // integer values
jf @scmpath_sub_105
04BA: set_car 7@ speed_instantly  50.0

:scmpath_sub_105
if
0019:   33@ >  2000  // integer values
jf @scmpath_sub_109

:scmpath_sub_106
0006: 33@ =  0  // integer values


:scmpath_sub_109
0051: return


please help !!

last question, i dont understand last script part, that airborne checks, i dunno whats an airborn jajaja....



i hope mi post is readeable... kus im from mexiko, i speak spanish..

asi que si igual hay algun hispano que me ayude, estaria genial jeje...
chidoo pzz..

PD: heey ZAZ your tutorials are greaat.. helped me a lot.... icon14.gif

peace out

This post has been edited by larvaz on Wednesday, Oct 28 2009, 18:07
PM
  Top
 

 
ZAZ  
Posted: Thursday, Oct 29 2009, 18:47
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (larvaz @ Oct 28 2009, 17:59)


but ive troubles with my code... everythings fine when makin the cars, the "oponent" perfectly follows my desired path... 

then i decide to make a winnin condition, cheking if any of the cars reached the final race chekpoint, near the train station.. heres the whole code

the F@kin prob is that when i press backspace to start tha race, the cars are placed as normal
but it seems the winnin condition is broken, and the text You win is showed since the
beginning of the race...  it nevers check if the car´s at finish line...

welcome larvaz
the reason of your problem is that the location check is a not-version
CODE

this means: if player_actor is not near_point 2639.6252 2097.3906 10.6558
because of the opcodes

if
80EC:  actor $PLAYER_ACTOR 0 near_point 2866.5557 1279.0804 10.763 radius 8.0 8.0  //check if youve reach tha finish line
jf @scmpath_7


The most question codes can be changed into the opposite question
by changing the ciro of the opcode into 8 and insert "not" into the code line

exemble:
CODE
00E1: key_pressed 0 10

and
CODE
80E1: NOT key_pressed 0 11


the correct check:
CODE
if
00EC:  actor $PLAYER_ACTOR 0 near_point 2866.5557 1279.0804 10.763 radius 8.0 8.0  //
jf @scmpath_7


QUOTE
last question, i dont understand last script part, that airborne checks, i dunno whats an airborn jajaja....

airborn means, the vehicle is in air
for example the vehicle jumps over a ramp and is for same seconds in air
in this case it loose the information of the destination and needs to get it again



This post has been edited by ZAZ on Thursday, Oct 29 2009, 18:50
Users WebsitePM
  Top
 

 
Jur1zz  
Posted: Saturday, Oct 31 2009, 20:31
Quote Post


Playa
Group Icon
Group: Members
Joined: Jul 16, 2009

lt.gif

XXXXX



Hi

How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate"

Example
Users WebsitePMMSNXbox Live
  Top
 

 
ZAZ  
Posted: Saturday, Oct 31 2009, 21:04
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (Jur1zz @ Oct 31 2009, 20:31)
Hi

How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate"

Example

there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable
maybe a trick can help: place a car in background
test the script below by driving a bicycle
CODE
{$CLEO .cs}
:CarsoundDummy
03A4: name_thread 'CSDUMMY'

:CarsoundDummy_1
0001: wait 0 ms
00D6: if 0
0256: player $PLAYER_CHAR defined
004D: jump_if_false @CarsoundDummy_1
if
00DF:   actor $PLAYER_ACTOR driving
004D: jump_if_false @CarsoundDummy_1
03C0: 0@ = actor $PLAYER_ACTOR car
0247: request_model #INFERNUS

:CarsoundDummy_3
0001: wait  0 ms
if
0248:   model #INFERNUS available
004D: jump_if_false @CarsoundDummy_3
00A5: 1@ = create_car #INFERNUS at 0.5  0.5  713.35
0249: release_model #INFERNUS
099A: set_car 1@ collision_detection 0
0338: set_car 1@ visibility 0
0683: attach_car 1@ to_car 0@ with_offset 0.0 0.0 4.5 rotation 0.0 0.0 0.0

:CarsoundDummy_5
0001: wait 500 ms
00D6: if 0
0256: player $PLAYER_CHAR defined
004D: jump_if_false @CarsoundDummy_15
if   and
8119:   NOT   car 0@ wrecked
8119:   NOT   car 1@ wrecked
00DF:   actor $PLAYER_ACTOR driving
004D: jump_if_false @CarsoundDummy_15
if
0686:   car 1@ attached
004D: jump_if_false @CarsoundDummy_15
04C4: create_coordinate 11@ 12@ 13@ from_actor $PLAYER_ACTOR offset 0.0  100.0  0.0
02E3: 5@ = car 0@ speed
00A7: car 1@ drive_to 11@ 12@ 13@//---simple drive-to command
00AD: set_car 1@ max_speed_to  5@//---speed declaration, important!!
0002: jump @CarsoundDummy_5

:CarsoundDummy_15
01C3: remove_references_to_car 0@  // Like turning a car into any random car
00A6: destroy_car 1@
0002: jump @CarsoundDummy_1




This post has been edited by ZAZ on Saturday, Oct 31 2009, 21:58
Users WebsitePM
  Top
 

 
Jur1zz  
Posted: Saturday, Oct 31 2009, 21:11
Quote Post


Playa
Group Icon
Group: Members
Joined: Jul 16, 2009

lt.gif

XXXXX



QUOTE (ZAZ @ Oct 31 2009, 23:04)
QUOTE (Jur1zz @ Oct 31 2009, 20:31)
Hi

How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate"

Example

there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable
maybe a trick can help: place a car with actor in background

Look at this
MOTO IGiNe v0.2
Users WebsitePMMSNXbox Live
  Top
 

 
ZAZ  
Posted: Sunday, Nov 1 2009, 07:30
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (Jur1zz @ Oct 31 2009, 21:11)
QUOTE (ZAZ @ Oct 31 2009, 23:04)
QUOTE (Jur1zz @ Oct 31 2009, 20:31)
Hi

How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate"

Example

there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable
maybe a trick can help: place a car with actor in background

Look at this
MOTO IGiNe v0.2


Yes, I did, but I don't know what you want.

Note: This is a script tutorial and not a request topic
so please don't post again here

If you want that I do the script then visit my Homepage, vistit every site and click on every avertising, then post in my cleo mod showroom topic to request the script.

Users WebsitePM
  Top
 

 
markjaysongalang  
Posted: Sunday, Nov 1 2009, 08:58
Quote Post


MarkJ-0699
Group Icon
Group: Members
Joined: May 31, 2009

ph.gif

XXXXX



Yey! Thanks for this tutorial. I'm making my Fast and Slowmotion Mod! I'll post updates soon.
Users WebsitePMXbox LivePlayStation Network
  Top
 

 
Jur1zz  
Posted: Sunday, Nov 1 2009, 09:26
Quote Post


Playa
Group Icon
Group: Members
Joined: Jul 16, 2009

lt.gif

XXXXX



QUOTE (ZAZ @ Nov 1 2009, 09:30)
QUOTE (Jur1zz @ Oct 31 2009, 21:11)
QUOTE (ZAZ @ Oct 31 2009, 23:04)
QUOTE (Jur1zz @ Oct 31 2009, 20:31)
Hi

How can I attach vehicle sound for added "not replaced" cars, with CLEO not "VehicleAudioEditorUltimate"

Example

there're no scriptcodes to play egine sounds and the cleo script function to play mp3 is unstable
maybe a trick can help: place a car with actor in background

Look at this
MOTO IGiNe v0.2


Yes, I did, but I don't know what you want.

Note: This is a script tutorial and not a request topic
so please don't post again here

If you want that I do the script then visit my Homepage, vistit every site and click on every avertising, then post in my cleo mod showroom topic to request the script.

I just want know how they get sounds for bikes
Users WebsitePMMSNXbox Live
  Top
 

 

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

0 Members:

Pages: (31) 1 2 [3] 4 5 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG