#1 05-03-2010 14:16

AngelHunter
Registered: 05-03-2010
Posts: 1

I downloaded the"Spray N Run" mod.My game crashes if I use paint.

Can you help me?This is what the script said :



// 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 'SPRAY'
$RADIUS_VALUE_X = 3.0
$RADIUS_VALUE_Y = 3.0

:SPRAY_31
wait 10
if
   Player.Defined($PLAYER_CHAR)
else_jump @SPRAY_31

:SPRAY_51
wait 10
if and
02D8:   actor $PLAYER_ACTOR current_weapon == 41
8A32:   not unknown_actor $PLAYER_ACTOR in_car
00E1:   player 0 pressed_key 17
else_jump @SPRAY_31
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to $CAR closest_ped_to $PED
wait 10
if
   not $CAR == -1
else_jump @SPRAY_51
01BD: $TIME = current_time_in_ms

:SPRAY_122
wait 10
if and
02D8:   actor $PLAYER_ACTOR current_weapon == 41
8A32:   not unknown_actor $PLAYER_ACTOR in_car
00E1:   player 0 pressed_key 17
0203:   actor $PLAYER_ACTOR near_car $CAR radius $RADIUS_VALUE_X $RADIUS_VALUE_Y flag 0 on_foot
else_jump @SPRAY_51
01BD: $TIME2 = current_time_in_ms
000C: $TIME2 -= $TIME  // Note: the incorrect math opcode was used here
wait 10
if
  $TIME2 > 2000
else_jump @SPRAY_122
0099: $COLOR1 = random_int_in_ranges_0_to_32767
0099: $COLOR2 = random_int_in_ranges_0_to_32767
0229: set_car $CAR primary_color_to $COLOR1 secondary_color_to $COLOR2
046C: $DRIVER = car $CAR driver
05E2: AS_actor $DRIVER kill_actor $PLAYER_ACTOR
Actor.RemoveReferences($DRIVER)
Car.RemoveReferences($CAR)
jump @SPRAY_31
0000: NOP
0A93: end_custom_thread

Offline

#2 05-03-2010 18:16

Den_spb
From: Ленинград
Registered: 23-11-2008
Posts: 941
Website

Re: I downloaded the"Spray N Run" mod.My game crashes if I use paint.

1. You should use only local variables (0@ ... 31@) and you shouldn't use global variables ($0, $1 ... ) in CLEO-scripts. Exception: you can use variables of player - $player_char and $player_actor.
2.

0099: $COLOR1 = random_int_in_ranges_0_to_32767

I think, very big numbers are used here. Try to use

0209: 17@ = random_int_in_ranges 0 10

(max number shouldn't be very big)
3.

000C: $TIME2 -= $TIME

Integer values are used here so you should use opcode for integer values:

0062: 13@ -= 11@ // (int)

Offline

Board footer

Powered by FluxBB