Quantcast

Jump to content

» «
Photo

Is actor driving any car?

3 replies to this topic
gokuta
  • gokuta

    Crackhead

  • Members
  • Joined: 24 Apr 2014
  • Afghanistan

#1

Posted 25 July 2014 - 02:44 AM Edited by gokuta, 25 July 2014 - 02:45 AM.

Ok, I've got those two opcodes:

00DF:   actor $PLAYER_ACTOR driving
0449:   actor $PLAYER_ACTOR in_a_car

Somehow 00DF returns TRUE when I'm sitting in a car as a passenger. So,... what's the difference between them? And one more question: is there such an opcode, that return TRUE only if actor is sitting in any car as a driver and returns FALSE otherwise. Thanks


Automan
  • Automan

    Maker's modder

  • Members
  • Joined: 13 Dec 2008
  • Italy

#2

Posted 25 July 2014 - 03:48 PM

Very strange ... 
Have you tried if the code works against it? ...
 
80DF:   not actor $PLAYER_ACTOR driving 

 


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#3

Posted 25 July 2014 - 04:11 PM

http://gtag.gtagamin...se/opcode/00DF/
00DF will return true if the character has a vehicle, even if they are not actually sat inside it (opening and closing the door).

http://gtag.gtagamin...se/opcode/0449/
Returns true if the character is occupying any vehicle.

He may be a driver or passenger.

Let's check it.

if
0449:   is_char_sitting_in_any_car $PLAYER_ACTOR
then
    03C0: store_car_char_is_in_no_save $PLAYER_ACTOR store_to 0@         

    046C: get_driver_of_car 0@ store_to 1@
    
    if
    003C:   $PLAYER_ACTOR == 1@
    then
        // Carl Johnson is driver of 0@ vehicle
    end
end

Automan
  • Automan

    Maker's modder

  • Members
  • Joined: 13 Dec 2008
  • Italy

#4

Posted 26 July 2014 - 09:11 AM

Sorry, but if you do get CJ drive of the game, 
it is only a driver. 
 
If you do get CJ in car of the scripts, 
you already know if CJ are driving or passenger... 
 
But maybe I do not understand fine the problem! :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users