+ -

Pages

Thursday 14 August 2014

[REL] CarControl v1.2 + SOURCE

CARCONTROL 
0.3z


Enter vehicle as a passenger and control it as your own while being a passenger! Unlike many this one is activated by a command and can be deactivated easily.






Activation: Chat command /ControlCar to enable or disable.
Function: Controls a car as a passenger.
Note: Try not to exit vehicles without disabling the script first.
Requirements: CLEO 4.1, SAMP Functions 3.2.


Made by Mr.Ze.


Updated 19.7.2014 - v1.1
- Fixed major 'freeze' bug.

Updated 16.8.2014 - v1.2
- Added patches to the script.






Download: Here


Source code
  1. {$CLEO .cs}
  2. 0B34: samp register_client_command "ControlCar" to_label @Control
  3. WHILE TRUE
  4. wait 0
  5. if 0@ == 1
  6. then
  7.     0000: NOP
  8. end
  9. END
  10. :Control
  11. wait 0
  12. 03C0: $car = actor $PLAYER_ACTOR car
  13. 0B12: 0@ = 0@ XOR 1
  14. if and
  15.    Player.Defined($PLAYER_ACTOR)
  16.    00DB:   actor $PLAYER_ACTOR in_car $car
  17. then  
  18.     if
  19.     0@ == 1
  20.     then
  21.     0B2E: 1@ = read_samp_memory 0x12D60 size 2
  22.     0B2D: write samp_memory 0x12D60 value 0xC390 size 2
  23.     0B2E: 2@ = read_samp_memory 0x13FA0 size 2
  24.     0B2D: write samp_memory 0x13FA0 value 0xC390 size 2
  25.     0B2E: 3@ = read_samp_memory 0x78560 size 2
  26.     0B2D: write samp_memory 0x78560 value 0xC20400 size 2  
  27.     036A: put_actor $PLAYER_ACTOR in_car $car
  28.     0AF8: samp add_message_to_chat "{8650AC}[CarControl]: {00CD00}You are in control now!" color 0xFFFFFF
  29.     else
  30.     0B2D: write samp_memory 0x12D60 value 1@ size 2
  31.     0B2D: write samp_memory 0x13FA0 value 2@ size 2
  32.     0B2D: write samp_memory 0x78560 value 3@ size 2
  33.     072B: put_actor $PLAYER_ACTOR into_car $car passengerseat -1 //Doesn't work for some reason?
  34.     0430: put_actor $PLAYER_ACTOR into_car $car passenger_seat -1 //Works
  35.     0AF8: samp add_message_to_chat "{8650AC}[CarControl]: {FF0000}You are no longer in control!" color 0xFFFFFF
  36.     end
  37. else 0AF8: samp add_message_to_chat "You must be in a car!!" color 0x9000    
  38. end    
  39. SAMP.CmdRet
5 Mr.Ze: [REL] CarControl v1.2 + SOURCE CARCONTROL  0.3z Enter vehicle as a passenger and control it as your own while being a passenger! Unlike many this one is activated by ...

2 comments:

< >