Quantcast

Jump to content

» «
Photo

Cleo Passenger mod? without driveby? My script dont work :(

9 replies to this topic
MrGTAmodsgerman
  • MrGTAmodsgerman

    Rat

  • Members
  • Joined: 02 Jan 2012

#1

Posted 25 December 2013 - 10:13 PM

Merry Christmas guys

 

I wanna make a simple cleo script that let cj get in a car as passenger on every car in the traffic and parked vehicles.

I know i can download this mod but i wanna have it without the driveby funktion. Like in San Andreas Multiplayer or like this this

I didnt how to get it work :(

 

My Code:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder....files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
$DRIVEBYMODE = 0
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
wait 100
if
   not Actor.Driving($PLAYER_ACTOR)
else_jump  
053E: $CARNEARCJ = get_random_car_with_model -1 in_rectangle_cornerA $PLYPOSX1 $PLYPOSY1 cornerB $PLYPOSX2 $PLYPOSY2
if
00E1:   player 0 pressed_key 4
00E1:   player 0 pressed_key 11
   not $CARNEARCJ == -1
else_jump
05CA: AS_actor $PLAYER_ACTOR enter_car $CARNEARCJ passenger_seat -1 10000 ms

 

Any help? I hope i get help here :/


Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#2

Posted 27 December 2013 - 03:00 PM

Use these :

 

Not Actor.Dead($PLAYER_ACTOR)
044B: actor $PLAYER_ACTOR on_foot
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
Car.Defined(0@)

//------Optional--------
01EA: 2@ = car 0@ max_passengers 
0019: 0@ > 2 

//-------------------------
0AB0: key_pressed 0x47 // G
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms 

 

 

But this will make the player enter only the rear left seat , cz i cant find an opcode that gives you the coords of the doors to check whether cj is near the left or the right rear door


MrGTAmodsgerman
  • MrGTAmodsgerman

    Rat

  • Members
  • Joined: 02 Jan 2012

#3

Posted 03 January 2014 - 05:54 PM

Use these :

 

Not Actor.Dead($PLAYER_ACTOR)
044B: actor $PLAYER_ACTOR on_foot
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
Car.Defined(0@)

//------Optional--------
01EA: 2@ = car 0@ max_passengers 
0019: 0@ > 2 

//-------------------------
0AB0: key_pressed 0x47 // G
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms 

 

 

But this will make the player enter only the rear left seat , cz i cant find an opcode that gives you the coords of the doors to check whether cj is near the left or the right rear door

your code will not work :( i got an error uncorrect directiv Car.Defined(0@). i want to defined Car.Defined but i dont know what it does i am a noob about cleo scripting. sorry


Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#4

Posted 04 January 2014 - 01:09 PM Edited by Manfred Von Karma, 06 January 2014 - 10:42 AM.

your code will not work  :( i got an error uncorrect directiv Car.Defined(0@). i want to defined Car.Defined but i dont know what it does i am a noob about cleo scripting. sorry

 

 

Not Actor.Dead($PLAYER_ACTOR)
044B: actor $PLAYER_ACTOR on_foot
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
Car.Defined(0@)

//------Optional--------
01EA: 2@ = car 0@ max_passengers 
0019: 0@ > 2 

//-------------------------
0AB0: key_pressed 0x47 // G
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms 

 

 

But this will make the player enter only the rear left seat , cz i cant find an opcode that gives you the coords of the doors to check whether cj is near the left or the right rear door

 

What i gave you is not a script :) its just the opcodes that you'll need to make the script . Try this :



:Passenger
wait 0
if and
    Not Actor.Dead($PLAYER_ACTOR)
    044B: actor $PLAYER_ACTOR on_foot
jf @Passenger
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
    Car.Defined(0@)
jf @Passenger
01EA: 2@ = car 0@ max_passengers 
if and
    0019: 2@ > 2 
    0AB0: key_pressed 0x47 // G
jf @Passenger
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms  
wait 250
jump @Passenger

MrGTAmodsgerman
  • MrGTAmodsgerman

    Rat

  • Members
  • Joined: 02 Jan 2012

#5

Posted 05 January 2014 - 09:30 PM

 

your code will not work  :( i got an error uncorrect directiv Car.Defined(0@). i want to defined Car.Defined but i dont know what it does i am a noob about cleo scripting. sorry

 

 

Not Actor.Dead($PLAYER_ACTOR)
044B: actor $PLAYER_ACTOR on_foot
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
Car.Defined(0@)

//------Optional--------
01EA: 2@ = car 0@ max_passengers 
0019: 0@ > 2 

//-------------------------
0AB0: key_pressed 0x47 // G
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms 

 

 

But this will make the player enter only the rear left seat , cz i cant find an opcode that gives you the coords of the doors to check whether cj is near the left or the right rear door

 

What i gave you is not a script :) its just the opcodes that you'll need to make the script . Try this :

:Passenger
wait 0
if and
    Not Actor.Dead($PLAYER_ACTOR)
    044B: actor $PLAYER_ACTOR on_foot
jf @Passenger
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
    Car.Defined(0@)
jf @Passenger
01EA: 2@ = car 0@ max_passengers 
if and
    0019: 0@ > 2 
    0AB0: key_pressed 0x47 // G
jf @Passenger
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms  
wait 250
jump @Passenger

Great i learn about it but i have the same error but i read thats the right code

if
    Car.Defined(0@)


and 


01EA: 2@ = car 0@ max_passengers 

is right or not? the car is defined also with name 0 and 0 is 2@ = car 0@ max_passengers. But why it didnt work :panic:


Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#6

Posted 06 January 2014 - 10:44 AM

It was a typo , i wrote   0019: 0@ > 2  instead of   0019: 2@ > 2 

 

Here :

:Passenger
wait 0
if and
    Not Actor.Dead($PLAYER_ACTOR)
    044B: actor $PLAYER_ACTOR on_foot
jf @Passenger
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
    Car.Defined(0@)
jf @Passenger
01EA: 2@ = car 0@ max_passengers 
if and
    0019: 2@ > 2 
    0AB0: key_pressed 0x47 // G
jf @Passenger
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms  
wait 250
jump @Passenger

MrGTAmodsgerman
  • MrGTAmodsgerman

    Rat

  • Members
  • Joined: 02 Jan 2012

#7

Posted 09 January 2014 - 03:14 PM

 

It was a typo , i wrote   0019: 0@ > 2  instead of   0019: 2@ > 2 

 

Here :

:Passenger
wait 0
if and
    Not Actor.Dead($PLAYER_ACTOR)
    044B: actor $PLAYER_ACTOR on_foot
jf @Passenger
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
if
    Car.Defined(0@)
jf @Passenger
01EA: 2@ = car 0@ max_passengers 
if and
    0019: 2@ > 2 
    0AB0: key_pressed 0x47 // G
jf @Passenger
05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 3 10000 ms  
wait 250
jump @Passenger

the script dont work because Car.Defined(0@) need a id like 0AB0: but the right code. :( what is car 0? thanks for you help up to now.


Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#8

Posted 09 January 2014 - 03:29 PM

Ok i'll check what i did wrong


MrGTAmodsgerman
  • MrGTAmodsgerman

    Rat

  • Members
  • Joined: 02 Jan 2012

#9

Posted 11 January 2014 - 08:23 PM

Ok i'll check what i did wrong

Reply if you find a way to get fix it :)


MrGTAmodsgerman
  • MrGTAmodsgerman

    Rat

  • Members
  • Joined: 02 Jan 2012

#10

Posted 12 January 2014 - 03:57 AM

Ok i'll check what i did wrong

I find a good code part in the main.scm

 

put_actor $PLAYER_ACTOR into_car 35@ passenger_seat 2

is that good? its the code of the first mission where cj sit in the police car or the taxi





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users