Jump to content

Help with a cleo mod.


Itsaks

Recommended Posts

Hi

I have modified a cleo mod as I found on my pc. I'm very new on cleo scripting. And I need som help with it.

I modded the script so it spawns highspeed trains on each track as bypasses all the time.

I need help to make a destroyvehicle function after some time for each train as bypasses.

For an example: a train spawns from a cord and destroys after some amount of time or distance, cos now i think my game crashes cos it get to overloaded with trains :(

You activate it with action + T key but I can't turn it off :( I hope you guys can help me :)

CLEO SCRIPT:

// 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 'TRAIN' 
12@ = 0 

:TRAIN_18
wait 0 
if 
  Player.Defined($PLAYER_CHAR)
else_jump @TRAIN_18 
if 
 $ONMISSION == 0 
else_jump @TRAIN_18 
if and
00E1:   player 0 pressed_key 4 
0AB0:   key_pressed 84 
else_jump @TRAIN_84 
jump @TRAIN_109 

:TRAIN_84
if 
 12@ == 0 
else_jump @TRAIN_247 
jump @TRAIN_18 

:TRAIN_109
wait 0 
if 
  Player.Defined($PLAYER_CHAR)
if and
80E1:   not player 0 pressed_key 4 
8AB0:   not key_pressed 84 
else_jump @TRAIN_109 
if 
 12@ == 0 
else_jump @TRAIN_195 
12@ = 1 
00BC: show_text_highpriority GXT 'MODON' time 3000 flag 1 
06D7: enable_train_traffic 0 
jump @TRAIN_247 

:TRAIN_195
if 
 12@ == 1 
else_jump @TRAIN_18 
12@ = 0 
00BC: show_text_highpriority GXT 'MODOFF' time 3000 flag 1 
06D7: enable_train_traffic 1 
jump @TRAIN_18 

:TRAIN_247
Model.Load(#FREIGHT)
Model.Load(#FREIFLAT)
Model.Load(#STREAK)
Model.Load(#STREAKC)
wait 0 
if or
  not Model.Available(#FREIGHT)
  not Model.Available(#FREIFLAT)
  not Model.Available(#STREAK)
  not Model.Available(#STREAKC)
else_jump @TRAIN_309 
jump @TRAIN_247 

:TRAIN_309
06D7: enable_train_traffic 0 
if and
 0@ == 0 
06D8: 1@ = create_train_at -1979.603 -678.1725 27.759 type 12 direction 1 
06DC: set_train 1@ acc 60.0 
06DD: set_train 1@ speed 70.0 
wait 3000 
06D8: 1@ = create_train_at -1981.207 -474.4401 25.7109 type 12 direction 0 
06DC: set_train 1@ acc 60.0 
06DD: set_train 1@ speed 70.0 
wait 3000  
:TRAIN_632
Model.Destroy(#FREIGHT)
Model.Destroy(#FREIFLAT)
Model.Destroy(#STREAK)
Model.Destroy(#STREAKC)
JUMP @TRAIN_18
return

EDIT: the only place the trains spawns at is the roadcrossing straight up from the san fierro airport at the beginning of the tunnel, hope you got it :)

Edited by Itsaks
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...